cleanup and upgrade
This commit is contained in:
parent
3d564b081e
commit
d8a8c1c135
|
@ -19,9 +19,9 @@
|
||||||
<attribute name="org.eclipse.jst.component.dependency" value="/WEB-INF/lib"/>
|
<attribute name="org.eclipse.jst.component.dependency" value="/WEB-INF/lib"/>
|
||||||
</attributes>
|
</attributes>
|
||||||
</classpathentry>
|
</classpathentry>
|
||||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8">
|
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5">
|
||||||
<attributes>
|
<attributes>
|
||||||
<attribute name="owner.project.facets" value="java"/>
|
<attribute name="maven.pomderived" value="true"/>
|
||||||
</attributes>
|
</attributes>
|
||||||
</classpathentry>
|
</classpathentry>
|
||||||
<classpathentry kind="output" path="target/classes"/>
|
<classpathentry kind="output" path="target/classes"/>
|
||||||
|
|
|
@ -171,33 +171,29 @@
|
||||||
</build>
|
</build>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
<java-version>1.7</java-version>
|
<java-version>1.8</java-version>
|
||||||
<!-- Spring -->
|
<!-- Spring -->
|
||||||
<org.springframework.version>4.1.5.RELEASE</org.springframework.version>
|
<org.springframework.version>4.2.4.RELEASE</org.springframework.version>
|
||||||
<org.springframework.security.version>3.2.5.RELEASE</org.springframework.security.version>
|
<org.springframework.security.version>4.0.3.RELEASE</org.springframework.security.version>
|
||||||
|
|
||||||
<org.aspectj-version>1.8.1</org.aspectj-version>
|
<org.aspectj-version>1.8.1</org.aspectj-version>
|
||||||
<javax.servlet.jsp-api.version>2.3.2-b01</javax.servlet.jsp-api.version>
|
<javax.servlet.jsp-api.version>2.3.2-b01</javax.servlet.jsp-api.version>
|
||||||
|
|
||||||
<!-- Spring -->
|
|
||||||
<org.springframework.version>4.1.5.RELEASE</org.springframework.version>
|
|
||||||
<org.springframework.security.version>3.2.5.RELEASE</org.springframework.security.version>
|
|
||||||
|
|
||||||
<!-- persistence -->
|
<!-- persistence -->
|
||||||
<hibernate.version>4.3.10.Final</hibernate.version>
|
<hibernate.version>4.3.11.Final</hibernate.version>
|
||||||
<mysql-connector-java.version>5.1.35</mysql-connector-java.version>
|
<mysql-connector-java.version>5.1.37</mysql-connector-java.version>
|
||||||
<spring-data-jpa.version>1.7.2.RELEASE</spring-data-jpa.version>
|
<spring-data-jpa.version>1.9.2.RELEASE</spring-data-jpa.version>
|
||||||
|
|
||||||
<!-- marshalling -->
|
<!-- marshalling -->
|
||||||
|
|
||||||
<jackson.version>2.5.5</jackson.version>
|
<jackson.version>2.6.4</jackson.version>
|
||||||
|
|
||||||
<!-- logging -->
|
<!-- logging -->
|
||||||
<org.slf4j.version>1.7.13</org.slf4j.version>
|
<org.slf4j.version>1.7.13</org.slf4j.version>
|
||||||
<logback.version>1.1.3</logback.version>
|
<logback.version>1.1.3</logback.version>
|
||||||
|
|
||||||
<!-- various -->
|
<!-- various -->
|
||||||
<hibernate-validator.version>5.1.3.Final</hibernate-validator.version>
|
<hibernate-validator.version>5.2.2.Final</hibernate-validator.version>
|
||||||
|
|
||||||
<!-- util -->
|
<!-- util -->
|
||||||
<guava.version>19.0</guava.version>
|
<guava.version>19.0</guava.version>
|
||||||
|
|
|
@ -2,10 +2,10 @@
|
||||||
<beans:beans xmlns="http://www.springframework.org/schema/security" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:beans="http://www.springframework.org/schema/beans"
|
<beans:beans xmlns="http://www.springframework.org/schema/security" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:beans="http://www.springframework.org/schema/beans"
|
||||||
xmlns:mvc="http://www.springframework.org/schema/mvc"
|
xmlns:mvc="http://www.springframework.org/schema/mvc"
|
||||||
xsi:schemaLocation="
|
xsi:schemaLocation="
|
||||||
http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-3.2.xsd
|
http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-4.0.xsd
|
||||||
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.0.xsd
|
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.2.xsd
|
||||||
http://www.springframework.org/schema/mvc
|
http://www.springframework.org/schema/mvc
|
||||||
http://www.springframework.org/schema/mvc/spring-mvc-3.0.xsd"
|
http://www.springframework.org/schema/mvc/spring-mvc-4.2.xsd"
|
||||||
>
|
>
|
||||||
<http use-expressions="true">
|
<http use-expressions="true">
|
||||||
<intercept-url pattern="/login*" access="permitAll"/>
|
<intercept-url pattern="/login*" access="permitAll"/>
|
||||||
|
@ -21,7 +21,7 @@
|
||||||
<form-login login-page='/login.html' authentication-failure-url="/login.html?error=true" authentication-success-handler-ref="myAuthenticationSuccessHandler"
|
<form-login login-page='/login.html' authentication-failure-url="/login.html?error=true" authentication-success-handler-ref="myAuthenticationSuccessHandler"
|
||||||
default-target-url="home.html"/>
|
default-target-url="home.html"/>
|
||||||
<session-management invalid-session-url="/invalidSession.html" session-fixation-protection="none"/>
|
<session-management invalid-session-url="/invalidSession.html" session-fixation-protection="none"/>
|
||||||
<logout invalidate-session="false" logout-success-url="/logout.html?logSucc=true" logout-url="/j_spring_security_logout" delete-cookies="JSESSIONID"/>
|
<logout invalidate-session="false" logout-success-url="/logout.html?logSucc=true" delete-cookies="JSESSIONID"/>
|
||||||
|
|
||||||
</http>
|
</http>
|
||||||
|
|
||||||
|
|
|
@ -41,15 +41,15 @@
|
||||||
<body>
|
<body>
|
||||||
<h1><spring:message code="label.form.loginTitle"></spring:message></h1>
|
<h1><spring:message code="label.form.loginTitle"></spring:message></h1>
|
||||||
|
|
||||||
<form name='f' action="j_spring_security_check" method='POST' onsubmit="return validate();">
|
<form name='f' action="login" method='POST' onsubmit="return validate();">
|
||||||
<table>
|
<table>
|
||||||
<tr>
|
<tr>
|
||||||
<td><label><spring:message code="label.form.loginEmail"></spring:message></label></td>
|
<td><label><spring:message code="label.form.loginEmail"></spring:message></label></td>
|
||||||
<td><input type='text' name='j_username' value=''></td>
|
<td><input type='text' name='username' value=''></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><label><spring:message code="label.form.loginPass"></spring:message></label></td>
|
<td><label><spring:message code="label.form.loginPass"></spring:message></label></td>
|
||||||
<td><input type='password' name='j_password' /></td>
|
<td><input type='password' name='password' /></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><input name="submit" type="submit" value=<spring:message code="label.form.submit"></spring:message> /></td>
|
<td><input name="submit" type="submit" value=<spring:message code="label.form.submit"></spring:message> /></td>
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
<attribute name="org.eclipse.jst.component.dependency" value="/WEB-INF/lib"/>
|
<attribute name="org.eclipse.jst.component.dependency" value="/WEB-INF/lib"/>
|
||||||
</attributes>
|
</attributes>
|
||||||
</classpathentry>
|
</classpathentry>
|
||||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7">
|
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8">
|
||||||
<attributes>
|
<attributes>
|
||||||
<attribute name="maven.pomderived" value="true"/>
|
<attribute name="maven.pomderived" value="true"/>
|
||||||
</attributes>
|
</attributes>
|
||||||
|
|
|
@ -9,67 +9,108 @@
|
||||||
<name>spring-security-login-and-registration</name>
|
<name>spring-security-login-and-registration</name>
|
||||||
<packaging>war</packaging>
|
<packaging>war</packaging>
|
||||||
|
|
||||||
<parent>
|
|
||||||
<groupId>org.springframework.boot</groupId>
|
|
||||||
<artifactId>spring-boot-starter-parent</artifactId>
|
|
||||||
<version>1.2.6.RELEASE</version>
|
|
||||||
</parent>
|
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
|
||||||
<!-- Spring -->
|
<!-- Spring Security -->
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.springframework.boot</groupId>
|
<groupId>org.springframework.security</groupId>
|
||||||
<artifactId>spring-boot-starter-web</artifactId>
|
<artifactId>spring-security-web</artifactId>
|
||||||
</dependency>
|
<version>${org.springframework.security.version}</version>
|
||||||
<dependency>
|
|
||||||
<groupId>org.springframework</groupId>
|
|
||||||
<artifactId>spring-context-support</artifactId>
|
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.springframework.security</groupId>
|
<groupId>org.springframework.security</groupId>
|
||||||
<artifactId>spring-security-config</artifactId>
|
<artifactId>spring-security-config</artifactId>
|
||||||
|
<version>${org.springframework.security.version}</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework.security</groupId>
|
||||||
|
<artifactId>spring-security-taglibs</artifactId>
|
||||||
|
<version>${org.springframework.security.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<!-- For Spring Boot when running in non-embedded Tomcat -->
|
<!-- Spring -->
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.springframework.boot</groupId>
|
<groupId>org.springframework</groupId>
|
||||||
<artifactId>spring-boot-starter-tomcat</artifactId>
|
<artifactId>spring-core</artifactId>
|
||||||
<scope>provided</scope>
|
<version>${org.springframework.version}</version>
|
||||||
|
<exclusions>
|
||||||
|
<exclusion>
|
||||||
|
<artifactId>commons-logging</artifactId>
|
||||||
|
<groupId>commons-logging</groupId>
|
||||||
|
</exclusion>
|
||||||
|
</exclusions>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.apache.tomcat.embed</groupId>
|
<groupId>org.springframework</groupId>
|
||||||
<artifactId>tomcat-embed-websocket</artifactId>
|
<artifactId>spring-context</artifactId>
|
||||||
<scope>provided</scope>
|
<version>${org.springframework.version}</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework</groupId>
|
||||||
|
<artifactId>spring-context-support</artifactId>
|
||||||
|
<version>${org.springframework.version}</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework</groupId>
|
||||||
|
<artifactId>spring-jdbc</artifactId>
|
||||||
|
<version>${org.springframework.version}</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework</groupId>
|
||||||
|
<artifactId>spring-beans</artifactId>
|
||||||
|
<version>${org.springframework.version}</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework</groupId>
|
||||||
|
<artifactId>spring-aop</artifactId>
|
||||||
|
<version>${org.springframework.version}</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework</groupId>
|
||||||
|
<artifactId>spring-tx</artifactId>
|
||||||
|
<version>${org.springframework.version}</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework</groupId>
|
||||||
|
<artifactId>spring-expression</artifactId>
|
||||||
|
<version>${org.springframework.version}</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework</groupId>
|
||||||
|
<artifactId>spring-web</artifactId>
|
||||||
|
<version>${org.springframework.version}</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework</groupId>
|
||||||
|
<artifactId>spring-webmvc</artifactId>
|
||||||
|
<version>${org.springframework.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<!-- Servlet -->
|
<!-- Servlet -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>javax.servlet</groupId>
|
<groupId>javax.servlet</groupId>
|
||||||
<artifactId>javax.servlet-api</artifactId>
|
<artifactId>javax.servlet-api</artifactId>
|
||||||
|
<version>${javax.servlet.version}</version>
|
||||||
|
<scope>provided</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
|
||||||
<groupId>javax.servlet.jsp</groupId>
|
|
||||||
<artifactId>javax.servlet.jsp-api</artifactId>
|
|
||||||
<version>${javax.servlet.jsp-api.version}</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>javax.servlet</groupId>
|
<groupId>javax.servlet</groupId>
|
||||||
<artifactId>jstl</artifactId>
|
<artifactId>jstl</artifactId>
|
||||||
|
<version>${jstl.version}</version>
|
||||||
|
<scope>runtime</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
|
||||||
<groupId>org.springframework.security</groupId>
|
|
||||||
<artifactId>spring-security-taglibs</artifactId>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>javax.el</groupId>
|
|
||||||
<artifactId>el-api</artifactId>
|
|
||||||
<version>2.2</version>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.springframework</groupId>
|
<groupId>org.springframework</groupId>
|
||||||
<artifactId>spring-test</artifactId>
|
<artifactId>spring-test</artifactId>
|
||||||
|
<version>${org.springframework.version}</version>
|
||||||
<scope>test</scope>
|
<scope>test</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
@ -77,17 +118,19 @@
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.passay</groupId>
|
<groupId>org.passay</groupId>
|
||||||
<artifactId>passay</artifactId>
|
<artifactId>passay</artifactId>
|
||||||
<version>1.0</version>
|
<version>${passay.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<!-- Spring Data JPA dependencies -->
|
<!-- Spring Data JPA dependencies -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.springframework.data</groupId>
|
<groupId>org.springframework.data</groupId>
|
||||||
<artifactId>spring-data-jpa</artifactId>
|
<artifactId>spring-data-jpa</artifactId>
|
||||||
|
<version>${spring-data-jpa.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.hibernate</groupId>
|
<groupId>org.hibernate</groupId>
|
||||||
<artifactId>hibernate-entitymanager</artifactId>
|
<artifactId>hibernate-entitymanager</artifactId>
|
||||||
|
<version>${hibernate.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<!-- <dependency> -->
|
<!-- <dependency> -->
|
||||||
<!-- <groupId>xml-apis</groupId> -->
|
<!-- <groupId>xml-apis</groupId> -->
|
||||||
|
@ -98,25 +141,29 @@
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.hibernate</groupId>
|
<groupId>org.hibernate</groupId>
|
||||||
<artifactId>hibernate-validator</artifactId>
|
<artifactId>hibernate-validator</artifactId>
|
||||||
|
<version>${hibernate-validator.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<!-- DB dependencies -->
|
<!-- DB dependencies -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>mysql</groupId>
|
<groupId>mysql</groupId>
|
||||||
<artifactId>mysql-connector-java</artifactId>
|
<artifactId>mysql-connector-java</artifactId>
|
||||||
|
<version>${mysql-connector-java.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>commons-dbcp</groupId>
|
<groupId>commons-dbcp</groupId>
|
||||||
<artifactId>commons-dbcp</artifactId>
|
<artifactId>commons-dbcp</artifactId>
|
||||||
|
<version>${commons-dbcp.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.fasterxml.jackson.core</groupId>
|
<groupId>com.fasterxml.jackson.core</groupId>
|
||||||
<artifactId>jackson-databind</artifactId>
|
<artifactId>jackson-databind</artifactId>
|
||||||
|
<version>${jackson.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>javax.mail</groupId>
|
<groupId>javax.mail</groupId>
|
||||||
<artifactId>mail</artifactId>
|
<artifactId>mail</artifactId>
|
||||||
<version>1.4.7</version>
|
<version>${javax.mail.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.google.guava</groupId>
|
<groupId>com.google.guava</groupId>
|
||||||
|
@ -128,32 +175,51 @@
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.slf4j</groupId>
|
<groupId>org.slf4j</groupId>
|
||||||
<artifactId>slf4j-api</artifactId>
|
<artifactId>slf4j-api</artifactId>
|
||||||
|
<version>${org.slf4j.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>ch.qos.logback</groupId>
|
<groupId>ch.qos.logback</groupId>
|
||||||
<artifactId>logback-classic</artifactId>
|
<artifactId>logback-classic</artifactId>
|
||||||
|
<version>${logback.version}</version>
|
||||||
|
<!-- <scope>runtime</scope> -->
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.slf4j</groupId>
|
<groupId>org.slf4j</groupId>
|
||||||
<artifactId>jcl-over-slf4j</artifactId>
|
<artifactId>jcl-over-slf4j</artifactId>
|
||||||
|
<version>${org.slf4j.version}</version>
|
||||||
<!-- <scope>runtime</scope> --> <!-- some spring dependencies need to compile against jcl -->
|
<!-- <scope>runtime</scope> --> <!-- some spring dependencies need to compile against jcl -->
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency> <!-- needed to bridge to slf4j for projects that use the log4j APIs directly -->
|
<dependency> <!-- needed to bridge to slf4j for projects that use the log4j APIs directly -->
|
||||||
<groupId>org.slf4j</groupId>
|
<groupId>org.slf4j</groupId>
|
||||||
<artifactId>log4j-over-slf4j</artifactId>
|
<artifactId>log4j-over-slf4j</artifactId>
|
||||||
|
<version>${org.slf4j.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<!-- test -->
|
<!-- test -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>junit</groupId>
|
<groupId>junit</groupId>
|
||||||
<artifactId>junit</artifactId>
|
<artifactId>junit</artifactId>
|
||||||
|
<version>${junit.version}</version>
|
||||||
<scope>test</scope>
|
<scope>test</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.hamcrest</groupId>
|
||||||
|
<artifactId>hamcrest-core</artifactId>
|
||||||
|
<version>${org.hamcrest.version}</version>
|
||||||
|
<scope>test</scope>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.hamcrest</groupId>
|
||||||
|
<artifactId>hamcrest-library</artifactId>
|
||||||
|
<version>${org.hamcrest.version}</version>
|
||||||
|
<scope>test</scope>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.jayway.restassured</groupId>
|
<groupId>com.jayway.restassured</groupId>
|
||||||
<artifactId>rest-assured</artifactId>
|
<artifactId>rest-assured</artifactId>
|
||||||
<version>2.4.0</version>
|
<version>${rest-assured.version}</version>
|
||||||
<scope>test</scope>
|
<scope>test</scope>
|
||||||
<exclusions>
|
<exclusions>
|
||||||
<exclusion>
|
<exclusion>
|
||||||
|
@ -163,6 +229,11 @@
|
||||||
</exclusions>
|
</exclusions>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>javax.el</groupId>
|
||||||
|
<artifactId>el-api</artifactId>
|
||||||
|
<version>2.2</version>
|
||||||
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
<build>
|
<build>
|
||||||
|
@ -181,8 +252,8 @@
|
||||||
<artifactId>maven-compiler-plugin</artifactId>
|
<artifactId>maven-compiler-plugin</artifactId>
|
||||||
<version>${maven-compiler-plugin.version}</version>
|
<version>${maven-compiler-plugin.version}</version>
|
||||||
<configuration>
|
<configuration>
|
||||||
<source>${java-version}</source>
|
<source>1.8</source>
|
||||||
<target>${java-version}</target>
|
<target>1.8</target>
|
||||||
</configuration>
|
</configuration>
|
||||||
</plugin>
|
</plugin>
|
||||||
|
|
||||||
|
@ -192,36 +263,13 @@
|
||||||
<version>${maven-war-plugin.version}</version>
|
<version>${maven-war-plugin.version}</version>
|
||||||
</plugin>
|
</plugin>
|
||||||
|
|
||||||
<plugin>
|
|
||||||
<groupId>org.codehaus.cargo</groupId>
|
|
||||||
<artifactId>cargo-maven2-plugin</artifactId>
|
|
||||||
<version>${cargo-maven2-plugin.version}</version>
|
|
||||||
<configuration>
|
|
||||||
<wait>true</wait>
|
|
||||||
<container>
|
|
||||||
<containerId>tomcat8x</containerId>
|
|
||||||
<type>embedded</type>
|
|
||||||
<systemProperties>
|
|
||||||
<!-- <provPersistenceTarget>cargo</provPersistenceTarget> -->
|
|
||||||
</systemProperties>
|
|
||||||
</container>
|
|
||||||
<configuration>
|
|
||||||
<properties>
|
|
||||||
<cargo.servlet.port>8081</cargo.servlet.port>
|
|
||||||
</properties>
|
|
||||||
</configuration>
|
|
||||||
</configuration>
|
|
||||||
</plugin>
|
|
||||||
|
|
||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
<artifactId>maven-surefire-plugin</artifactId>
|
<artifactId>maven-surefire-plugin</artifactId>
|
||||||
<version>${maven-surefire-plugin.version}</version>
|
<version>${maven-surefire-plugin.version}</version>
|
||||||
<configuration>
|
<configuration>
|
||||||
<testFailureIgnore>true</testFailureIgnore>
|
|
||||||
<excludes>
|
<excludes>
|
||||||
<exclude>**/*IntegrationTest.java</exclude>
|
<!-- <exclude>**/*ProductionTest.java</exclude> -->
|
||||||
<exclude>**/*LiveTest.java</exclude>
|
|
||||||
</excludes>
|
</excludes>
|
||||||
<systemPropertyVariables>
|
<systemPropertyVariables>
|
||||||
<!-- <provPersistenceTarget>h2</provPersistenceTarget> -->
|
<!-- <provPersistenceTarget>h2</provPersistenceTarget> -->
|
||||||
|
@ -229,21 +277,54 @@
|
||||||
</configuration>
|
</configuration>
|
||||||
</plugin>
|
</plugin>
|
||||||
|
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.codehaus.cargo</groupId>
|
||||||
|
<artifactId>cargo-maven2-plugin</artifactId>
|
||||||
|
<version>${cargo-maven2-plugin.version}</version>
|
||||||
|
<configuration>
|
||||||
|
<wait>true</wait>
|
||||||
|
<container>
|
||||||
|
<containerId>jetty8x</containerId>
|
||||||
|
<type>embedded</type>
|
||||||
|
<systemProperties>
|
||||||
|
<!-- <provPersistenceTarget>cargo</provPersistenceTarget> -->
|
||||||
|
</systemProperties>
|
||||||
|
</container>
|
||||||
|
<configuration>
|
||||||
|
<properties>
|
||||||
|
<cargo.servlet.port>8082</cargo.servlet.port>
|
||||||
|
</properties>
|
||||||
|
</configuration>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
|
||||||
</plugins>
|
</plugins>
|
||||||
|
|
||||||
</build>
|
</build>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
<java-version>1.7</java-version>
|
<java-version>1.8</java-version>
|
||||||
<org.springframework-version>4.1.6.RELEASE</org.springframework-version>
|
|
||||||
|
<!-- spring -->
|
||||||
|
<org.springframework.version>4.2.4.RELEASE</org.springframework.version>
|
||||||
<org.springframework.security.version>4.0.3.RELEASE</org.springframework.security.version>
|
<org.springframework.security.version>4.0.3.RELEASE</org.springframework.security.version>
|
||||||
|
|
||||||
|
<!-- persistence -->
|
||||||
|
<hibernate.version>4.3.11.Final</hibernate.version>
|
||||||
|
<hibernate-validator.version>5.2.2.Final</hibernate-validator.version>
|
||||||
|
<mysql-connector-java.version>5.1.37</mysql-connector-java.version>
|
||||||
|
<spring-data-jpa.version>1.9.2.RELEASE</spring-data-jpa.version>
|
||||||
|
|
||||||
|
|
||||||
<!-- logging -->
|
<!-- logging -->
|
||||||
<org.slf4j.version>1.7.13</org.slf4j.version>
|
<org.slf4j.version>1.7.13</org.slf4j.version>
|
||||||
<logback.version>1.1.3</logback.version>
|
<logback.version>1.1.3</logback.version>
|
||||||
|
|
||||||
<!-- javax jsp -->
|
<!-- javax jsp -->
|
||||||
<javax.servlet.jsp-api.version>2.3.2-b01</javax.servlet.jsp-api.version>
|
<javax.servlet.jsp-api.version>2.3.2-b01</javax.servlet.jsp-api.version>
|
||||||
|
<javax.servlet.version>3.0.1</javax.servlet.version>
|
||||||
|
<jstl.version>1.2</jstl.version>
|
||||||
|
|
||||||
<!-- Inject -->
|
<!-- Inject -->
|
||||||
<javax.inject.version>1</javax.inject.version>
|
<javax.inject.version>1</javax.inject.version>
|
||||||
|
|
||||||
|
@ -253,6 +334,14 @@
|
||||||
<!-- guava -->
|
<!-- guava -->
|
||||||
<guava.version>19.0</guava.version>
|
<guava.version>19.0</guava.version>
|
||||||
|
|
||||||
|
<org.hamcrest.version>1.3</org.hamcrest.version>
|
||||||
|
<junit.version>4.12</junit.version>
|
||||||
|
<passay.version>1.0</passay.version>
|
||||||
|
<rest-assured.version>2.4.0</rest-assured.version>
|
||||||
|
<javax.mail.version>1.4.7</javax.mail.version>
|
||||||
|
<jackson.version>2.6.4</jackson.version>
|
||||||
|
<commons-dbcp.version>1.4</commons-dbcp.version>
|
||||||
|
|
||||||
<!-- Maven plugins -->
|
<!-- Maven plugins -->
|
||||||
<cargo-maven2-plugin.version>1.4.17</cargo-maven2-plugin.version>
|
<cargo-maven2-plugin.version>1.4.17</cargo-maven2-plugin.version>
|
||||||
<maven-compiler-plugin.version>3.3</maven-compiler-plugin.version>
|
<maven-compiler-plugin.version>3.3</maven-compiler-plugin.version>
|
||||||
|
|
|
@ -15,7 +15,7 @@ import org.springframework.security.web.authentication.SimpleUrlAuthenticationFa
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
import org.springframework.web.servlet.LocaleResolver;
|
import org.springframework.web.servlet.LocaleResolver;
|
||||||
|
|
||||||
@Component
|
@Component("authenticationFailureHandler")
|
||||||
public class CustomAuthenticationFailureHandler extends SimpleUrlAuthenticationFailureHandler {
|
public class CustomAuthenticationFailureHandler extends SimpleUrlAuthenticationFailureHandler {
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
|
|
|
@ -35,7 +35,7 @@ public class MvcConfig extends WebMvcConfigurerAdapter {
|
||||||
@Override
|
@Override
|
||||||
public void addViewControllers(final ViewControllerRegistry registry) {
|
public void addViewControllers(final ViewControllerRegistry registry) {
|
||||||
super.addViewControllers(registry);
|
super.addViewControllers(registry);
|
||||||
registry.addViewController("/login.html");
|
registry.addViewController("/login");
|
||||||
registry.addViewController("/registration.html");
|
registry.addViewController("/registration.html");
|
||||||
registry.addViewController("/logout.html");
|
registry.addViewController("/logout.html");
|
||||||
registry.addViewController("/homepage.html");
|
registry.addViewController("/homepage.html");
|
||||||
|
|
|
@ -51,7 +51,7 @@ public class SecSecurityConfig extends WebSecurityConfigurerAdapter {
|
||||||
http
|
http
|
||||||
.csrf().disable()
|
.csrf().disable()
|
||||||
.authorizeRequests()
|
.authorizeRequests()
|
||||||
.antMatchers("/j_spring_security_check*","/login*", "/logout*", "/signin/**", "/signup/**",
|
.antMatchers("/login*","/login*", "/logout*", "/signin/**", "/signup/**",
|
||||||
"/user/registration*", "/regitrationConfirm*", "/expiredAccount*", "/registration*",
|
"/user/registration*", "/regitrationConfirm*", "/expiredAccount*", "/registration*",
|
||||||
"/badUser*", "/user/resendRegistrationToken*" ,"/forgetPassword*", "/user/resetPassword*",
|
"/badUser*", "/user/resendRegistrationToken*" ,"/forgetPassword*", "/user/resetPassword*",
|
||||||
"/user/changePassword*", "/emailError*", "/resources/**","/old/user/registration*","/successRegister*").permitAll()
|
"/user/changePassword*", "/emailError*", "/resources/**","/old/user/registration*","/successRegister*").permitAll()
|
||||||
|
@ -59,14 +59,11 @@ public class SecSecurityConfig extends WebSecurityConfigurerAdapter {
|
||||||
.anyRequest().authenticated()
|
.anyRequest().authenticated()
|
||||||
.and()
|
.and()
|
||||||
.formLogin()
|
.formLogin()
|
||||||
.loginPage("/login.html")
|
.loginPage("/login")
|
||||||
.loginProcessingUrl("/j_spring_security_check")
|
|
||||||
.defaultSuccessUrl("/homepage.html")
|
.defaultSuccessUrl("/homepage.html")
|
||||||
.failureUrl("/login.html?error=true")
|
.failureUrl("/login?error=true")
|
||||||
.successHandler(myAuthenticationSuccessHandler)
|
.successHandler(myAuthenticationSuccessHandler)
|
||||||
.failureHandler(authenticationFailureHandler)
|
.failureHandler(authenticationFailureHandler)
|
||||||
.usernameParameter("j_username")
|
|
||||||
.passwordParameter("j_password")
|
|
||||||
.permitAll()
|
.permitAll()
|
||||||
.and()
|
.and()
|
||||||
.sessionManagement()
|
.sessionManagement()
|
||||||
|
@ -75,7 +72,6 @@ public class SecSecurityConfig extends WebSecurityConfigurerAdapter {
|
||||||
.and()
|
.and()
|
||||||
.logout()
|
.logout()
|
||||||
.invalidateHttpSession(false)
|
.invalidateHttpSession(false)
|
||||||
.logoutUrl("/j_spring_security_logout")
|
|
||||||
.logoutSuccessUrl("/logout.html?logSucc=true")
|
.logoutSuccessUrl("/logout.html?logSucc=true")
|
||||||
.deleteCookies("JSESSIONID")
|
.deleteCookies("JSESSIONID")
|
||||||
.permitAll();
|
.permitAll();
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
<beans:beans xmlns="http://www.springframework.org/schema/security" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:beans="http://www.springframework.org/schema/beans"
|
<beans:beans xmlns="http://www.springframework.org/schema/security" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:beans="http://www.springframework.org/schema/beans"
|
||||||
xsi:schemaLocation="
|
xsi:schemaLocation="
|
||||||
http://www.springframework.org/schema/security
|
http://www.springframework.org/schema/security
|
||||||
http://www.springframework.org/schema/security/spring-security.xsd
|
http://www.springframework.org/schema/security/spring-security-4.0.xsd
|
||||||
http://www.springframework.org/schema/beans
|
http://www.springframework.org/schema/beans
|
||||||
http://www.springframework.org/schema/beans/spring-beans-4.2.xsd"
|
http://www.springframework.org/schema/beans/spring-beans-4.2.xsd"
|
||||||
>
|
>
|
||||||
|
@ -28,10 +28,17 @@
|
||||||
<intercept-url pattern="/resources/**" access="permitAll"/>
|
<intercept-url pattern="/resources/**" access="permitAll"/>
|
||||||
<intercept-url pattern="/invalidSession*" access="isAnonymous()"/>
|
<intercept-url pattern="/invalidSession*" access="isAnonymous()"/>
|
||||||
<intercept-url pattern="/**" access="isAuthenticated()"/>
|
<intercept-url pattern="/**" access="isAuthenticated()"/>
|
||||||
<form-login login-page='/login.html' authentication-failure-url="/login.html?error=true" authentication-success-handler-ref="myAuthenticationSuccessHandler"
|
|
||||||
default-target-url="/homepage.html"/>
|
<csrf disabled="true"/>
|
||||||
<session-management invalid-session-url="/invalidSession.html" session-fixation-protection="none"/>
|
|
||||||
<logout invalidate-session="false" logout-success-url="/logout.html?logSucc=true" logout-url="/j_spring_security_logout" delete-cookies="JSESSIONID"/>
|
<form-login login-page='/login'
|
||||||
|
authentication-success-handler-ref="myAuthenticationSuccessHandler"
|
||||||
|
authentication-failure-handler-ref="authenticationFailureHandler"
|
||||||
|
default-target-url="/homepage"/>
|
||||||
|
|
||||||
|
<session-management invalid-session-url="/invalidSession" session-fixation-protection="none"/>
|
||||||
|
|
||||||
|
<logout invalidate-session="false" logout-success-url="/logoutPage?logSucc=true" delete-cookies="JSESSIONID"/>
|
||||||
</http>
|
</http>
|
||||||
|
|
||||||
<authentication-manager>
|
<authentication-manager>
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
<a class="navbar-brand"href="<c:url value="/home.html" />"><spring:message code="label.pages.home.title"></spring:message></a>
|
<a class="navbar-brand"href="<c:url value="/home.html" />"><spring:message code="label.pages.home.title"></spring:message></a>
|
||||||
</div>
|
</div>
|
||||||
<ul class="nav navbar-nav navbar-right">
|
<ul class="nav navbar-nav navbar-right">
|
||||||
<li><a href="<c:url value="/j_spring_security_logout" />"><spring:message code="label.pages.logout"></spring:message></a> </li>
|
<li><a href="<c:url value="/logout" />"><spring:message code="label.pages.logout"></spring:message></a> </li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</nav>
|
</nav>
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
<a class="navbar-brand"href="#"><spring:message code="label.pages.home.title"></spring:message></a>
|
<a class="navbar-brand"href="#"><spring:message code="label.pages.home.title"></spring:message></a>
|
||||||
</div>
|
</div>
|
||||||
<ul class="nav navbar-nav navbar-right">
|
<ul class="nav navbar-nav navbar-right">
|
||||||
<li><a href="<c:url value="/j_spring_security_logout" />"><spring:message code="label.pages.logout"></spring:message></a> </li>
|
<li><a href="<c:url value="/logout" />"><spring:message code="label.pages.logout"></spring:message></a> </li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</nav>
|
</nav>
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
<a class="navbar-brand"href="<c:url value="/home.html" />"><spring:message code="label.pages.home.title"></spring:message></a>
|
<a class="navbar-brand"href="<c:url value="/home.html" />"><spring:message code="label.pages.home.title"></spring:message></a>
|
||||||
</div>
|
</div>
|
||||||
<ul class="nav navbar-nav navbar-right">
|
<ul class="nav navbar-nav navbar-right">
|
||||||
<li><a href="<c:url value="/j_spring_security_logout" />"><spring:message code="label.pages.logout"></spring:message></a> </li>
|
<li><a href="<c:url value="/logout" />"><spring:message code="label.pages.logout"></spring:message></a> </li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</nav>
|
</nav>
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
<a class="navbar-brand"href="#"><spring:message code="label.pages.home.title"></spring:message></a>
|
<a class="navbar-brand"href="#"><spring:message code="label.pages.home.title"></spring:message></a>
|
||||||
</div>
|
</div>
|
||||||
<ul class="nav navbar-nav navbar-right">
|
<ul class="nav navbar-nav navbar-right">
|
||||||
<li><a href="<c:url value="/j_spring_security_logout" />"><spring:message code="label.pages.logout"></spring:message></a> </li>
|
<li><a href="<c:url value="/logout" />"><spring:message code="label.pages.logout"></spring:message></a> </li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</nav>
|
</nav>
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
<a class="navbar-brand"href="<c:url value="/home.html" />"><spring:message code="label.pages.home.title"></spring:message></a>
|
<a class="navbar-brand"href="<c:url value="/home.html" />"><spring:message code="label.pages.home.title"></spring:message></a>
|
||||||
</div>
|
</div>
|
||||||
<ul class="nav navbar-nav navbar-right">
|
<ul class="nav navbar-nav navbar-right">
|
||||||
<li><a href="<c:url value="/j_spring_security_logout" />"><spring:message code="label.pages.logout"></spring:message></a> </li>
|
<li><a href="<c:url value="/logout" />"><spring:message code="label.pages.logout"></spring:message></a> </li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</nav>
|
</nav>
|
||||||
|
|
|
@ -58,18 +58,17 @@ ${SPRING_SECURITY_LAST_EXCEPTION}
|
||||||
<spring:message code="label.form.loginTitle"></spring:message>
|
<spring:message code="label.form.loginTitle"></spring:message>
|
||||||
</h1>
|
</h1>
|
||||||
<a href="?lang=en"><spring:message code="label.form.loginEnglish"></spring:message></a>
|
<a href="?lang=en"><spring:message code="label.form.loginEnglish"></spring:message></a>
|
||||||
| <a href="?lang=es_ES"><spring:message
|
| <a href="?lang=es_ES"><spring:message code="label.form.loginSpanish"></spring:message></a>
|
||||||
code="label.form.loginSpanish"></spring:message></a>
|
|
||||||
<br><br>
|
<br><br>
|
||||||
<form name='f' action="j_spring_security_check" method='POST'
|
|
||||||
onsubmit="return validate();">
|
<form name='f' action="login" method='POST' onsubmit="return validate();">
|
||||||
|
|
||||||
<label class="col-sm-4"><spring:message code="label.form.loginEmail"></spring:message></label>
|
<label class="col-sm-4"><spring:message code="label.form.loginEmail"></spring:message></label>
|
||||||
<span class="col-sm-8"><input class="form-control" type='text' name='j_username' value=''></span>
|
<span class="col-sm-8"><input class="form-control" type='text' name='username' value=''></span>
|
||||||
|
|
||||||
<br><br>
|
<br><br>
|
||||||
<label class="col-sm-4"><spring:message code="label.form.loginPass"></spring:message></label>
|
<label class="col-sm-4"><spring:message code="label.form.loginPass"></spring:message></label>
|
||||||
<span class="col-sm-8"><input class="form-control" type='password' name='j_password' /></span>
|
<span class="col-sm-8"><input class="form-control" type='password' name='password' /></span>
|
||||||
|
|
||||||
<br><br>
|
<br><br>
|
||||||
<input class="btn btn-primary" name="submit" type="submit"
|
<input class="btn btn-primary" name="submit" type="submit"
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
<spring:message code="message.logoutSucc"></spring:message>
|
<spring:message code="message.logoutSucc"></spring:message>
|
||||||
</h1>
|
</h1>
|
||||||
</c:if>
|
</c:if>
|
||||||
<a class="btn btn-primary" href="<c:url value="login.html" />"><spring:message
|
<a class="btn btn-primary" href="<c:url value="login" />"><spring:message
|
||||||
code="label.form.loginLink"></spring:message></a>
|
code="label.form.loginLink"></spring:message></a>
|
||||||
</div>
|
</div>
|
||||||
</body>
|
</body>
|
||||||
|
|
|
@ -38,7 +38,7 @@ public class ChangePasswordLiveTest {
|
||||||
@Autowired
|
@Autowired
|
||||||
private PasswordEncoder passwordEncoder;
|
private PasswordEncoder passwordEncoder;
|
||||||
|
|
||||||
private final FormAuthConfig formConfig = new FormAuthConfig(URL_PREFIX + "/j_spring_security_check", "j_username", "j_password");
|
private final FormAuthConfig formConfig = new FormAuthConfig(URL_PREFIX + "/login", "username", "password");
|
||||||
|
|
||||||
@Before
|
@Before
|
||||||
public void init() {
|
public void init() {
|
||||||
|
|
Loading…
Reference in New Issue