Skip to content

Commit

Permalink
feat: upgrade to Spring Boot 3.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
ctvairplus authored and darrachequesne committed Dec 28, 2022
1 parent 9b1123d commit d4c810e
Show file tree
Hide file tree
Showing 28 changed files with 327 additions and 257 deletions.
14 changes: 6 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,7 @@ jobs:
strategy:
matrix:
jdk-version:
- 8
- 11
- 14
- 17

steps:
- name: Checkout repository
Expand All @@ -29,7 +27,7 @@ jobs:
cache: maven

- name: Test with Maven
run: mvn test
run: mvn -B test

test-postgres:
runs-on: ubuntu-latest
Expand All @@ -51,10 +49,10 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v3

- name: Set up JDK 14
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: 14
java-version: 17
distribution: adopt
cache: maven

Expand Down Expand Up @@ -84,10 +82,10 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v3

- name: Set up JDK 14
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: 14
java-version: 17
distribution: adopt
cache: maven

Expand Down
65 changes: 41 additions & 24 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

<groupId>com.github.darrachequesne</groupId>
<artifactId>spring-data-jpa-datatables</artifactId>
<version>5.2.0</version>
<version>6.0.0-SNAPSHOT</version>

<name>Spring Data JPA for DataTables</name>
<description>Spring Data JPA extension to work with the great jQuery plug-in DataTables (http://datatables.net/)</description>
Expand Down Expand Up @@ -48,12 +48,12 @@

<properties>
<!-- Version of maven plugins -->
<version.plugin.maven-release-plugin>2.5.2</version.plugin.maven-release-plugin>
<version.plugin.nexus-staging-maven-plugin>1.6.5</version.plugin.nexus-staging-maven-plugin>
<version.plugin.maven-gpg-plugin>1.6</version.plugin.maven-gpg-plugin>
<version.plugin.maven-release-plugin>3.0.0-M7</version.plugin.maven-release-plugin>
<version.plugin.nexus-staging-maven-plugin>1.6.13</version.plugin.nexus-staging-maven-plugin>
<version.plugin.maven-gpg-plugin>3.0.1</version.plugin.maven-gpg-plugin>

<!-- Source encoding -->
<java.version>1.8</java.version>
<java.version>17</java.version>
<maven.compiler.source>${java.version}</maven.compiler.source>
<maven.compiler.target>${java.version}</maven.compiler.target>
<source.encoding>UTF-8</source.encoding>
Expand All @@ -64,7 +64,14 @@
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-dependencies</artifactId>
<version>2.6.7</version>
<version>3.0.0</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>org.junit</groupId>
<artifactId>junit-bom</artifactId>
<version>5.9.1</version>
<type>pom</type>
<scope>import</scope>
</dependency>
Expand All @@ -89,36 +96,40 @@
</dependency>

<dependency>
<groupId>javax.validation</groupId>
<artifactId>validation-api</artifactId>
<groupId>jakarta.validation</groupId>
<artifactId>jakarta.validation-api</artifactId>
</dependency>

<!-- Hibernate -->
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-entitymanager</artifactId>
<groupId>org.hibernate.orm</groupId>
<artifactId>hibernate-core</artifactId>
<version>6.1.4.Final</version>
</dependency>

<dependency>
<groupId>com.querydsl</groupId>
<artifactId>querydsl-apt</artifactId>
<version>5.0.0</version>
<classifier>jakarta</classifier>
</dependency>

<dependency>
<groupId>com.querydsl</groupId>
<artifactId>querydsl-jpa</artifactId>
<version>5.0.0</version>
<classifier>jakarta</classifier>
</dependency>

<dependency>
<groupId>javax.annotation</groupId>
<artifactId>javax.annotation-api</artifactId>
<groupId>jakarta.annotation</groupId>
<artifactId>jakarta.annotation-api</artifactId>
<scope>compile</scope>
</dependency>

<!-- Test -->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>
<scope>test</scope>
</dependency>

Expand All @@ -141,8 +152,8 @@
</dependency>

<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<groupId>com.mysql</groupId>
<artifactId>mysql-connector-j</artifactId>
<scope>test</scope>
</dependency>

Expand All @@ -154,7 +165,7 @@

<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
<artifactId>slf4j-reload4j</artifactId>
<scope>test</scope>
</dependency>

Expand All @@ -164,12 +175,12 @@
<plugins>
<plugin>
<groupId>com.mysema.maven</groupId>
<artifactId>maven-apt-plugin</artifactId>
<version>1.0</version>
<artifactId>apt-maven-plugin</artifactId>
<version>1.1.3</version>
<executions>
<execution>
<goals>
<goal>test-process</goal>
<goal>process</goal>
</goals>
<configuration>
<outputDirectory>target/generated-sources/java</outputDirectory>
Expand All @@ -181,7 +192,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<version>3.10.1</version>
<configuration>
<source>${maven.compiler.source}</source>
<target>${maven.compiler.target}</target>
Expand All @@ -191,7 +202,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>3.1.0</version>
<version>3.3.0</version>
<configuration>
<encoding>${source.encoding}</encoding>
</configuration>
Expand All @@ -215,7 +226,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.2.0</version>
<version>3.4.1</version>
</plugin>
<!-- Nexus Staging Maven Plugin for Deployment and Release into Sonatype
OSSRH -->
Expand All @@ -230,6 +241,12 @@
<autoReleaseAfterClose>true</autoReleaseAfterClose>
</configuration>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.0.0-M7</version>
</plugin>
</plugins>
</build>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
import com.querydsl.core.types.Predicate;
import com.querydsl.core.types.dsl.*;

import javax.persistence.criteria.CriteriaBuilder;
import javax.persistence.criteria.Expression;
import javax.persistence.criteria.From;
import jakarta.persistence.criteria.CriteriaBuilder;
import jakarta.persistence.criteria.Expression;
import jakarta.persistence.criteria.From;
import java.util.HashSet;
import java.util.Set;

Expand Down Expand Up @@ -72,7 +72,7 @@ public Predicate createPredicate(PathBuilder<?> pathBuilder, String attributeNam
}

@Override
public javax.persistence.criteria.Predicate createPredicate(From<?, ?> from, CriteriaBuilder criteriaBuilder, String attributeName) {
public jakarta.persistence.criteria.Predicate createPredicate(From<?, ?> from, CriteriaBuilder criteriaBuilder, String attributeName) {
Expression<?> expression = from.get(attributeName);

if (values.isEmpty()) {
Expand All @@ -81,7 +81,7 @@ public javax.persistence.criteria.Predicate createPredicate(From<?, ?> from, Cri
return super.createPredicate(from, criteriaBuilder, attributeName);
}

javax.persistence.criteria.Predicate predicate;
jakarta.persistence.criteria.Predicate predicate;
if (isBooleanComparison) {
predicate = expression.in(booleanValues);
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

import com.querydsl.core.types.dsl.PathBuilder;

import javax.persistence.criteria.CriteriaBuilder;
import javax.persistence.criteria.From;
import javax.persistence.criteria.Predicate;
import jakarta.persistence.criteria.CriteriaBuilder;
import jakarta.persistence.criteria.From;
import jakarta.persistence.criteria.Predicate;

interface Filter {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
import com.querydsl.core.types.dsl.PathBuilder;
import com.querydsl.core.types.dsl.StringOperation;

import javax.persistence.criteria.CriteriaBuilder;
import javax.persistence.criteria.Expression;
import javax.persistence.criteria.From;
import javax.persistence.criteria.Predicate;
import jakarta.persistence.criteria.CriteriaBuilder;
import jakarta.persistence.criteria.Expression;
import jakarta.persistence.criteria.From;
import jakarta.persistence.criteria.Predicate;

/**
* Filter which creates a basic "WHERE ... LIKE ..." clause
Expand Down
Loading

0 comments on commit d4c810e

Please sign in to comment.