BAEL-3283 Corrected the indentation as per the review comments.

This commit is contained in:
sandip singh 2019-11-27 22:15:21 +05:30
parent 8c43c4e0a5
commit 369e1d2722
4 changed files with 20 additions and 21 deletions

View File

@ -773,7 +773,7 @@
<module>spring-mvc-kotlin</module>
<module>spring-mvc-simple</module>
<module>spring-mvc-simple-2</module>
<module>spring-mvc-views</module>
<module>spring-mvc-views</module>
<module>spring-mvc-velocity</module>
<module>spring-mvc-webflow</module>
<module>spring-mvc-xml</module>
@ -1514,7 +1514,7 @@
<module>spring-mvc-kotlin</module>
<module>spring-mvc-simple</module>
<module>spring-mvc-simple-2</module>
<module>spring-mvc-views</module>
<module>spring-mvc-views</module>
<module>spring-mvc-velocity</module>
<module>spring-mvc-webflow</module>
<module>spring-mvc-xml</module>

View File

@ -5,7 +5,7 @@
<modelVersion>4.0.0</modelVersion>
<artifactId>spring-mvc-views</artifactId>
<packaging>war</packaging>
<name>spring-mvc-themes</name>
<name>spring-mvc-views</name>
<parent>
<groupId>com.baeldung</groupId>

View File

@ -19,8 +19,8 @@ public class DataSourceConfig {
public DataSource dataSource() {
EmbeddedDatabaseBuilder builder = new EmbeddedDatabaseBuilder();
return builder.setType(EmbeddedDatabaseType.HSQL)
.addScripts("db/sql/create-db.sql", "db/sql/insert-data.sql")
.build();
.addScripts("db/sql/create-db.sql", "db/sql/insert-data.sql")
.build();
}
@Bean

View File

@ -26,27 +26,26 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter {
@Override
protected void configure(AuthenticationManagerBuilder auth) throws Exception {
auth.jdbcAuthentication()
.passwordEncoder(passwordEncoder())
.dataSource(dataSource);
.passwordEncoder(passwordEncoder())
.dataSource(dataSource);
}
@Override
protected void configure(HttpSecurity http) throws Exception {
http
.csrf()
.disable()
.authorizeRequests()
.antMatchers("/anonymous*").anonymous()
.antMatchers("/login*").permitAll()
.anyRequest().authenticated()
.and()
.formLogin()
.and()
.logout()
.logoutUrl("/logout.do")
.invalidateHttpSession(true)
.clearAuthentication(true);
http.csrf()
.disable()
.authorizeRequests()
.antMatchers("/anonymous*").anonymous()
.antMatchers("/login*").permitAll()
.anyRequest().authenticated()
.and()
.formLogin()
.and()
.logout()
.logoutUrl("/logout.do")
.invalidateHttpSession(true)
.clearAuthentication(true);
}
@Override