From 2f648aea19e869f1528a1dbb5b3fdf2dca6b3e59 Mon Sep 17 00:00:00 2001
From: Dom Eori <4j6dq2zi8@relay.firefox.com>
Date: Wed, 18 Aug 2021 11:40:15 +0900
Subject: [PATCH] Update to Spring Boot 2.5
---
pom.xml | 12 ++++++------
.../samnyan/aqua/spring/data/OffsetPageRequest.java | 5 +++++
src/main/resources/application.properties | 2 +-
3 files changed, 12 insertions(+), 7 deletions(-)
diff --git a/pom.xml b/pom.xml
index a3aebbaa..a2c28113 100644
--- a/pom.xml
+++ b/pom.xml
@@ -5,7 +5,7 @@
org.springframework.boot
spring-boot-starter-parent
- 2.2.2.RELEASE
+ 2.5.3
icu.samnya
@@ -46,14 +46,14 @@
io.netty
netty-all
- 4.1.43.Final
+ 4.1.66.Final
org.apache.commons
commons-lang3
- 3.9
+ 3.12.0
@@ -66,18 +66,18 @@
org.xerial
sqlite-jdbc
- 3.30.1
+ 3.36.0.1
com.github.gwenn
sqlite-dialect
- 0.1.0
+ 0.1.2
org.flywaydb
flyway-core
- 6.1.4
+ 7.7.3
org.mariadb.jdbc
diff --git a/src/main/java/icu/samnyan/aqua/spring/data/OffsetPageRequest.java b/src/main/java/icu/samnyan/aqua/spring/data/OffsetPageRequest.java
index ad34e317..6942fd0d 100644
--- a/src/main/java/icu/samnyan/aqua/spring/data/OffsetPageRequest.java
+++ b/src/main/java/icu/samnyan/aqua/spring/data/OffsetPageRequest.java
@@ -153,4 +153,9 @@ public class OffsetPageRequest implements Pageable, Serializable {
return this.offset == other.offset && this.limit == other.limit;
}
+ @Override
+ public Pageable withPage(int pageNumber) {
+ return new OffsetPageRequest(pageNumber, getPageSize(), getSort());
+ }
+
}
diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties
index b33b41a2..da62910b 100644
--- a/src/main/resources/application.properties
+++ b/src/main/resources/application.properties
@@ -27,7 +27,7 @@ spring.datasource.url=jdbc:sqlite:data/db.sqlite
spring.datasource.hikari.maximum-pool-size=1
#auto schema update will case sqlite error
spring.jpa.hibernate.ddl-auto=none
-spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.SQLiteDialect
+spring.jpa.properties.hibernate.dialect=org.sqlite.hibernate.dialect.SQLiteDialect
########## For Mysql ##########
#spring.datasource.driver-class-name=org.mariadb.jdbc.Driver
#spring.datasource.username=