Add the following dependency to your file pom.xml:
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-security</artifactId>
</dependency>
The Spring-boot-starter-security dependency ;brings in three important Spring Security dependencies:
- spring-security-config
- spring-security-core
- spring-security-web