1.Consider defining a bean of type ‘xxxx’ in your configuration.

表对应的entity Bean 在Spring容器中找不到。

在SpringBoot启动类上的@SpringBootApplication注解指定额外需要扫描的包

springboot默认扫描启动类所在包及子包中的所有类

方法二:
指定扫描包,这样会覆盖默认扫描的包

@SpringBootApplication(scanBasePackages = {"com.example.demo", "com.example.Utils"})

参考文章:
https://blog.csdn/u013919153/article/details/103288089

更多推荐

Consider defining a bean of type ‘xxxx‘ in your configuration,表对应的entity Bean 在S