[英]Gradle, Spring Boot, spring-boot-starter-data-jpa upgrade
I am using Spring Boot version 1.5.7.RELEASE and wanted to use some of the following code for some pagination stuff something like我正在使用 Spring Boot 版本 1.5.7.RELEASE 并想使用以下一些代码来进行一些分页,例如
Pageable pageable = PageRequest.of(0, 1, org.springframework.data.domain.Sort.by(Sort.Direction.ASC, "seatNumber"));
However, my version of org.springframework.data.domain.Sort
doesn't have the by
method.但是,我的
org.springframework.data.domain.Sort
版本没有by
方法。 When I update the individual JAR that has the Sort
class ( spring-data-commons
) the compilation error goes away but I get a bunch of other errors.当我更新具有
Sort
类 ( spring-data-commons
) 的单个 JAR 时,编译错误消失了,但我收到了一堆其他错误。
So I tried doing something like this所以我尝试做这样的事情
compile 'org.springframework.boot:spring-boot-starter-data-jpa:2.3.4.RELEASE'
To hopefully more "holistically" upgrade all the Spring Data pieces, but that doesn't seem to do anything (still have the old version of spring-data-commons
).希望更“全面”地升级所有 Spring Data 部分,但这似乎没有任何作用(仍然有旧版本的
spring-data-commons
)。 https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-starter-data-jpa/2.3.4.RELEASE https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-starter-data-jpa/2.3.4.RELEASE
I assumed by "pointing" to it would upgrade all the dependencies too but I am still on hibernate 5.0 instead of (according to the Maven repository link hibernate 5.4).我假设通过“指向”它也会升级所有依赖项,但我仍然使用 hibernate 5.0 而不是(根据 Maven 存储库链接 hibernate 5.4)。 Anyways in summary I would like to upgrade just the spring data pieces if that is possible, with a simple one liner, or at least understand why doing what I mentioned doesn't work.
无论如何,总而言之,如果可能的话,我只想升级弹簧数据片,使用一个简单的衬垫,或者至少理解为什么我提到的操作不起作用。
Upgrading from Spring Boot version 1.5.7.RELEASE
to version 2.3.4.RELEASE
is to adventurous.从 Spring Boot 版本
1.5.7.RELEASE
升级到版本2.3.4.RELEASE
是冒险的。
You should upgrade small piece gradually.你应该逐渐升级小块。 The problem(s) will be easy to diagnostic.
问题很容易诊断。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.