intellij incorrectly saying no beans of type found for autowired repository

前端 未结 30 2916
北恋
北恋 2020-11-30 18:33

I have created a simple unit test but IntelliJ is incorrectly highlighting it red. marking it as an error

No beans?

30条回答
  •  挽巷
    挽巷 (楼主)
    2020-11-30 18:57

    simple you have to do 2 steps

    1. add hibernate-core dependency
    2. change @Autowired to @Resource.
    ==>> change @Autowired to  @Resource
    

提交回复
热议问题