Error creating bean with name

前端 未结 2 1733
情话喂你
情话喂你 2021-02-03 20:10

I\'m using SpringMVC for a web app as well as to inject my sessionFactory for Hibernate.

When I run my application, I get the following error...

Apr 29,          


        
相关标签:
2条回答
  • 2021-02-03 20:55

    I think it comes from this line in your XML file:

    <context:component-scan base-package="org.assessme.com.controller." />
    

    Replace it by:

    <context:component-scan base-package="org.assessme.com." />
    

    It is because your Autowired service is not scanned by Spring since it is not in the right package.

    0 讨论(0)
  • 2021-02-03 20:55

    It looks like your Spring component scan Base is missing UserServiceImpl

    <context:component-scan base-package="org.assessme.com.controller." />
    
    0 讨论(0)
提交回复
热议问题