yuhang2685 / Demo-Spring-Security

In this project we explore Spring Security with JPA and MySQL.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Demo-Spring-Security

Author: Dr. YUHANG ZHAO

Overview:

STEP1: Adding Spring security to a Spring Boot project.

By adding security dependency, the URLs are protected by Spring security.

To login, the default username is "user" and password is shown in console.

STEP2: Configure authentication and authorization.

Use a class which extends WebSecurityConfigurerAdapter where we override UserDetailsService and make it a Bean.

Therefore, we have an "in-memory-user-details".

STEP3. Authentication and authorization using JPA and MySQL.

We do authentication and authorization using user credentials stored in DB.

We can also encrypt password by hashing such as "Bcrypt". Login

Reference:

About

In this project we explore Spring Security with JPA and MySQL.


Languages

Language:Java 100.0%