Coding With Fun
Home Docker Django Node.js Articles Python pip guide FAQ Policy

How to add spring boot starter to spring boot?


Asked by Emmaline Romero on Dec 12, 2021 Spring



1 Add Spring Boot Starter Security Dependency. To add spring security to spring boot, first, we add the dependency spring-boot-starter-security. 2 Extending WebSecurityConfigureAdapter. Next, create a class that extends the WebSecurityConfigureAdapter. ... 3 AuthenticationSuccessHanlder Implementation. ... 4 Bean Configurations. ...
In fact,
Handling dependency management is a difficult task for big projects. Spring Boot resolves this problem by providing a set of dependencies for developers convenience. For example, if you want to use Spring and JPA for database access, it is sufficient if you include spring-boot-starter-data-jpa dependency in your project.
Also, Spring Boot starters were built to address exactly this problem. Starter POMs are a set of convenient dependency descriptors that you can include in your application. You get a one-stop-shop for all the Spring and related technology that you need, without having to hunt through sample code and copy-paste loads of dependency descriptors.
Besides,
Spring Boot starters are templates that contain a collection of all the relevant transitive dependencies that are needed to start a particular functionality.
Moreover,
Spring Boot @SpringBootApplication annotation is used to mark a configuration class that declares one or more @Bean methods and also triggers auto-configuration and component scanning. It’s same as declaring a class with @Configuration, @EnableAutoConfiguration and @ComponentScan annotations.