具体报错信息

Description: Field repository in com.imooc.luckymoney.LuckymoneyController required a bean of type ‘

解决办法

创建一个class类实现该接口,并在该类上加一个@Configuration的注解
Description: Field repository in com.imooc.luckymoney.LuckymoneyController required a bean of type ‘

修改后运行结果

Description: Field repository in com.imooc.luckymoney.LuckymoneyController required a bean of type ‘

思路

上实验楼找springboot课程的时候看到其中讲配置文件的那一章有跟自己类似的代码,所以就模仿了一下,没想到成功了,但是没想明白为啥,希望有大神看到可以讲解一下!!!灰常感谢!
Description: Field repository in com.imooc.luckymoney.LuckymoneyController required a bean of type ‘
-2020年10月11日

相关文章:

  • 2021-05-08
  • 2021-12-26
  • 2021-10-21
  • 2021-08-22
  • 2021-04-02
  • 2022-12-23
猜你喜欢
  • 2021-07-21
  • 2021-04-06
  • 2021-08-02
  • 2021-12-05
  • 2021-12-09
  • 2021-11-02
  • 2022-12-23
相关资源
相似解决方案