BAEL-3283 Corrected the indentation as per the review comments.
This commit is contained in:
parent
8c43c4e0a5
commit
369e1d2722
4
pom.xml
4
pom.xml
@ -773,7 +773,7 @@
|
|||||||
<module>spring-mvc-kotlin</module>
|
<module>spring-mvc-kotlin</module>
|
||||||
<module>spring-mvc-simple</module>
|
<module>spring-mvc-simple</module>
|
||||||
<module>spring-mvc-simple-2</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-velocity</module>
|
||||||
<module>spring-mvc-webflow</module>
|
<module>spring-mvc-webflow</module>
|
||||||
<module>spring-mvc-xml</module>
|
<module>spring-mvc-xml</module>
|
||||||
@ -1514,7 +1514,7 @@
|
|||||||
<module>spring-mvc-kotlin</module>
|
<module>spring-mvc-kotlin</module>
|
||||||
<module>spring-mvc-simple</module>
|
<module>spring-mvc-simple</module>
|
||||||
<module>spring-mvc-simple-2</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-velocity</module>
|
||||||
<module>spring-mvc-webflow</module>
|
<module>spring-mvc-webflow</module>
|
||||||
<module>spring-mvc-xml</module>
|
<module>spring-mvc-xml</module>
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<artifactId>spring-mvc-views</artifactId>
|
<artifactId>spring-mvc-views</artifactId>
|
||||||
<packaging>war</packaging>
|
<packaging>war</packaging>
|
||||||
<name>spring-mvc-themes</name>
|
<name>spring-mvc-views</name>
|
||||||
|
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>com.baeldung</groupId>
|
<groupId>com.baeldung</groupId>
|
||||||
|
@ -19,8 +19,8 @@ public class DataSourceConfig {
|
|||||||
public DataSource dataSource() {
|
public DataSource dataSource() {
|
||||||
EmbeddedDatabaseBuilder builder = new EmbeddedDatabaseBuilder();
|
EmbeddedDatabaseBuilder builder = new EmbeddedDatabaseBuilder();
|
||||||
return builder.setType(EmbeddedDatabaseType.HSQL)
|
return builder.setType(EmbeddedDatabaseType.HSQL)
|
||||||
.addScripts("db/sql/create-db.sql", "db/sql/insert-data.sql")
|
.addScripts("db/sql/create-db.sql", "db/sql/insert-data.sql")
|
||||||
.build();
|
.build();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Bean
|
@Bean
|
||||||
|
@ -26,27 +26,26 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter {
|
|||||||
@Override
|
@Override
|
||||||
protected void configure(AuthenticationManagerBuilder auth) throws Exception {
|
protected void configure(AuthenticationManagerBuilder auth) throws Exception {
|
||||||
auth.jdbcAuthentication()
|
auth.jdbcAuthentication()
|
||||||
.passwordEncoder(passwordEncoder())
|
.passwordEncoder(passwordEncoder())
|
||||||
.dataSource(dataSource);
|
.dataSource(dataSource);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void configure(HttpSecurity http) throws Exception {
|
protected void configure(HttpSecurity http) throws Exception {
|
||||||
|
|
||||||
http
|
http.csrf()
|
||||||
.csrf()
|
.disable()
|
||||||
.disable()
|
.authorizeRequests()
|
||||||
.authorizeRequests()
|
.antMatchers("/anonymous*").anonymous()
|
||||||
.antMatchers("/anonymous*").anonymous()
|
.antMatchers("/login*").permitAll()
|
||||||
.antMatchers("/login*").permitAll()
|
.anyRequest().authenticated()
|
||||||
.anyRequest().authenticated()
|
.and()
|
||||||
.and()
|
.formLogin()
|
||||||
.formLogin()
|
.and()
|
||||||
.and()
|
.logout()
|
||||||
.logout()
|
.logoutUrl("/logout.do")
|
||||||
.logoutUrl("/logout.do")
|
.invalidateHttpSession(true)
|
||||||
.invalidateHttpSession(true)
|
.clearAuthentication(true);
|
||||||
.clearAuthentication(true);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
Loading…
x
Reference in New Issue
Block a user