Skip to content

Commit

Permalink
Upgrade to Spring Boot 3.1.2.
Browse files Browse the repository at this point in the history
  • Loading branch information
odrotbohm committed Jul 22, 2023
1 parent cf57361 commit 321e3e9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
Expand Down Expand Up @@ -124,7 +123,7 @@ void sliceThroughResultsWithSkipAndLimit() {
void scrollThroughResultsWithSkipAndLimit() {

Window<Book> window;
ScrollPosition scrollPosition = OffsetScrollPosition.initial();
ScrollPosition scrollPosition = ScrollPosition.offset();

do {

Expand All @@ -146,7 +145,7 @@ void scrollThroughResultsUsingWindowIteratorWithSkipAndLimit() {

WindowIterator<Book> iterator = WindowIterator
.of(scrollPosition -> books.findTop2ByTitleContainsOrderByPublicationDate("the-crazy-book-", scrollPosition))
.startingAt(OffsetScrollPosition.initial());
.startingAt(ScrollPosition.offset());

List<Book> allBooks = Streamable.of(() -> iterator).stream().toList();
assertThat(allBooks).hasSize(50);
Expand All @@ -162,7 +161,7 @@ void scrollThroughResultsUsingWindowIteratorWithSkipAndLimit() {
void scrollThroughResultsWithKeyset() {

Window<Book> window;
ScrollPosition scrollPosition = KeysetScrollPosition.initial();
ScrollPosition scrollPosition = ScrollPosition.keyset();
do {

window = books.findTop2ByTitleContainsOrderByPublicationDate("the", scrollPosition);
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>3.1.0-RC1</version>
<version>3.1.2</version>
</parent>

<modules>
Expand Down

0 comments on commit 321e3e9

Please sign in to comment.