From 6817a5b09fad7c1df5695bc87967b13ecdac387f Mon Sep 17 00:00:00 2001 From: p3t <3204560+p3t@users.noreply.github.com> Date: Mon, 13 May 2024 17:18:04 +0200 Subject: [PATCH] Fix for generics/assert used with Spring 3.2.5 --- .github/workflows/publish-githubpkg.yml | 1 - .../kotlin/io.vigier.java-library-conventions.gradle.kts | 4 ++-- .../jpa/bootstrap/CursorPageRepositoryFactoryBean.java | 7 +++---- 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/.github/workflows/publish-githubpkg.yml b/.github/workflows/publish-githubpkg.yml index f555eec..e099abe 100644 --- a/.github/workflows/publish-githubpkg.yml +++ b/.github/workflows/publish-githubpkg.yml @@ -34,7 +34,6 @@ jobs: echo "BUILD_VERSION=${RELEASE_TAG#v}" >> "$GITHUB_ENV" echo "BUILD_VERSION=${RELEASE_TAG#v}" >> "$GITHUB_OUTPUT" echo "::notice title='Publishing release'::Release Version is ${RELEASE_TAG#v}" - cat $GITHUB_ENV - uses: actions/checkout@v4 - name: Set up JDK 17 uses: actions/setup-java@v4 diff --git a/buildSrc/src/main/kotlin/io.vigier.java-library-conventions.gradle.kts b/buildSrc/src/main/kotlin/io.vigier.java-library-conventions.gradle.kts index 5792df7..ba919df 100644 --- a/buildSrc/src/main/kotlin/io.vigier.java-library-conventions.gradle.kts +++ b/buildSrc/src/main/kotlin/io.vigier.java-library-conventions.gradle.kts @@ -17,7 +17,7 @@ repositories { dependencyManagement { imports { - mavenBom("org.springframework.boot:spring-boot-dependencies:3.2.4") + mavenBom("org.springframework.boot:spring-boot-dependencies:3.2.5") } } @@ -46,7 +46,7 @@ dependencies { // Load BOM for Spring Boot. - implementation(platform("org.springframework.boot:spring-boot-dependencies:3.2.3")) + implementation(platform("org.springframework.boot:spring-boot-dependencies:3.2.5")) implementation(platform(org.springframework.boot.gradle.plugin.SpringBootPlugin.BOM_COORDINATES)) compileOnly("org.projectlombok:lombok:${lombokVersion}") testCompileOnly("org.projectlombok:lombok:${lombokVersion}") diff --git a/cursorpaging-jpa/src/main/java/io/vigier/cursorpaging/jpa/bootstrap/CursorPageRepositoryFactoryBean.java b/cursorpaging-jpa/src/main/java/io/vigier/cursorpaging/jpa/bootstrap/CursorPageRepositoryFactoryBean.java index 169d42e..2af9345 100644 --- a/cursorpaging-jpa/src/main/java/io/vigier/cursorpaging/jpa/bootstrap/CursorPageRepositoryFactoryBean.java +++ b/cursorpaging-jpa/src/main/java/io/vigier/cursorpaging/jpa/bootstrap/CursorPageRepositoryFactoryBean.java @@ -1,10 +1,9 @@ package io.vigier.cursorpaging.jpa.bootstrap; import jakarta.persistence.EntityManager; -import java.io.Serializable; import lombok.NonNull; -import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.jpa.repository.support.JpaRepositoryFactoryBean; +import org.springframework.data.repository.Repository; import org.springframework.data.repository.core.support.RepositoryFactorySupport; /** @@ -12,8 +11,8 @@ * * @param the type of the repository (factory) */ -public class CursorPageRepositoryFactoryBean> - extends JpaRepositoryFactoryBean { +public class CursorPageRepositoryFactoryBean, S, ID> extends + JpaRepositoryFactoryBean { public CursorPageRepositoryFactoryBean( final Class repositoryInterface ) { super( repositoryInterface );