Skip to content

featuriz/Spring-boot-mvc-db

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Spring-boot-mvc-db

Featuriz guide to Spring Framework 5.

Technology and Version

Spring Version
Spring Boot 2.6.0
Spring web 5.3.13
Spring Security 5.6.0
Spring Test 5.3.13
Thymeleaf 3.0.12.RELEASE
Spring JPA 2.6.0
Mariadb 2.7.4
Lombok 1.18.22
Validation 2.6.0
Bootstrap 5.0.2
  • Database based authentication is provided.

How to use

This is a maven based spring boot project. Use maven to build this project and just run.
No other dependencies

Database

Create an empty database with the name tut_sb_mvc_db - If already exist - truncate - spring.sql.init.mode=never Note: Change to always, only for first run - data will be automatically added from data.sql from resources folder.

Error

If there is no role in DB table, then it will throw error while registering new User.

NOTE

IndexController

Page Role Info
/ - Homepage
/login - Custom Login Form
/registration - Custom Registration Form
/user USER Only user can view
/admin ADMIN Only admin can view
/all ADMIN, USER Only admin nd user can view
/anonymous anonymous Only anonymous can view
/accessDenied - Anyone can view

Login

Username Password
sudhakar sudhakar
user1 user1Pass
user2 user2Pass

This is for education purpose only.

About

Spring Boot MVC - Auth using DB (Mariadb)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages