Spring Boot + Spring MVC + Spring Security + MySQL
Gustavo Ponce
3.3K120

I had to put this setting in the class DemoApplication.java so the example could work.

@SpringBootApplication

//added

@ComponentScan(basePackages = {“com.example.controller”})

@ComponentScan(basePackages = {“com.example.service”})

@ComponentScan(basePackages = {“com.example.configuration”})

@EntityScan(basePackages = { “com.example.model” })

@EnableJpaRepositories(basePackages = { “com.example.repository” })

//end of adjust

public class DemoApplication {

….
}