I fixed the problem adding this line @ComponentScan(basePackages = {"com.example.DemoApplication"})
to main class file, just up from the class name
package com.example.demo;_x000D_
_x000D_
import org.springframework.boot.SpringApplication;_x000D_
import org.springframework.boot.autoconfigure.SpringBootApplication;_x000D_
import org.springframework.context.annotation.ComponentScan;_x000D_
_x000D_
@SpringBootApplication_x000D_
@ComponentScan(basePackages = {"com.example.DemoApplication"})_x000D_
public class DemoApplication {_x000D_
_x000D_
public static void main(String[] args) {_x000D_
SpringApplication.run(DemoApplication.class, args);_x000D_
}_x000D_
_x000D_
}
_x000D_