Additional Checkstyle Fixes
Issue gh-393
This commit is contained in:
@@ -33,7 +33,9 @@ import org.springframework.context.annotation.Configuration;
|
||||
public class GeoConfig {
|
||||
|
||||
@Bean
|
||||
public DatabaseReader geoDatabaseReader(@Value("classpath:GeoLite2-City.mmdb") InputStream geoInputStream) throws Exception {
|
||||
public DatabaseReader geoDatabaseReader(
|
||||
@Value("classpath:GeoLite2-City.mmdb") InputStream geoInputStream)
|
||||
throws Exception {
|
||||
return new DatabaseReader.Builder(geoInputStream).build();
|
||||
}
|
||||
|
||||
|
||||
@@ -25,5 +25,6 @@ import org.springframework.session.data.redis.config.annotation.web.http.EnableR
|
||||
*/
|
||||
// tag::class[]
|
||||
@EnableRedisHttpSession // <1>
|
||||
public class HttpSessionConfig { }
|
||||
public class HttpSessionConfig {
|
||||
}
|
||||
// end::class[]
|
||||
|
||||
@@ -31,24 +31,14 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter {
|
||||
// tag::config[]
|
||||
@Override
|
||||
protected void configure(HttpSecurity http) throws Exception {
|
||||
http
|
||||
.formLogin()
|
||||
.loginPage("/login")
|
||||
.permitAll()
|
||||
.and()
|
||||
.authorizeRequests()
|
||||
.antMatchers("/resources/**").permitAll()
|
||||
.anyRequest().authenticated()
|
||||
.and()
|
||||
.logout()
|
||||
.permitAll();
|
||||
http.formLogin().loginPage("/login").permitAll().and().authorizeRequests()
|
||||
.antMatchers("/resources/**").permitAll().anyRequest().authenticated()
|
||||
.and().logout().permitAll();
|
||||
}
|
||||
// end::config[]
|
||||
|
||||
@Autowired
|
||||
public void configureGlobal(AuthenticationManagerBuilder auth) throws Exception {
|
||||
auth
|
||||
.inMemoryAuthentication()
|
||||
.withUser("user").password("password").roles("USER");
|
||||
auth.inMemoryAuthentication().withUser("user").password("password").roles("USER");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user