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
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. 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.
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). 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). 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.