To implement basic authentication in Spring Security 3, add security dependencies to your project, create a configuration class extending WebSecurityConfigurerAdapter, and define security rules, including HTTP Basic authentication.
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-security</artifactId>