Spring Security
Dependency
{spring-boot-started-security}
- Use this dependency for Spring Security.
Authentication Types
- Knowledge-based Authentication
- Possession-based Authentication
- Knowledge + Possession Authentication
- Multifactor Authentication
Spring Boot Annotations
@SpringBootApplication
- Enables Spring Boot autoconfiguration and component scanning.
@Bean
- Indicates that a method produces a bean to be managed by Spring.
@Service
- Indicates that an annotated class is a service class.
@Repository
- Indicates that an annotated class is a repository, representing data access.
@Configuration
- Indicates that a class is a configuration class that may contain bean definitions.
@Controller
- Marks the class as a web controller capable of handling requests.
@RequestMapping
- Maps HTTP requests with a path to a controller method.
@Autowired
- Marks a constructor, field, or setter method to be autowired by Spring.
@Component
- Generic stereotype for a Spring-managed component, considered for auto-detection.
@Repository
, @Service
, and @Controller
- Specializations of
@Component
for more specific use cases.
@EnableAutoConfiguration (exclude ={classname})
@Controller
- Maps the model object to a view or template, making it human-readable.