BeanNotOfRequiredTypeException due to autowired fields

前端 未结 9 1260
长发绾君心
长发绾君心 2020-12-02 12:07

I\'m still new to Spring MVC and while building my test project, I got this message from Tomcat logs:

SEVERE: Exception sending context initialized event to          


        
9条回答
  •  悲哀的现实
    2020-12-02 12:54

    I have facing same issue but I solved the problem with the following workaround:

    Please replace your implementation class with interface. For example:

    class Abc
    {
     @Autowire
     private Boy boy // remove @BoyImpl
    
    .............
    ...................
    }
    

提交回复
热议问题