cleanup and upgrade
This commit is contained in:
@@ -10,7 +10,7 @@
|
||||
<parent>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-parent</artifactId>
|
||||
<version>1.2.4.RELEASE</version>
|
||||
<version>1.3.1.RELEASE</version>
|
||||
</parent>
|
||||
|
||||
<dependencies>
|
||||
@@ -39,7 +39,7 @@
|
||||
<!-- Is the ApacheDS server - 1.5.6 and 1.5.7 don't work -->
|
||||
<groupId>org.apache.directory.server</groupId>
|
||||
<artifactId>apacheds-server-jndi</artifactId>
|
||||
<version>1.5.5</version>
|
||||
<version>${apacheds.version}</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
@@ -68,42 +68,8 @@
|
||||
|
||||
</build>
|
||||
|
||||
<properties>
|
||||
<!-- Spring -->
|
||||
<org.springframework.version>4.2.4.RELEASE</org.springframework.version>
|
||||
<org.springframework.security.version>4.0.3.RELEASE</org.springframework.security.version>
|
||||
|
||||
<!-- persistence -->
|
||||
<hibernate.version>4.3.11.Final</hibernate.version>
|
||||
<mysql-connector-java.version>5.1.37</mysql-connector-java.version>
|
||||
|
||||
<!-- logging -->
|
||||
<org.slf4j.version>1.7.13</org.slf4j.version>
|
||||
<logback.version>1.1.3</logback.version>
|
||||
|
||||
<!-- various -->
|
||||
<hibernate-validator.version>5.2.2.Final</hibernate-validator.version>
|
||||
|
||||
<!-- util -->
|
||||
<guava.version>19.0</guava.version>
|
||||
<commons-lang3.version>3.4</commons-lang3.version>
|
||||
|
||||
<!-- testing -->
|
||||
<org.hamcrest.version>1.3</org.hamcrest.version>
|
||||
<junit.version>4.12</junit.version>
|
||||
<mockito.version>1.10.19</mockito.version>
|
||||
|
||||
<httpcore.version>4.4.1</httpcore.version>
|
||||
<httpclient.version>4.5</httpclient.version>
|
||||
|
||||
<rest-assured.version>2.4.1</rest-assured.version>
|
||||
|
||||
<!-- Maven plugins -->
|
||||
<maven-compiler-plugin.version>3.3</maven-compiler-plugin.version>
|
||||
<maven-war-plugin.version>2.6</maven-war-plugin.version>
|
||||
<maven-surefire-plugin.version>2.18.1</maven-surefire-plugin.version>
|
||||
<cargo-maven2-plugin.version>1.4.15</cargo-maven2-plugin.version>
|
||||
|
||||
<properties>
|
||||
<apacheds.version>1.5.5</apacheds.version>
|
||||
</properties>
|
||||
|
||||
</project>
|
||||
|
||||
@@ -9,7 +9,7 @@ import org.springframework.security.config.annotation.web.configuration.WebSecur
|
||||
* Security Configuration - LDAP and HTTP Authorizations.
|
||||
*/
|
||||
@Configuration
|
||||
// @ImportResource({ "classpath:webSecurityConfig.xml" })
|
||||
// @ImportResource({ "classpath:webSecurityConfig.xml" }) //=> uncomment to use equivalent xml config
|
||||
public class SecurityConfig extends WebSecurityConfigurerAdapter {
|
||||
|
||||
@Override
|
||||
@@ -20,7 +20,7 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter {
|
||||
@Override
|
||||
protected void configure(HttpSecurity http) throws Exception {
|
||||
http.authorizeRequests().antMatchers("/", "/home").permitAll().anyRequest().authenticated();
|
||||
http.formLogin().loginPage("/login").permitAll().loginProcessingUrl("/j_spring_security_check").and().logout().logoutSuccessUrl("/");
|
||||
http.formLogin().loginPage("/login").permitAll().and().logout().logoutSuccessUrl("/");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
<p th:if="${param.logout}" class="alert">You have been logged out</p>
|
||||
<p th:if="${param.error}" class="alert alert-error">There was an error, please try again</p>
|
||||
<h2>Login with Username and Password</h2>
|
||||
<form name="form" th:action="@{/j_spring_security_check}" action="/login" method="POST">
|
||||
<form name="form" th:action="@{/login}" method="POST">
|
||||
<fieldset>
|
||||
<input type="text" name="username" value="" placeholder="Username" />
|
||||
<input type="password" name="password" placeholder="Password" />
|
||||
|
||||
@@ -13,10 +13,7 @@
|
||||
<intercept-url pattern="/login" access="permitAll"/>
|
||||
<intercept-url pattern="/secure" access="isAuthenticated()"/>
|
||||
|
||||
<form-login login-page='/login' default-target-url="/"
|
||||
authentication-failure-url="/login?error"
|
||||
username-parameter="username"
|
||||
password-parameter="password"/>
|
||||
<form-login login-page='/login' default-target-url="/" authentication-failure-url="/login?error" />
|
||||
<logout logout-success-url="/" />
|
||||
</http>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user