import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.web.bind.annotation.RequestMapping;
@SpringBootApplication
@ComponentScan(basePackages = {"com.jjld.*"})
public class BlogApplication {
public static void main(String[] args) {
SpringApplication.run(BlogApplication.class, args);
}
}
重点:加
@ComponentScan(basePackages = {"com.jjld.*"})