spring-data mongodb custom implementation PropertyReferenceException

北城以北 提交于 2019-12-03 11:04:28
Christopher Armstrong

The problem is solved. This error appears when the Impl class is named incorrectly. The Impl class has to be named according to the repository class. So the names have to be following for this example:

  • com.eerra.core.common.service.UserRepositoryInterface.java (main repository)
  • com.eerra.core.common.service.UserRepositoryInterfaceImpl.java (implementation of custom repository methods)
  • com.eerra.core.common.service.UserRepositoryInterfaceCustom.java (interface with custom methods)

See the answer here: What's the difference between Spring Data's MongoTemplate and MongoRepository?

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!