Kotlin与SpringBoot: IDEA的过于强大导致@Autowired的错误提示

eclipse这样写没问题,但是idea就不行了。

说的是找不到这个“AreaDao“的实现类型。

这就是因为idea的过于强大,idea能够自动的解析spring的配置,能够自动定位运行时候可能用到的这些类。一旦idea不能明确是哪个dao它就会去报错。

Kotlin与SpringBoot: IDEA的过于强大导致@Autowired的错误提示

其实我们是可以完全相信spring是能够定位到mybatis的实现类并注入进来。

解决:

Kotlin与SpringBoot: IDEA的过于强大导致@Autowired的错误提示

Kotlin与SpringBoot: IDEA的过于强大导致@Autowired的错误提示

相关文章:

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