In this chapter we will take a look at the basic features of Spring Boot.
Note
To get a starting point, use the Spring Initializr to create a project. No additional dependencies are required, just a Spring Boot project.
2.1 Configure a Bean
Problem
You want Spring Boot to use your class as a bean.
Solution
Depending on your needs, you can either leverage @ComponentScan to automatically detect your class and have an instance created; use it together with @Autowired and @Value to get dependencies or properties injected; or you can use a method annotated with @Bean to have more control ...