我有spring-boot项目,在使用jpa时,我在多模块maven项目的子模块中遇到以下错误,无法找到任何解决方案:
Cannot access org.springframework.data.repository.PagingAndSortingRepository
我该如何解决这个问题?
- 您可以将spring-jpa-lib添加到子模块的pom.xml中
- 或者你可以像这样覆盖你想在子模块中使用的方法,这样子模块就不需要导入spring-jpa包
https://i.stack.imgur.com/udWcX.png