Update Thymeleaf version and enable CSRF protection
This commit is contained in:
@@ -12,10 +12,10 @@
|
||||
<springsecurity-version>3.2.0.RELEASE</springsecurity-version>
|
||||
<webflow-version>2.4.0.BUILD-SNAPSHOT</webflow-version>
|
||||
<slf4j-version>1.7.5</slf4j-version>
|
||||
<thymeleaf-version>2.0.15</thymeleaf-version>
|
||||
<thymeleaf-extras-tiles2-version>2.0.0</thymeleaf-extras-tiles2-version>
|
||||
<thymeleaf-extras-springsecurity3-version>2.0.0</thymeleaf-extras-springsecurity3-version>
|
||||
<thymeleaf-extras-conditionalcomments-version>2.0.0</thymeleaf-extras-conditionalcomments-version>
|
||||
<thymeleaf-version>2.1.2.RELEASE</thymeleaf-version>
|
||||
<thymeleaf-extras-tiles2-version>2.1.1.RELEASE</thymeleaf-extras-tiles2-version>
|
||||
<thymeleaf-extras-springsecurity3-version>2.1.1.RELEASE</thymeleaf-extras-springsecurity3-version>
|
||||
<thymeleaf-extras-conditionalcomments-version>2.1.0.RELEASE</thymeleaf-extras-conditionalcomments-version>
|
||||
<tiles-version>2.2.2</tiles-version>
|
||||
</properties>
|
||||
|
||||
@@ -54,12 +54,12 @@
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.thymeleaf</groupId>
|
||||
<artifactId>thymeleaf-spring3</artifactId>
|
||||
<artifactId>thymeleaf-spring4</artifactId>
|
||||
<version>${thymeleaf-version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.thymeleaf.extras</groupId>
|
||||
<artifactId>thymeleaf-extras-tiles2</artifactId>
|
||||
<artifactId>thymeleaf-extras-tiles2-spring4</artifactId>
|
||||
<version>${thymeleaf-extras-tiles2-version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
|
||||
@@ -4,17 +4,16 @@ import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.security.authentication.encoding.Md5PasswordEncoder;
|
||||
import org.springframework.security.config.annotation.authentication.builders.AuthenticationManagerBuilder;
|
||||
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
|
||||
import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;
|
||||
import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter;
|
||||
import org.springframework.security.config.annotation.web.servlet.configuration.EnableWebMvcSecurity;
|
||||
|
||||
@Configuration
|
||||
@EnableWebSecurity
|
||||
@EnableWebMvcSecurity
|
||||
public class SecurityConfig extends WebSecurityConfigurerAdapter {
|
||||
|
||||
@Override
|
||||
protected void configure(HttpSecurity http) throws Exception {
|
||||
http
|
||||
.csrf().disable()
|
||||
.formLogin()
|
||||
.loginPage("/login")
|
||||
.loginProcessingUrl("/loginProcess")
|
||||
|
||||
@@ -18,10 +18,10 @@ import org.thymeleaf.dialect.IDialect;
|
||||
import org.thymeleaf.extras.conditionalcomments.dialect.ConditionalCommentsDialect;
|
||||
import org.thymeleaf.extras.springsecurity3.dialect.SpringSecurityDialect;
|
||||
import org.thymeleaf.extras.tiles2.dialect.TilesDialect;
|
||||
import org.thymeleaf.extras.tiles2.spring.web.configurer.ThymeleafTilesConfigurer;
|
||||
import org.thymeleaf.extras.tiles2.spring.web.view.FlowAjaxThymeleafTilesView;
|
||||
import org.thymeleaf.spring3.SpringTemplateEngine;
|
||||
import org.thymeleaf.spring3.view.AjaxThymeleafViewResolver;
|
||||
import org.thymeleaf.extras.tiles2.spring4.web.configurer.ThymeleafTilesConfigurer;
|
||||
import org.thymeleaf.extras.tiles2.spring4.web.view.FlowAjaxThymeleafTilesView;
|
||||
import org.thymeleaf.spring4.SpringTemplateEngine;
|
||||
import org.thymeleaf.spring4.view.AjaxThymeleafViewResolver;
|
||||
import org.thymeleaf.templateresolver.ServletContextTemplateResolver;
|
||||
|
||||
@EnableWebMvc
|
||||
|
||||
Reference in New Issue
Block a user