Could not autowire field in spring. why?

后端 未结 8 1814
长情又很酷
长情又很酷 2020-12-08 20:09

I keep getting this error, and can\'t figure out why.. yes I know there many people had similar issues, but reading the answers they got, does not solve my problem.

8条回答
  •  孤街浪徒
    2020-12-08 20:51

    I had exactly the same problem try to put the two classes in the same package and add line in the pom.xml

     
                 org.springframework.boot  
                 spring-boot-starter-web  
                 1.2.0.RELEASE  
    
    

提交回复
热议问题