Skip to content

Commit 87283a9

Browse files
committed
add spring registration front end
1 parent e86cc29 commit 87283a9

File tree

65 files changed

+3444
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

65 files changed

+3444
-0
lines changed
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<classpath>
3+
<classpathentry kind="src" output="target/classes" path="src/main/java">
4+
<attributes>
5+
<attribute name="optional" value="true"/>
6+
<attribute name="maven.pomderived" value="true"/>
7+
</attributes>
8+
</classpathentry>
9+
<classpathentry excluding="**" kind="src" output="target/classes" path="src/main/resources">
10+
<attributes>
11+
<attribute name="maven.pomderived" value="true"/>
12+
</attributes>
13+
</classpathentry>
14+
<classpathentry kind="src" output="target/test-classes" path="src/test/java">
15+
<attributes>
16+
<attribute name="optional" value="true"/>
17+
<attribute name="maven.pomderived" value="true"/>
18+
</attributes>
19+
</classpathentry>
20+
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7">
21+
<attributes>
22+
<attribute name="maven.pomderived" value="true"/>
23+
</attributes>
24+
</classpathentry>
25+
<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
26+
<attributes>
27+
<attribute name="maven.pomderived" value="true"/>
28+
<attribute name="org.eclipse.jst.component.dependency" value="/WEB-INF/lib"/>
29+
</attributes>
30+
</classpathentry>
31+
<classpathentry kind="output" path="target/classes"/>
32+
</classpath>
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<projectDescription>
3+
<name>spring-security-login-and-registration-frontend</name>
4+
<comment></comment>
5+
<projects>
6+
</projects>
7+
<buildSpec>
8+
<buildCommand>
9+
<name>org.eclipse.wst.jsdt.core.javascriptValidator</name>
10+
<arguments>
11+
</arguments>
12+
</buildCommand>
13+
<buildCommand>
14+
<name>org.eclipse.jdt.core.javabuilder</name>
15+
<arguments>
16+
</arguments>
17+
</buildCommand>
18+
<buildCommand>
19+
<name>org.eclipse.wst.common.project.facet.core.builder</name>
20+
<arguments>
21+
</arguments>
22+
</buildCommand>
23+
<buildCommand>
24+
<name>org.eclipse.m2e.core.maven2Builder</name>
25+
<arguments>
26+
</arguments>
27+
</buildCommand>
28+
<buildCommand>
29+
<name>org.springframework.ide.eclipse.core.springbuilder</name>
30+
<arguments>
31+
</arguments>
32+
</buildCommand>
33+
<buildCommand>
34+
<name>org.eclipse.wst.validation.validationbuilder</name>
35+
<arguments>
36+
</arguments>
37+
</buildCommand>
38+
</buildSpec>
39+
<natures>
40+
<nature>org.eclipse.jem.workbench.JavaEMFNature</nature>
41+
<nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature>
42+
<nature>org.springframework.ide.eclipse.core.springnature</nature>
43+
<nature>org.eclipse.jdt.core.javanature</nature>
44+
<nature>org.eclipse.m2e.core.maven2Nature</nature>
45+
<nature>org.eclipse.wst.common.project.facet.core.nature</nature>
46+
<nature>org.eclipse.wst.jsdt.core.jsNature</nature>
47+
</natures>
48+
</projectDescription>
Lines changed: 192 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,192 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
3+
<modelVersion>4.0.0</modelVersion>
4+
<groupId>org.baeldung</groupId>
5+
<artifactId>spring-security-login-and-registration-frontend</artifactId>
6+
<name>spring-security-login-and-registration-frontend</name>
7+
<packaging>war</packaging>
8+
<version>1.0.1-SNAPSHOT</version>
9+
10+
<parent>
11+
<groupId>org.springframework.boot</groupId>
12+
<artifactId>spring-boot-starter-parent</artifactId>
13+
<version>1.1.10.RELEASE</version>
14+
</parent>
15+
16+
<dependencies>
17+
18+
<!-- Spring -->
19+
<dependency>
20+
<groupId>org.springframework.boot</groupId>
21+
<artifactId>spring-boot-starter-web</artifactId>
22+
</dependency>
23+
<dependency>
24+
<groupId>org.springframework</groupId>
25+
<artifactId>spring-context-support</artifactId>
26+
</dependency>
27+
<dependency>
28+
<groupId>org.springframework.security</groupId>
29+
<artifactId>spring-security-config</artifactId>
30+
<scope>runtime</scope>
31+
</dependency>
32+
33+
<!-- <dependency> -->
34+
<!-- <groupId>javax.inject</groupId> -->
35+
<!-- <artifactId>javax.inject</artifactId> -->
36+
<!-- <version>${javax.inject.version}</version> -->
37+
<!-- </dependency> -->
38+
39+
<!-- Servlet -->
40+
<dependency>
41+
<groupId>javax.servlet</groupId>
42+
<artifactId>javax.servlet-api</artifactId>
43+
</dependency>
44+
<dependency>
45+
<groupId>javax.servlet.jsp</groupId>
46+
<artifactId>javax.servlet.jsp-api</artifactId>
47+
<version>${javax.servlet.jsp-api.version}</version>
48+
</dependency>
49+
<dependency>
50+
<groupId>javax.servlet</groupId>
51+
<artifactId>jstl</artifactId>
52+
</dependency>
53+
<dependency>
54+
<groupId>org.springframework.security</groupId>
55+
<artifactId>spring-security-taglibs</artifactId>
56+
</dependency>
57+
<dependency>
58+
<groupId>javax.el</groupId>
59+
<artifactId>el-api</artifactId>
60+
<version>2.2</version>
61+
</dependency>
62+
63+
<dependency>
64+
<groupId>org.springframework</groupId>
65+
<artifactId>spring-test</artifactId>
66+
<version>4.1.4.RELEASE</version>
67+
<scope>test</scope>
68+
</dependency>
69+
70+
<!-- Spring Data JPA dependencies -->
71+
<dependency>
72+
<groupId>org.springframework.data</groupId>
73+
<artifactId>spring-data-jpa</artifactId>
74+
</dependency>
75+
<dependency>
76+
<groupId>org.hibernate</groupId>
77+
<artifactId>hibernate-entitymanager</artifactId>
78+
</dependency>
79+
<!-- <dependency> -->
80+
<!-- <groupId>xml-apis</groupId> -->
81+
<!-- <artifactId>xml-apis</artifactId> -->
82+
<!-- <version>1.4.01</version> -->
83+
<!-- </dependency> -->
84+
85+
<dependency>
86+
<groupId>org.hibernate</groupId>
87+
<artifactId>hibernate-validator</artifactId>
88+
</dependency>
89+
90+
<!-- DB dependencies -->
91+
<dependency>
92+
<groupId>mysql</groupId>
93+
<artifactId>mysql-connector-java</artifactId>
94+
</dependency>
95+
<dependency>
96+
<groupId>commons-dbcp</groupId>
97+
<artifactId>commons-dbcp</artifactId>
98+
</dependency>
99+
<dependency>
100+
<groupId>com.fasterxml.jackson.core</groupId>
101+
<artifactId>jackson-databind</artifactId>
102+
</dependency>
103+
<dependency>
104+
<groupId>javax.mail</groupId>
105+
<artifactId>mail</artifactId>
106+
<version>1.4.7</version>
107+
</dependency>
108+
<dependency>
109+
<groupId>com.google.guava</groupId>
110+
<artifactId>guava</artifactId>
111+
<version>${guava.version}</version>
112+
</dependency>
113+
114+
<!-- logging -->
115+
<dependency>
116+
<groupId>org.slf4j</groupId>
117+
<artifactId>slf4j-api</artifactId>
118+
</dependency>
119+
<dependency>
120+
<groupId>ch.qos.logback</groupId>
121+
<artifactId>logback-classic</artifactId>
122+
</dependency>
123+
<dependency>
124+
<groupId>org.slf4j</groupId>
125+
<artifactId>jcl-over-slf4j</artifactId>
126+
<!-- <scope>runtime</scope> --> <!-- some spring dependencies need to compile against jcl -->
127+
</dependency>
128+
<dependency> <!-- needed to bridge to slf4j for projects that use the log4j APIs directly -->
129+
<groupId>org.slf4j</groupId>
130+
<artifactId>log4j-over-slf4j</artifactId>
131+
</dependency>
132+
133+
<!-- test -->
134+
<dependency>
135+
<groupId>junit</groupId>
136+
<artifactId>junit</artifactId>
137+
<scope>test</scope>
138+
</dependency>
139+
140+
</dependencies>
141+
142+
<build>
143+
<finalName>spring-security-login-and-registration-frontend</finalName>
144+
<resources>
145+
<resource>
146+
<directory>src/main/resources</directory>
147+
<filtering>true</filtering>
148+
</resource>
149+
</resources>
150+
151+
<plugins>
152+
153+
<plugin>
154+
<groupId>org.apache.maven.plugins</groupId>
155+
<artifactId>maven-compiler-plugin</artifactId>
156+
<configuration>
157+
<source>${java-version}</source>
158+
<target>${java-version}</target>
159+
</configuration>
160+
</plugin>
161+
162+
<plugin>
163+
<groupId>org.apache.maven.plugins</groupId>
164+
<artifactId>maven-war-plugin</artifactId>
165+
</plugin>
166+
167+
</plugins>
168+
</build>
169+
170+
<properties>
171+
<java-version>1.7</java-version>
172+
<org.springframework-version>3.1.4.RELEASE</org.springframework-version>
173+
<org.springframework.security.version>3.2.5.RELEASE</org.springframework.security.version>
174+
175+
<!-- logging -->
176+
<org.slf4j.version>1.7.7</org.slf4j.version>
177+
<logback.version>1.1.2</logback.version>
178+
179+
<!-- javax jsp -->
180+
<javax.servlet.jsp-api.version>2.3.2-b01</javax.servlet.jsp-api.version>
181+
182+
<!-- Inject -->
183+
<javax.inject.version>1</javax.inject.version>
184+
185+
<!-- Spring Data Jpa -->
186+
<spring-data-jpa.version>1.7.1.RELEASE</spring-data-jpa.version>
187+
188+
<!-- guava -->
189+
<guava.version>18.0</guava.version>
190+
191+
</properties>
192+
</project>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
package org.baeldung.persistence.dao;
2+
3+
import org.baeldung.persistence.model.PasswordResetToken;
4+
import org.baeldung.persistence.model.User;
5+
import org.springframework.data.jpa.repository.JpaRepository;
6+
7+
public interface PasswordResetTokenRepository extends JpaRepository<PasswordResetToken, Long> {
8+
9+
public PasswordResetToken findByToken(String token);
10+
11+
public PasswordResetToken findByUser(User user);
12+
}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
package org.baeldung.persistence.dao;
2+
3+
import org.baeldung.persistence.model.Privilege;
4+
import org.springframework.data.jpa.repository.JpaRepository;
5+
6+
public interface PrivilegeRepository extends JpaRepository<Privilege, Long> {
7+
public Privilege findByName(String name);
8+
9+
public void delete(Privilege privilege);
10+
}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
package org.baeldung.persistence.dao;
2+
3+
import org.baeldung.persistence.model.Role;
4+
import org.springframework.data.jpa.repository.JpaRepository;
5+
6+
public interface RoleRepository extends JpaRepository<Role, Long> {
7+
public Role findByName(String name);
8+
9+
public void delete(Role role);
10+
}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
package org.baeldung.persistence.dao;
2+
3+
import org.springframework.data.jpa.repository.JpaRepository;
4+
import org.baeldung.persistence.model.User;
5+
6+
public interface UserRepository extends JpaRepository<User, Long> {
7+
public User findByEmail(String email);
8+
9+
public void delete(User user);
10+
11+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
package org.baeldung.persistence.dao;
2+
3+
import org.baeldung.persistence.model.User;
4+
import org.baeldung.persistence.model.VerificationToken;
5+
import org.springframework.data.jpa.repository.JpaRepository;
6+
7+
public interface VerificationTokenRepository extends JpaRepository<VerificationToken, Long> {
8+
9+
public VerificationToken findByToken(String token);
10+
11+
public VerificationToken findByUser(User user);
12+
}

0 commit comments

Comments
 (0)