springboot导入bean失败

启动类上加入

@ComponentScan("com.example.thymeleafdemo")

com.example.thymeleafdemo根据自己的目录进行修改。

目的:扫描com.example.thymeleafdemo该文件下的所有类。

发布了20 篇原创文章 · 获赞 1 · 访问量 1万+

猜你喜欢

转载自blog.csdn.net/qq_27610647/article/details/90908870
今日推荐