Wednesday 12 October 2016

spring boot controllers not initialized

Controllers are not initialize because you have not scan the packages for controller

add these lines in your main class.

If you are scanning a particular class for controller.

@SpringBootApplication
@ComponentScan(basePackageClasses = temInventoryController.class)
public class InventoryApp {


if you want to scan a whole package for controller add this.

@ComponentScan(basePackages = "com.home.controller")





No comments:

Post a Comment

Spring boot with CORS

CORS (Cross-Origin Resource Sharing) errors occur when a web application running in a browser requests a resource from a different domain or...