diff --git a/jpa/example/src/test/java/example/springdata/jpa/pagination/PaginationTests.java b/jpa/example/src/test/java/example/springdata/jpa/pagination/PaginationTests.java index 6191db91a..69849d151 100644 --- a/jpa/example/src/test/java/example/springdata/jpa/pagination/PaginationTests.java +++ b/jpa/example/src/test/java/example/springdata/jpa/pagination/PaginationTests.java @@ -28,7 +28,6 @@ import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; - import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.autoconfigure.EnableAutoConfiguration; import org.springframework.boot.test.autoconfigure.orm.jpa.DataJpaTest; @@ -41,7 +40,7 @@ import org.springframework.data.domain.ScrollPosition; import org.springframework.data.domain.Slice; import org.springframework.data.domain.Window; -import org.springframework.data.domain.WindowIterator; +import org.springframework.data.support.WindowIterator; import org.springframework.data.util.Streamable; import com.github.javafaker.Faker; @@ -124,7 +123,7 @@ void sliceThroughResultsWithSkipAndLimit() { void scrollThroughResultsWithSkipAndLimit() { Window window; - ScrollPosition scrollPosition = OffsetScrollPosition.initial(); + ScrollPosition scrollPosition = ScrollPosition.offset(); do { @@ -146,7 +145,7 @@ void scrollThroughResultsUsingWindowIteratorWithSkipAndLimit() { WindowIterator iterator = WindowIterator .of(scrollPosition -> books.findTop2ByTitleContainsOrderByPublicationDate("the-crazy-book-", scrollPosition)) - .startingAt(OffsetScrollPosition.initial()); + .startingAt(ScrollPosition.offset()); List allBooks = Streamable.of(() -> iterator).stream().toList(); assertThat(allBooks).hasSize(50); @@ -162,7 +161,7 @@ void scrollThroughResultsUsingWindowIteratorWithSkipAndLimit() { void scrollThroughResultsWithKeyset() { Window window; - ScrollPosition scrollPosition = KeysetScrollPosition.initial(); + ScrollPosition scrollPosition = ScrollPosition.keyset(); do { window = books.findTop2ByTitleContainsOrderByPublicationDate("the", scrollPosition); diff --git a/pom.xml b/pom.xml index eee4b4893..7ce02b4c6 100644 --- a/pom.xml +++ b/pom.xml @@ -13,7 +13,7 @@ org.springframework.boot spring-boot-starter-parent - 3.1.0-RC1 + 3.1.2