注入Bean失敗
跟老師的視頻走,還報錯,說是注入Bean失敗
Parameter 1 of constructor in org.springframework.boot.autoconfigure.orm.jpa.HibernateJpaConfiguration required a single bean, but 2 were found:
- helloController: defined in file [D:\IdeaProjects\lyh\target\classes\com\sx\lyh\HelloController.class]
- spring.jpa-org.springframework.boot.autoconfigure.orm.jpa.JpaProperties: defined in null
2018-08-31
你的application.yml配置中有對jpa的配置嗎?并且報的錯誤中說到你的girl.class的bean沒有配置無參構造器,看一下你的bean配置有沒有 getset方法和構造器
---required a single bean