Skip to main content

Spring Security

To implement security for our applications Spring provided 'security' module.



-> To use Spring Security in our project 'spring-security-starter' we need to add in pom.xml file.

-> By default it will secure all the endpoints of our application

Default uname : user

Default Pwd: Will be printed on the console

-> To override default credentials we can configure credentails in application.properties file

spring.security.user.name=admin

spring.security.user.password=admin@123

-> Create Rest Controller class with required method

Security Api acess in Postman


Rest Client To access Secured REST API

################################




Comments

© 2020 The JavaDS Hub

Designed by Open Themes & Nahuatl.mx.