1
0
mirror of synced 2026-08-05 17:57:15 +00:00

Apply Checkstyle WhitespaceAfterCheck module

This commit is contained in:
Johnny Lim
2017-11-16 06:19:44 +09:00
committed by Rob Winch
parent 523332d51f
commit b6895e6359
88 changed files with 811 additions and 808 deletions
@@ -87,11 +87,11 @@ public class HelloWebfluxMethodApplicationITests {
}
private Consumer<Map<String, Object>> robsCredentials() {
return basicAuthenticationCredentials("rob","rob");
return basicAuthenticationCredentials("rob", "rob");
}
private Consumer<Map<String, Object>> adminCredentials() {
return basicAuthenticationCredentials("admin","admin");
return basicAuthenticationCredentials("admin", "admin");
}
private String base64Encode(String value) {
@@ -49,7 +49,7 @@ public class SecurityConfig {
public MapReactiveUserDetailsService userDetailsRepository() {
User.UserBuilder userBuilder = User.withDefaultPasswordEncoder();
UserDetails rob = userBuilder.username("rob").password("rob").roles("USER").build();
UserDetails admin = userBuilder.username("admin").password("admin").roles("USER","ADMIN").build();
UserDetails admin = userBuilder.username("admin").password("admin").roles("USER", "ADMIN").build();
return new MapReactiveUserDetailsService(rob, admin);
}
@@ -138,10 +138,10 @@ public class HelloWebfluxMethodApplicationTests {
}
private Consumer<Map<String, Object>> robsCredentials() {
return basicAuthenticationCredentials("rob","rob");
return basicAuthenticationCredentials("rob", "rob");
}
private Consumer<Map<String, Object>> adminCredentials() {
return basicAuthenticationCredentials("admin","admin");
return basicAuthenticationCredentials("admin", "admin");
}
}
@@ -87,10 +87,10 @@ public class HelloWebfluxApplicationITests {
}
private Consumer<Map<String, Object>> userCredentials() {
return basicAuthenticationCredentials("user","user");
return basicAuthenticationCredentials("user", "user");
}
private Consumer<Map<String, Object>> invalidCredentials() {
return basicAuthenticationCredentials("user","INVALID");
return basicAuthenticationCredentials("user", "INVALID");
}
}
@@ -32,13 +32,13 @@ import reactor.core.publisher.Mono;
public class HelloUserController {
@GetMapping("/")
public Mono<Map<String,String>> hello(Mono<Principal> principal) {
public Mono<Map<String, String>> hello(Mono<Principal> principal) {
return principal
.map(Principal::getName)
.map(this::helloMessage);
}
private Map<String,String> helloMessage(String username) {
private Map<String, String> helloMessage(String username) {
return Collections.singletonMap("message", "Hello " + username + "!");
}
}
@@ -112,10 +112,10 @@ public class HelloWebfluxApplicationTests {
}
private Consumer<Map<String, Object>> userCredentials() {
return basicAuthenticationCredentials("user","user");
return basicAuthenticationCredentials("user", "user");
}
private Consumer<Map<String, Object>> invalidCredentials() {
return basicAuthenticationCredentials("user","INVALID");
return basicAuthenticationCredentials("user", "INVALID");
}
}
@@ -86,10 +86,10 @@ public class HelloWebfluxFnApplicationITests {
}
private Consumer<Map<String, Object>> userCredentials() {
return basicAuthenticationCredentials("user","user");
return basicAuthenticationCredentials("user", "user");
}
private Consumer<Map<String, Object>> invalidCredentials() {
return basicAuthenticationCredentials("user","INVALID");
return basicAuthenticationCredentials("user", "INVALID");
}
}
@@ -115,10 +115,10 @@ public class HelloWebfluxFnApplicationTests {
}
private Consumer<Map<String, Object>> userCredentials() {
return basicAuthenticationCredentials("user","user");
return basicAuthenticationCredentials("user", "user");
}
private Consumer<Map<String, Object>> invalidCredentials() {
return basicAuthenticationCredentials("user","INVALID");
return basicAuthenticationCredentials("user", "INVALID");
}
}
@@ -27,11 +27,11 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter {
protected void configure(HttpSecurity http) throws Exception {
http
.authorizeRequests()
.antMatchers("/login","/resources/**").permitAll()
.antMatchers("/login", "/resources/**").permitAll()
.anyRequest().authenticated()
.and()
.jee()
.mappableRoles("USER","ADMIN");
.mappableRoles("USER", "ADMIN");
}
// @formatter:on
}
@@ -31,7 +31,7 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter {
auth.
inMemoryAuthentication()
.withUser("dianne").password("password").roles("USER").and()
.withUser("rod").password("password").roles("USER","ADMIN").and()
.withUser("rod").password("password").roles("USER", "ADMIN").and()
.withUser("scott").password("password").roles("USER");
}
// @formatter:on
@@ -58,7 +58,7 @@ public class ClientApplication {
SecurityContextHolder.getContext().setAuthentication(authentication);
for (Map.Entry<String,ContactManager> entry : contactServices.entrySet()) {
for (Map.Entry<String, ContactManager> entry : contactServices.entrySet()) {
String beanName = entry.getKey();
ContactManager remoteContactManager = entry.getValue();
Object object = this.beanFactory.getBean("&" + beanName);