Skip to content

A simple Spring Security user authentification using Java, Spring Boot, MySQL and Thymeleaf templates.

Notifications You must be signed in to change notification settings

calinotheca/SpringSecurityLogin1

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Tutorial

1. Used components

Colorlib form template

2. Create database and user

a. Create database

mysql> create database springSecurityLogin1;

b. Create database user identified by custom password.

mysql> create user 'springSecurityLogin1'@'localhost' identified by '<password>';

c. Set grant privileges on database to user.

mysql> grant all privileges on springSecurityLogin1.* to 'springSecurityLogin1'@'localhost';
mysql> flush privileges;

3. Clone git code and change settings in application.properties.

# aplication.properties
# MySQL database configuration
spring.datasource.url=jdbc:mysql://localhost:3306/springSecurityLogin1?useUnicode=true&characterEncoding=UTF-8&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=UTC&useSSL=false&allowPublicKeyRetrieval=true
spring.datasource.username=springSecurityLogin1
spring.datasource.password=<password>
spring.datasource.sqlScriptEncoding=UTF-8
spring.jpa.hibernate.ddl-auto=create
spring.datasource.initialization-mode=always

#servler
server.servlet.context-path=/
server.port=8080

4. Screenshots

Image1 Image1

About

A simple Spring Security user authentification using Java, Spring Boot, MySQL and Thymeleaf templates.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published