idea 報錯 org.springframework.beans.factory.UnsatisfiedDependencyException:

坑!

以下是報錯內容:

 Error creating bean with name 'loginUsersService': Unsatisfied dependency expressed through field 'loginUsersRepository'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'loginUsersRepository': Invocation of init method failed; nested exception is java.lang.IllegalArgumentException: Failed to create query for method public abstract com.swun.recommends.web.domain.LoginUsers com.swun.recommends.web.dao.LoginUsersRepository.saveLoginUser(com.swun.recommends.web.domain.Users)! No property saveLoginUser found for type LoginUsers!

 

只是因爲方法名:saveLoginUser  這麼寫不符合規範,改成  save 就通過了...

 

命名要規範

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章