According to Wikipedia, security is freedom from, or resilience against, the potential harm caused by others. I think this line is self-sufficient to tell us why we need to secure our app. According to an article in CyberCrime Magazine, the cybersecurity market has grown 35 times in a span of 13 years, from $3.5 Billion in 2004 to $120 Billion in 2017. It’s even forecasted this shall grow further and reach $170 Billion by 2022. Thus we can feel security is of paramount importance.
You can find part 1 of this article here — Spring Security: DB Integration: Part 1
If you are a starter to Spring Security then I would suggest starting from here — Spring Security: The Begining
We will be creating two entity classes — Authentication and Authority. Currently, I have assumed that Authentication and Authority have 1 to Many mapping between eachother.
If you are a starter to Spring Security I would suggest you start from Spring Security: The Begining.
This article is divided into 2 parts. The first part will tell you about the Spring security setup, while the next part will focus on hands-on.
I would be integrating my Spring Boot app with the Postgres database.
… Continuing from this …
Step 1: Add spring security starter dependency to pom.xml and run the web application —
Step 2: Post step 1, run the server and try to hit any endpoint. I bet you will see the following message —