Skip to content

Commit 631d12b

Browse files
authored
Add files via upload
0 parents  commit 631d12b

Some content is hidden

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

43 files changed

+859
-0
lines changed

README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# SpringSecurityLoginTutorial
2+
3+
1. mvn clean
4+
2. mvn clean install
5+
3. Go to the target folder
6+
4. java -jar demo-0.0.1-SNAPSHOT.ja
7+
8+
- http://localhost:8080/registration
9+
- http://localhost:8080/login
10+

pom.xml

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
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"
3+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
4+
<modelVersion>4.0.0</modelVersion>
5+
6+
<groupId>com.example</groupId>
7+
<artifactId>demo</artifactId>
8+
<version>0.0.1-SNAPSHOT</version>
9+
<packaging>jar</packaging>
10+
11+
<name>demo</name>
12+
<description>Demo project for Spring Boot</description>
13+
14+
<parent>
15+
<groupId>org.springframework.boot</groupId>
16+
<artifactId>spring-boot-starter-parent</artifactId>
17+
<version>1.4.2.RELEASE</version>
18+
<relativePath /> <!-- lookup parent from repository -->
19+
</parent>
20+
21+
<properties>
22+
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
23+
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
24+
<java.version>1.8</java.version>
25+
</properties>
26+
27+
<dependencies>
28+
<dependency>
29+
<groupId>org.springframework.boot</groupId>
30+
<artifactId>spring-boot-starter-data-jpa</artifactId>
31+
</dependency>
32+
<dependency>
33+
<groupId>org.springframework.boot</groupId>
34+
<artifactId>spring-boot-starter-security</artifactId>
35+
</dependency>
36+
<dependency>
37+
<groupId>org.springframework.boot</groupId>
38+
<artifactId>spring-boot-starter-thymeleaf</artifactId>
39+
</dependency>
40+
41+
<dependency>
42+
<groupId>org.springframework.boot</groupId>
43+
<artifactId>spring-boot-starter-web</artifactId>
44+
</dependency>
45+
46+
<dependency>
47+
<groupId>mysql</groupId>
48+
<artifactId>mysql-connector-java</artifactId>
49+
<scope>runtime</scope>
50+
</dependency>
51+
<dependency>
52+
<groupId>org.springframework.boot</groupId>
53+
<artifactId>spring-boot-starter-test</artifactId>
54+
<scope>test</scope>
55+
</dependency>
56+
57+
<!-- https://mvnrepository.com/artifact/net.sourceforge.nekohtml/nekohtml -->
58+
<dependency>
59+
<groupId>net.sourceforge.nekohtml</groupId>
60+
<artifactId>nekohtml</artifactId>
61+
<version>1.9.21</version><!--$NO-MVN-MAN-VER$-->
62+
</dependency>
63+
64+
65+
</dependencies>
66+
67+
<build>
68+
<plugins>
69+
<plugin>
70+
<groupId>org.springframework.boot</groupId>
71+
<artifactId>spring-boot-maven-plugin</artifactId>
72+
</plugin>
73+
</plugins>
74+
</build>
75+
76+
77+
</project>
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
Manifest-Version: 1.0
2+
Built-By: samuelf
3+
Build-Jdk: 10.0.1
4+
Implementation-Title: demo
5+
Implementation-Version: 0.0.1-SNAPSHOT
6+
Implementation-Vendor-Id: com.example
7+
Implementation-Vendor: Pivotal Software, Inc.
8+
Implementation-URL: http://projects.spring.io/spring-boot/demo/
9+
Created-By: Maven Integration for Eclipse
10+
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#Generated by Maven Integration for Eclipse
2+
#Mon Jul 09 10:07:08 BST 2018
3+
m2e.projectLocation=C\:\\Users\\samuelf\\Desktop\\SpringSecurityLoginTutorial-master
4+
m2e.projectName=demo
5+
groupId=com.example
6+
artifactId=demo
7+
version=0.0.1-SNAPSHOT
Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
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"
3+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
4+
<modelVersion>4.0.0</modelVersion>
5+
6+
<groupId>com.example</groupId>
7+
<artifactId>demo</artifactId>
8+
<version>0.0.1-SNAPSHOT</version>
9+
<packaging>jar</packaging>
10+
11+
<name>demo</name>
12+
<description>Demo project for Spring Boot</description>
13+
14+
<parent>
15+
<groupId>org.springframework.boot</groupId>
16+
<artifactId>spring-boot-starter-parent</artifactId>
17+
<version>1.4.2.RELEASE</version>
18+
<relativePath /> <!-- lookup parent from repository -->
19+
</parent>
20+
21+
<properties>
22+
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
23+
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
24+
<java.version>1.8</java.version>
25+
</properties>
26+
27+
<dependencies>
28+
<dependency>
29+
<groupId>org.springframework.boot</groupId>
30+
<artifactId>spring-boot-starter-data-jpa</artifactId>
31+
</dependency>
32+
<dependency>
33+
<groupId>org.springframework.boot</groupId>
34+
<artifactId>spring-boot-starter-security</artifactId>
35+
</dependency>
36+
<dependency>
37+
<groupId>org.springframework.boot</groupId>
38+
<artifactId>spring-boot-starter-thymeleaf</artifactId>
39+
</dependency>
40+
41+
<dependency>
42+
<groupId>org.springframework.boot</groupId>
43+
<artifactId>spring-boot-starter-web</artifactId>
44+
</dependency>
45+
46+
<dependency>
47+
<groupId>mysql</groupId>
48+
<artifactId>mysql-connector-java</artifactId>
49+
<scope>runtime</scope>
50+
</dependency>
51+
<dependency>
52+
<groupId>org.springframework.boot</groupId>
53+
<artifactId>spring-boot-starter-test</artifactId>
54+
<scope>test</scope>
55+
</dependency>
56+
57+
<!-- https://mvnrepository.com/artifact/net.sourceforge.nekohtml/nekohtml -->
58+
<dependency>
59+
<groupId>net.sourceforge.nekohtml</groupId>
60+
<artifactId>nekohtml</artifactId>
61+
<version>1.9.21</version><!--$NO-MVN-MAN-VER$-->
62+
</dependency>
63+
64+
65+
</dependencies>
66+
67+
<build>
68+
<plugins>
69+
<plugin>
70+
<groupId>org.springframework.boot</groupId>
71+
<artifactId>spring-boot-maven-plugin</artifactId>
72+
</plugin>
73+
</plugins>
74+
</build>
75+
76+
77+
</project>
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# ===============================
2+
# = DATA SOURCE
3+
# ===============================
4+
spring.datasource.url = jdbc:mysql://localhost:3306/spring-security-tutorial
5+
spring.datasource.username = root
6+
spring.datasource.password =
7+
spring.datasource.testWhileIdle = true
8+
spring.datasource.validationQuery = SELECT 1
9+
10+
# ===============================
11+
# = JPA / HIBERNATE
12+
# ===============================
13+
spring.jpa.show-sql = true
14+
spring.jpa.hibernate.ddl-auto = update
15+
spring.jpa.hibernate.naming-strategy = org.hibernate.cfg.ImprovedNamingStrategy
16+
spring.jpa.properties.hibernate.dialect = org.hibernate.dialect.MySQL5Dialect
17+
18+
# ===============================
19+
# = Thymeleaf configurations
20+
# ===============================
21+
spring.thymeleaf.mode=LEGACYHTML5
22+
spring.thymeleaf.cache=false
23+
24+
# ==============================================================
25+
# = Spring Security / Queries for AuthenticationManagerBuilder
26+
# ==============================================================
27+
spring.queries.users-query=select email, password, active from user where email=?
28+
spring.queries.roles-query=select u.email, r.role from user u inner join user_role ur on(u.user_id=ur.user_id) inner join role r on(ur.role_id=r.role_id) where u.email=?
694 Bytes
Binary file not shown.
Binary file not shown.
467 Bytes
Binary file not shown.
2.7 KB
Binary file not shown.

0 commit comments

Comments
 (0)