Skip to content

These examples include both Springboot-Security examples using in-memory setup and database setup

Notifications You must be signed in to change notification settings

Md-MamunAbdulKayum/springboot-security-examples

Repository files navigation

springboot-security-examples

These examples include both Springboot-Security example using in-memory setup and database setup

For in-memory Spring security setup:

Run the project as a Java project and hit the below URL in your browser:
http://localhost:8888/SpringSecurityInMemorySetup/

Login page:

loginpage

Invalid Input page:

invalidinput

With Role Employee and Admin page:

emaployeeandadmin

With Role Employee and Hr-Manager page:

emaployeeandadmin

With Role Employee and Manager page:

withRoleEmployeeAndManager

Logout page:

logoutpage

For Database-JDBC Spring security setup:

Run the project as a Java project and hit the below URL in your browser:
http://localhost:8889/SpringSecurityInMemorySetup/

Before runing the project, run the sql script springsectest.sql. I have used maria DB. I have several users for testing the security:

user               pass 
-------------------------------------- mamun mamun111
sourav sourav111
kayum kayum111
sourav sourav111
abraham abraham111

I have used https://www.devglan.com/online-tools/bcrypt-hash-generator to generate Bcrypt encrypted password and saved to the database. Spring security by default uses Bcrypt, so we will be entering plain text as password in the password field, Spring will generate Bcrypt encrypted password and will match the password with database's password.

About

These examples include both Springboot-Security examples using in-memory setup and database setup

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published