Upgrade to spring-javaformat 0.0.11
This commit is contained in:
@@ -67,14 +67,12 @@ public class SampleMethodSecurityApplication extends WebMvcConfigurerAdapter {
|
||||
|
||||
@Order(Ordered.HIGHEST_PRECEDENCE)
|
||||
@Configuration
|
||||
protected static class AuthenticationSecurity
|
||||
extends GlobalAuthenticationConfigurerAdapter {
|
||||
protected static class AuthenticationSecurity extends GlobalAuthenticationConfigurerAdapter {
|
||||
|
||||
@Override
|
||||
public void init(AuthenticationManagerBuilder auth) throws Exception {
|
||||
auth.inMemoryAuthentication().withUser("admin").password("admin")
|
||||
.roles("ADMIN", "USER", "ACTUATOR").and().withUser("user")
|
||||
.password("user").roles("USER");
|
||||
auth.inMemoryAuthentication().withUser("admin").password("admin").roles("ADMIN", "USER", "ACTUATOR").and()
|
||||
.withUser("user").password("user").roles("USER");
|
||||
}
|
||||
|
||||
}
|
||||
@@ -85,11 +83,10 @@ public class SampleMethodSecurityApplication extends WebMvcConfigurerAdapter {
|
||||
|
||||
@Override
|
||||
protected void configure(HttpSecurity http) throws Exception {
|
||||
http.authorizeRequests().antMatchers("/login").permitAll().anyRequest()
|
||||
.fullyAuthenticated().and().formLogin().loginPage("/login")
|
||||
.failureUrl("/login?error").and().logout()
|
||||
.logoutRequestMatcher(new AntPathRequestMatcher("/logout")).and()
|
||||
.exceptionHandling().accessDeniedPage("/access?error");
|
||||
http.authorizeRequests().antMatchers("/login").permitAll().anyRequest().fullyAuthenticated().and()
|
||||
.formLogin().loginPage("/login").failureUrl("/login?error").and().logout()
|
||||
.logoutRequestMatcher(new AntPathRequestMatcher("/logout")).and().exceptionHandling()
|
||||
.accessDeniedPage("/access?error");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user