From dc969c348d4ca70011b60f44a0c727f1ed96fd14 Mon Sep 17 00:00:00 2001 From: Mark Paluch Date: Fri, 17 May 2024 11:51:48 +0200 Subject: [PATCH 001/157] Prepare next development iteration. See #3422 --- pom.xml | 2 +- spring-data-envers/pom.xml | 4 ++-- spring-data-jpa-distribution/pom.xml | 2 +- spring-data-jpa/pom.xml | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/pom.xml b/pom.xml index db48010c64..f59de91056 100755 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ org.springframework.data spring-data-jpa-parent - 3.3.0 + 3.3.1-SNAPSHOT pom Spring Data JPA Parent diff --git a/spring-data-envers/pom.xml b/spring-data-envers/pom.xml index 11d29dee41..71a7596698 100755 --- a/spring-data-envers/pom.xml +++ b/spring-data-envers/pom.xml @@ -5,12 +5,12 @@ org.springframework.data spring-data-envers - 3.3.0 + 3.3.1-SNAPSHOT org.springframework.data spring-data-jpa-parent - 3.3.0 + 3.3.1-SNAPSHOT ../pom.xml diff --git a/spring-data-jpa-distribution/pom.xml b/spring-data-jpa-distribution/pom.xml index e2386943ce..65c340e373 100644 --- a/spring-data-jpa-distribution/pom.xml +++ b/spring-data-jpa-distribution/pom.xml @@ -14,7 +14,7 @@ org.springframework.data spring-data-jpa-parent - 3.3.0 + 3.3.1-SNAPSHOT ../pom.xml diff --git a/spring-data-jpa/pom.xml b/spring-data-jpa/pom.xml index ef7162f6a8..a1b46e3470 100644 --- a/spring-data-jpa/pom.xml +++ b/spring-data-jpa/pom.xml @@ -6,7 +6,7 @@ org.springframework.data spring-data-jpa - 3.3.0 + 3.3.1-SNAPSHOT Spring Data JPA Spring Data module for JPA repositories. @@ -15,7 +15,7 @@ org.springframework.data spring-data-jpa-parent - 3.3.0 + 3.3.1-SNAPSHOT ../pom.xml From 48bc0047b2ec70fee75edcb765cbdd783a5fa839 Mon Sep 17 00:00:00 2001 From: Mark Paluch Date: Fri, 17 May 2024 11:51:49 +0200 Subject: [PATCH 002/157] After release cleanups. See #3422 --- Jenkinsfile | 2 +- pom.xml | 20 ++++++++++++++++---- 2 files changed, 17 insertions(+), 5 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 6b9bd36e39..b5cf81ab5f 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -9,7 +9,7 @@ pipeline { triggers { pollSCM 'H/10 * * * *' - upstream(upstreamProjects: "spring-data-commons/main", threshold: hudson.model.Result.SUCCESS) + upstream(upstreamProjects: "spring-data-commons/3.3.x", threshold: hudson.model.Result.SUCCESS) } options { diff --git a/pom.xml b/pom.xml index f59de91056..81b8e9ab80 100755 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ org.springframework.data.build spring-data-parent - 3.3.0 + 3.3.1-SNAPSHOT @@ -41,7 +41,7 @@ 4.9 8.0.33 42.6.0 - 3.3.0 + 3.3.1-SNAPSHOT 0.10.3 org.hibernate @@ -278,8 +278,20 @@ - - + + spring-snapshot + https://repo.spring.io/snapshot + + true + + + false + + + + spring-milestone + https://repo.spring.io/milestone + From 3132e029017888a66c1af4aad4a01a94266f0ee9 Mon Sep 17 00:00:00 2001 From: Mark Paluch Date: Wed, 5 Jun 2024 15:34:04 +0200 Subject: [PATCH 003/157] Polishing. Enusre same annotation order. See #3499 --- .../jpa/repository/support/SimpleJpaRepository.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/SimpleJpaRepository.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/SimpleJpaRepository.java index 50afeee8a5..bb7f7ee334 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/SimpleJpaRepository.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/SimpleJpaRepository.java @@ -618,8 +618,8 @@ public long count(@Nullable Specification spec) { return executeCountQuery(getCountQuery(spec, getDomainClass())); } - @Transactional @Override + @Transactional public S save(S entity) { Assert.notNull(entity, "Entity must not be null"); @@ -632,8 +632,8 @@ public S save(S entity) { } } - @Transactional @Override + @Transactional public S saveAndFlush(S entity) { S result = save(entity); @@ -642,8 +642,8 @@ public S saveAndFlush(S entity) { return result; } - @Transactional @Override + @Transactional public List saveAll(Iterable entities) { Assert.notNull(entities, "Entities must not be null"); @@ -657,8 +657,8 @@ public List saveAll(Iterable entities) { return result; } - @Transactional @Override + @Transactional public List saveAllAndFlush(Iterable entities) { List result = saveAll(entities); @@ -667,8 +667,8 @@ public List saveAllAndFlush(Iterable entities) { return result; } - @Transactional @Override + @Transactional public void flush() { entityManager.flush(); } From e96fa55f9513783a3299d98ad9af36c022de4110 Mon Sep 17 00:00:00 2001 From: Mark Paluch Date: Wed, 5 Jun 2024 15:34:09 +0200 Subject: [PATCH 004/157] Mark `delete(Specification)` as transactional method. Override readOnly to false. Closes #3499 --- .../data/jpa/repository/support/SimpleJpaRepository.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/SimpleJpaRepository.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/SimpleJpaRepository.java index bb7f7ee334..cbd6552b1f 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/SimpleJpaRepository.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/SimpleJpaRepository.java @@ -174,8 +174,8 @@ private String getCountQueryString() { return getQueryString(countQuery, entityInformation.getEntityName()); } - @Transactional @Override + @Transactional public void deleteById(ID id) { Assert.notNull(id, ID_MUST_NOT_BE_NULL); @@ -476,6 +476,7 @@ public boolean exists(Specification spec) { } @Override + @Transactional public long delete(Specification spec) { CriteriaBuilder builder = this.entityManager.getCriteriaBuilder(); From 17990f2d44958946cc178174c54a0287e21da1e4 Mon Sep 17 00:00:00 2001 From: Seungrae Date: Tue, 28 May 2024 22:05:16 +0900 Subject: [PATCH 005/157] Fix typo and broken links in documentation. Closes #3489 --- .../antora/modules/ROOT/pages/jpa/entity-persistence.adoc | 4 ++-- .../modules/ROOT/pages/jpa/jpd-misc-cdi-integration.adoc | 2 +- .../ROOT/pages/jpa/misc-merging-persistence-units.adoc | 2 +- src/main/antora/modules/ROOT/pages/jpa/query-methods.adoc | 7 ++++--- 4 files changed, 8 insertions(+), 7 deletions(-) diff --git a/src/main/antora/modules/ROOT/pages/jpa/entity-persistence.adoc b/src/main/antora/modules/ROOT/pages/jpa/entity-persistence.adoc index 16ad24607f..2fdf37d7a2 100644 --- a/src/main/antora/modules/ROOT/pages/jpa/entity-persistence.adoc +++ b/src/main/antora/modules/ROOT/pages/jpa/entity-persistence.adoc @@ -3,12 +3,12 @@ This section describes how to persist (save) entities with Spring Data JPA. -[[jpa.entity-persistence.saving-entites]] +[[jpa.entity-persistence.saving-entities]] == Saving Entities Saving an entity can be performed with the `CrudRepository.save(…)` method. It persists or merges the given entity by using the underlying JPA `EntityManager`. If the entity has not yet been persisted, Spring Data JPA saves the entity with a call to the `entityManager.persist(…)` method. Otherwise, it calls the `entityManager.merge(…)` method. -[[jpa.entity-persistence.saving-entites.strategies]] +[[jpa.entity-persistence.saving-entities.strategies]] === Entity State-detection Strategies Spring Data JPA offers the following strategies to detect whether an entity is new or not: diff --git a/src/main/antora/modules/ROOT/pages/jpa/jpd-misc-cdi-integration.adoc b/src/main/antora/modules/ROOT/pages/jpa/jpd-misc-cdi-integration.adoc index 98ba2bb2be..151eacb363 100644 --- a/src/main/antora/modules/ROOT/pages/jpa/jpd-misc-cdi-integration.adoc +++ b/src/main/antora/modules/ROOT/pages/jpa/jpd-misc-cdi-integration.adoc @@ -46,7 +46,7 @@ class CdiConfig { In the preceding example, the container has to be capable of creating JPA `EntityManagers` itself. All the configuration does is re-export the JPA `EntityManager` as a CDI bean. -The Spring Data JPA CDI extension picks up all available `EntityManager` instances as CDI beans and creates a proxy for a Spring Data repository whenever a bean of a repository type is requested by the container. Thus, obtaining an instance of a Spring Data repository is a matter of declaring an `@Injected` property, as shown in the following example: +The Spring Data JPA CDI extension picks up all available `EntityManager` instances as CDI beans and creates a proxy for a Spring Data repository whenever a bean of a repository type is requested by the container. Thus, obtaining an instance of a Spring Data repository is a matter of declaring an `@Inject` property, as shown in the following example: [source, java] ---- diff --git a/src/main/antora/modules/ROOT/pages/jpa/misc-merging-persistence-units.adoc b/src/main/antora/modules/ROOT/pages/jpa/misc-merging-persistence-units.adoc index 35ef016c2f..7b2165b665 100644 --- a/src/main/antora/modules/ROOT/pages/jpa/misc-merging-persistence-units.adoc +++ b/src/main/antora/modules/ROOT/pages/jpa/misc-merging-persistence-units.adoc @@ -37,5 +37,5 @@ A plain JPA setup requires all annotation-mapped entity classes to be listed in ---- ==== -NOTE: As of Spring 3.1, a package to scan can be configured on the `LocalContainerEntityManagerFactoryBean` directly to enable classpath scanning for entity classes. See the link:{springJavadocUrl}org/springframework/orm/jpa/LocalContainerEntityManagerFactoryBean.html#setPackagesToScan(java.lang.String...)$$[JavaDoc] for details. +NOTE: As of Spring 3.1, a package to scan can be configured on the `LocalContainerEntityManagerFactoryBean` directly to enable classpath scanning for entity classes. See the link:{springJavadocUrl}/org/springframework/orm/jpa/LocalContainerEntityManagerFactoryBean.html#setPackagesToScan(java.lang.String...)$$[JavaDoc] for details. diff --git a/src/main/antora/modules/ROOT/pages/jpa/query-methods.adoc b/src/main/antora/modules/ROOT/pages/jpa/query-methods.adoc index 00e4c203e3..d6fb186acc 100644 --- a/src/main/antora/modules/ROOT/pages/jpa/query-methods.adoc +++ b/src/main/antora/modules/ROOT/pages/jpa/query-methods.adoc @@ -25,6 +25,7 @@ Generally, the query creation mechanism for JPA works as described in {spring-da .Query creation from method names ==== +[source, java] ---- public interface UserRepository extends Repository { @@ -52,7 +53,7 @@ The following table describes the keywords supported for JPA and what a method c |`After`|`findByStartDateAfter`|`… where x.startDate > ?1` |`Before`|`findByStartDateBefore`|`… where x.startDate < ?1` |`IsNull`, `Null`|`findByAge(Is)Null`|`… where x.age is null` -|`IsNotNull`, `NotNull`|`findByAge(Is)NotNull`|`… where x.age not null` +|`IsNotNull`, `NotNull`|`findByAge(Is)NotNull`|`… where x.age is not null` |`Like`|`findByFirstnameLike`|`… where x.firstname like ?1` |`NotLike`|`findByFirstnameNotLike`|`… where x.firstname not like ?1` |`StartingWith`|`findByFirstnameStartingWith`|`… where x.firstname like ?1` (parameter bound with appended `%`) @@ -76,7 +77,7 @@ For example, `select distinct u from User u` will produce a complete different r In the first case, since you are including `User.id`, nothing will duplicated, hence you'll get the whole table, and it would be of `User` objects. However, that latter query would narrow the focus to just `User.lastname` and find all unique last names for that table. -This would also yield a `List` result set instead of a `List result set. +This would also yield a `List` result set instead of a `List` result set. `countDistinctByLastname(String lastname)` can also produce unexpected results. @@ -130,7 +131,7 @@ The query has a special name that is used to resolve it at runtime. [[jpa.query-methods.named-queries.declaring-interfaces]] === Declaring Interfaces -To allow these named queries, specify the `UserRepositoryWithRewriter` as follows: +To allow these named queries, specify the `UserRepository` as follows: .Query method declaration in UserRepository ==== From 002498501685b68e6a0916f9c611c97ed52a571f Mon Sep 17 00:00:00 2001 From: Christoph Strobl Date: Wed, 5 Jun 2024 09:05:16 +0200 Subject: [PATCH 006/157] Fix query parsing error for properties using reserved lateral keyword. Add tests for existing parsers and fix the HQL one. Closes #3496 Original pull request #3497 --- .../org/springframework/data/jpa/repository/query/Hql.g4 | 1 + .../data/jpa/repository/query/EqlQueryRendererTests.java | 7 +++++++ .../data/jpa/repository/query/HqlQueryRendererTests.java | 7 +++++++ .../data/jpa/repository/query/JpqlQueryRendererTests.java | 7 +++++++ 4 files changed, 22 insertions(+) diff --git a/spring-data-jpa/src/main/antlr4/org/springframework/data/jpa/repository/query/Hql.g4 b/spring-data-jpa/src/main/antlr4/org/springframework/data/jpa/repository/query/Hql.g4 index 7984d4881b..5edddf97d1 100644 --- a/spring-data-jpa/src/main/antlr4/org/springframework/data/jpa/repository/query/Hql.g4 +++ b/spring-data-jpa/src/main/antlr4/org/springframework/data/jpa/repository/query/Hql.g4 @@ -768,6 +768,7 @@ reservedWord | JOIN | KEY | LAST + | LATERAL | LEADING | LEFT | LIKE diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/EqlQueryRendererTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/EqlQueryRendererTests.java index ec11428a80..7fccc9cb89 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/EqlQueryRendererTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/EqlQueryRendererTests.java @@ -1024,4 +1024,11 @@ void entityNameWithPackageContainingReservedWord(String reservedWord) { String source = "select new com.company.%s.thing.stuff.ClassName(e.id) from Experience e".formatted(reservedWord); assertQuery(source); } + + @Test // GH-3496 + void lateralShouldBeAValidParameter() { + + assertQuery("select e from Employee e where e.lateral = :_lateral"); + assertQuery("select te from TestEntity te where te.lateral = :lateral"); + } } diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/HqlQueryRendererTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/HqlQueryRendererTests.java index 6f617314ba..e2cb7138cc 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/HqlQueryRendererTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/HqlQueryRendererTests.java @@ -1566,6 +1566,13 @@ void typeShouldBeAValidParameter() { assertQuery("select te from TestEntity te where te.type = :type"); } + @Test // GH-3496 + void lateralShouldBeAValidParameter() { + + assertQuery("select e from Employee e where e.lateral = :_lateral"); + assertQuery("select te from TestEntity te where te.lateral = :lateral"); + } + @Test // GH-3099 void functionNamesShouldSupportSchemaScoping() { diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/JpqlQueryRendererTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/JpqlQueryRendererTests.java index 71836ed390..6ff73aa3bf 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/JpqlQueryRendererTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/JpqlQueryRendererTests.java @@ -963,6 +963,13 @@ void typeShouldBeAValidParameter() { assertQuery("select te from TestEntity te where te.type = :type"); } + @Test // GH-3496 + void lateralShouldBeAValidParameter() { + + assertQuery("select e from Employee e where e.lateral = :_lateral"); + assertQuery("select te from TestEntity te where te.lateral = :lateral"); + } + @Test // GH-3061 void alternateNotEqualsOperatorShouldWork() { assertQuery("select e from Employee e where e.firstName != :name"); From 8ca2634aa7605b4e56ff2902f0ff910a6e475dd0 Mon Sep 17 00:00:00 2001 From: Mark Paluch Date: Wed, 12 Jun 2024 15:40:43 +0200 Subject: [PATCH 007/157] Replace synchronized block with ReentrantLock. Closes #3505 --- .../data/jpa/repository/query/PartTreeJpaQuery.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/PartTreeJpaQuery.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/PartTreeJpaQuery.java index 3b799258dc..1d0923f26d 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/PartTreeJpaQuery.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/PartTreeJpaQuery.java @@ -23,6 +23,7 @@ import jakarta.persistence.criteria.CriteriaQuery; import java.util.List; +import java.util.concurrent.locks.ReentrantLock; import org.springframework.data.domain.KeysetScrollPosition; import org.springframework.data.domain.OffsetScrollPosition; @@ -208,6 +209,7 @@ private static boolean expectsCollection(Type type) { private class QueryPreparer { private final @Nullable CriteriaQuery cachedCriteriaQuery; + private final ReentrantLock lock = new ReentrantLock(); private final @Nullable ParameterBinder cachedParameterBinder; private final QueryParameterSetter.QueryMetadataCache metadataCache = new QueryParameterSetter.QueryMetadataCache(); @@ -297,8 +299,11 @@ private Query restrictMaxResultsIfNecessary(Query query, @Nullable ScrollPositio private TypedQuery createQuery(CriteriaQuery criteriaQuery) { if (this.cachedCriteriaQuery != null) { - synchronized (this.cachedCriteriaQuery) { + lock.lock(); + try { return getEntityManager().createQuery(criteriaQuery); + } finally { + lock.unlock(); } } From d516d3b156257b4be9317a0161ea94a592033eae Mon Sep 17 00:00:00 2001 From: devholic22 Date: Fri, 19 Jan 2024 16:31:44 +0900 Subject: [PATCH 008/157] Update iteration variable name in PersistenceProviderUnitTests for readability. Closes #3322 --- .../data/jpa/provider/PersistenceProviderUnitTests.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/provider/PersistenceProviderUnitTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/provider/PersistenceProviderUnitTests.java index aa063927cf..4aed6106f5 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/provider/PersistenceProviderUnitTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/provider/PersistenceProviderUnitTests.java @@ -152,8 +152,8 @@ private static byte[] generateByteCodeForInterface(final String interfaceName, C private static String[] toResourcePaths(Class... interfacesToImplement) { List interfaceResourcePaths = new ArrayList<>(interfacesToImplement.length); - for (Class iface : interfacesToImplement) { - interfaceResourcePaths.add(ClassUtils.convertClassNameToResourcePath(iface.getName())); + for (Class targetInterface : interfacesToImplement) { + interfaceResourcePaths.add(ClassUtils.convertClassNameToResourcePath(targetInterface.getName())); } return interfaceResourcePaths.toArray(new String[0]); From df98853a4e42825fef96fe6e1dea2e07a2097794 Mon Sep 17 00:00:00 2001 From: Mark Paluch Date: Thu, 13 Jun 2024 14:24:59 +0200 Subject: [PATCH 009/157] Polishing. Simplify code, refine constructor visibility. See #3322 --- .../PersistenceProviderUnitTests.java | 22 +++++++++---------- 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/provider/PersistenceProviderUnitTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/provider/PersistenceProviderUnitTests.java index 4aed6106f5..2e4ce22cae 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/provider/PersistenceProviderUnitTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/provider/PersistenceProviderUnitTests.java @@ -19,16 +19,16 @@ import static org.springframework.data.jpa.provider.PersistenceProvider.*; import static org.springframework.data.jpa.provider.PersistenceProvider.Constants.*; -import java.util.ArrayList; -import java.util.List; - import jakarta.persistence.EntityManager; +import java.util.Arrays; + import org.assertj.core.api.Assumptions; import org.hibernate.Version; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.mockito.Mockito; + import org.springframework.asm.ClassWriter; import org.springframework.asm.Opcodes; import org.springframework.instrument.classloading.ShadowingClassLoader; @@ -111,12 +111,12 @@ private EntityManager mockProviderSpecificEntityManagerInterface(String interfac static class InterfaceGenerator implements Opcodes { - static Class generate(final String interfaceName, ClassLoader parentClassLoader, - final Class... interfaces) throws ClassNotFoundException { + static Class generate(final String interfaceName, ClassLoader parentClassLoader, final Class... interfaces) + throws ClassNotFoundException { class CustomClassLoader extends ClassLoader { - CustomClassLoader(ClassLoader parent) { + private CustomClassLoader(ClassLoader parent) { super(parent); } @@ -151,12 +151,10 @@ private static byte[] generateByteCodeForInterface(final String interfaceName, C private static String[] toResourcePaths(Class... interfacesToImplement) { - List interfaceResourcePaths = new ArrayList<>(interfacesToImplement.length); - for (Class targetInterface : interfacesToImplement) { - interfaceResourcePaths.add(ClassUtils.convertClassNameToResourcePath(targetInterface.getName())); - } - - return interfaceResourcePaths.toArray(new String[0]); + return Arrays.stream(interfacesToImplement) // + .map(Class::getName) // + .map(ClassUtils::convertClassNameToResourcePath) // + .toArray(String[]::new); } } } From e3ee35f12e06381383571ab3a5b3b38e227ebadb Mon Sep 17 00:00:00 2001 From: Mark Paluch Date: Fri, 14 Jun 2024 10:45:23 +0200 Subject: [PATCH 010/157] Prepare 3.3.1 (2024.0.1). See #3481 --- pom.xml | 20 ++++---------------- 1 file changed, 4 insertions(+), 16 deletions(-) diff --git a/pom.xml b/pom.xml index 81b8e9ab80..01b27c3a96 100755 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ org.springframework.data.build spring-data-parent - 3.3.1-SNAPSHOT + 3.3.1 @@ -41,7 +41,7 @@ 4.9 8.0.33 42.6.0 - 3.3.1-SNAPSHOT + 3.3.1 0.10.3 org.hibernate @@ -278,20 +278,8 @@ - - spring-snapshot - https://repo.spring.io/snapshot - - true - - - false - - - - spring-milestone - https://repo.spring.io/milestone - + + From fd4e7e7283f72450d5fbd20565d10e921696e806 Mon Sep 17 00:00:00 2001 From: Mark Paluch Date: Fri, 14 Jun 2024 10:45:40 +0200 Subject: [PATCH 011/157] Release version 3.3.1 (2024.0.1). See #3481 --- pom.xml | 2 +- spring-data-envers/pom.xml | 4 ++-- spring-data-jpa-distribution/pom.xml | 2 +- spring-data-jpa/pom.xml | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/pom.xml b/pom.xml index 01b27c3a96..54cbb3f2f6 100755 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ org.springframework.data spring-data-jpa-parent - 3.3.1-SNAPSHOT + 3.3.1 pom Spring Data JPA Parent diff --git a/spring-data-envers/pom.xml b/spring-data-envers/pom.xml index 71a7596698..dd7a898912 100755 --- a/spring-data-envers/pom.xml +++ b/spring-data-envers/pom.xml @@ -5,12 +5,12 @@ org.springframework.data spring-data-envers - 3.3.1-SNAPSHOT + 3.3.1 org.springframework.data spring-data-jpa-parent - 3.3.1-SNAPSHOT + 3.3.1 ../pom.xml diff --git a/spring-data-jpa-distribution/pom.xml b/spring-data-jpa-distribution/pom.xml index 65c340e373..60374e1599 100644 --- a/spring-data-jpa-distribution/pom.xml +++ b/spring-data-jpa-distribution/pom.xml @@ -14,7 +14,7 @@ org.springframework.data spring-data-jpa-parent - 3.3.1-SNAPSHOT + 3.3.1 ../pom.xml diff --git a/spring-data-jpa/pom.xml b/spring-data-jpa/pom.xml index a1b46e3470..0fb6462c92 100644 --- a/spring-data-jpa/pom.xml +++ b/spring-data-jpa/pom.xml @@ -6,7 +6,7 @@ org.springframework.data spring-data-jpa - 3.3.1-SNAPSHOT + 3.3.1 Spring Data JPA Spring Data module for JPA repositories. @@ -15,7 +15,7 @@ org.springframework.data spring-data-jpa-parent - 3.3.1-SNAPSHOT + 3.3.1 ../pom.xml From 957072279093cdf47dfc471addef2b1266c69c2a Mon Sep 17 00:00:00 2001 From: Mark Paluch Date: Fri, 14 Jun 2024 10:47:58 +0200 Subject: [PATCH 012/157] Prepare next development iteration. See #3481 --- pom.xml | 2 +- spring-data-envers/pom.xml | 4 ++-- spring-data-jpa-distribution/pom.xml | 2 +- spring-data-jpa/pom.xml | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/pom.xml b/pom.xml index 54cbb3f2f6..8b5a4fda59 100755 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ org.springframework.data spring-data-jpa-parent - 3.3.1 + 3.3.2-SNAPSHOT pom Spring Data JPA Parent diff --git a/spring-data-envers/pom.xml b/spring-data-envers/pom.xml index dd7a898912..32de9f5ee1 100755 --- a/spring-data-envers/pom.xml +++ b/spring-data-envers/pom.xml @@ -5,12 +5,12 @@ org.springframework.data spring-data-envers - 3.3.1 + 3.3.2-SNAPSHOT org.springframework.data spring-data-jpa-parent - 3.3.1 + 3.3.2-SNAPSHOT ../pom.xml diff --git a/spring-data-jpa-distribution/pom.xml b/spring-data-jpa-distribution/pom.xml index 60374e1599..2b607c814a 100644 --- a/spring-data-jpa-distribution/pom.xml +++ b/spring-data-jpa-distribution/pom.xml @@ -14,7 +14,7 @@ org.springframework.data spring-data-jpa-parent - 3.3.1 + 3.3.2-SNAPSHOT ../pom.xml diff --git a/spring-data-jpa/pom.xml b/spring-data-jpa/pom.xml index 0fb6462c92..9f47fc6f28 100644 --- a/spring-data-jpa/pom.xml +++ b/spring-data-jpa/pom.xml @@ -6,7 +6,7 @@ org.springframework.data spring-data-jpa - 3.3.1 + 3.3.2-SNAPSHOT Spring Data JPA Spring Data module for JPA repositories. @@ -15,7 +15,7 @@ org.springframework.data spring-data-jpa-parent - 3.3.1 + 3.3.2-SNAPSHOT ../pom.xml From 2e8c9b75eaf313033b68a89a2a2fa8f712cf97f4 Mon Sep 17 00:00:00 2001 From: Mark Paluch Date: Fri, 14 Jun 2024 10:47:59 +0200 Subject: [PATCH 013/157] After release cleanups. See #3481 --- pom.xml | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/pom.xml b/pom.xml index 8b5a4fda59..73eaf075da 100755 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ org.springframework.data.build spring-data-parent - 3.3.1 + 3.3.2-SNAPSHOT @@ -41,7 +41,7 @@ 4.9 8.0.33 42.6.0 - 3.3.1 + 3.3.2-SNAPSHOT 0.10.3 org.hibernate @@ -278,8 +278,20 @@ - - + + spring-snapshot + https://repo.spring.io/snapshot + + true + + + false + + + + spring-milestone + https://repo.spring.io/milestone + From 2aeece8f6894cc96cbd171baef915cecb9022097 Mon Sep 17 00:00:00 2001 From: Mark Paluch Date: Thu, 20 Jun 2024 14:20:01 +0200 Subject: [PATCH 014/157] Switch to Broadcom docker proxy. Closes #3519 --- Jenkinsfile | 90 +++++++++++-------- ci/pipeline.properties | 7 +- .../support/ProxyImageNameSubstitutor.java | 4 +- 3 files changed, 59 insertions(+), 42 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index b5cf81ab5f..94b8241ff3 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -38,10 +38,12 @@ pipeline { } steps { script { - docker.image(p['docker.java.main.image']).inside(p['docker.java.inside.docker']) { - sh "PROFILE=all-dbs " + - "JENKINS_USER_NAME=${p['jenkins.user.name']} " + - "ci/test.sh" + docker.withRegistry(p['docker.proxy.registry'], p['docker.proxy.credentials']) { + docker.image(p['docker.java.main.image']).inside(p['docker.java.inside.docker']) { + sh "PROFILE=all-dbs " + + "JENKINS_USER_NAME=${p['jenkins.user.name']} " + + "ci/test.sh" + } } } } @@ -70,10 +72,12 @@ pipeline { } steps { script { - docker.image(p['docker.java.next.image']).inside(p['docker.java.inside.docker']) { - sh "PROFILE=all-dbs,hibernate-62 " + - "JENKINS_USER_NAME=${p['jenkins.user.name']} " + - "ci/test.sh" + docker.withRegistry(p['docker.proxy.registry'], p['docker.proxy.credentials']) { + docker.image(p['docker.java.next.image']).inside(p['docker.java.inside.docker']) { + sh "PROFILE=all-dbs,hibernate-62 " + + "JENKINS_USER_NAME=${p['jenkins.user.name']} " + + "ci/test.sh" + } } } } @@ -91,10 +95,12 @@ pipeline { } steps { script { - docker.image(p['docker.java.next.image']).inside(p['docker.java.inside.docker']) { - sh "PROFILE=all-dbs,hibernate-65-snapshots " + - "JENKINS_USER_NAME=${p['jenkins.user.name']} " + - "ci/test.sh" + docker.withRegistry(p['docker.proxy.registry'], p['docker.proxy.credentials']) { + docker.image(p['docker.java.next.image']).inside(p['docker.java.inside.docker']) { + sh "PROFILE=all-dbs,hibernate-65-snapshots " + + "JENKINS_USER_NAME=${p['jenkins.user.name']} " + + "ci/test.sh" + } } } } @@ -112,10 +118,12 @@ pipeline { } steps { script { - docker.image(p['docker.java.next.image']).inside(p['docker.java.inside.docker']) { - sh "PROFILE=all-dbs,hibernate-66-snapshots " + - "JENKINS_USER_NAME=${p['jenkins.user.name']} " + - "ci/test.sh" + docker.withRegistry(p['docker.proxy.registry'], p['docker.proxy.credentials']) { + docker.image(p['docker.java.next.image']).inside(p['docker.java.inside.docker']) { + sh "PROFILE=all-dbs,hibernate-66-snapshots " + + "JENKINS_USER_NAME=${p['jenkins.user.name']} " + + "ci/test.sh" + } } } } @@ -133,10 +141,12 @@ pipeline { } steps { script { - docker.image(p['docker.java.next.image']).inside(p['docker.java.inside.docker']) { - sh "PROFILE=all-dbs " + - "JENKINS_USER_NAME=${p['jenkins.user.name']} " + - "ci/test.sh" + docker.withRegistry(p['docker.proxy.registry'], p['docker.proxy.credentials']) { + docker.image(p['docker.java.next.image']).inside(p['docker.java.inside.docker']) { + sh "PROFILE=all-dbs " + + "JENKINS_USER_NAME=${p['jenkins.user.name']} " + + "ci/test.sh" + } } } } @@ -154,10 +164,12 @@ pipeline { } steps { script { - docker.image(p['docker.java.main.image']).inside(p['docker.java.inside.docker']) { - sh "PROFILE=all-dbs,eclipselink-next " + - "JENKINS_USER_NAME=${p['jenkins.user.name']} " + - "ci/test.sh" + docker.withRegistry(p['docker.proxy.registry'], p['docker.proxy.credentials']) { + docker.image(p['docker.java.main.image']).inside(p['docker.java.inside.docker']) { + sh "PROFILE=all-dbs,eclipselink-next " + + "JENKINS_USER_NAME=${p['jenkins.user.name']} " + + "ci/test.sh" + } } } } @@ -184,20 +196,22 @@ pipeline { } steps { script { - docker.image(p['docker.java.main.image']).inside(p['docker.java.inside.basic']) { - sh 'MAVEN_OPTS="-Duser.name=' + "${p['jenkins.user.name']}" + ' -Duser.home=/tmp/jenkins-home" ' + - "DEVELOCITY_CACHE_USERNAME=${DEVELOCITY_CACHE_USR} " + - "DEVELOCITY_CACHE_PASSWORD=${DEVELOCITY_CACHE_PSW} " + - "GRADLE_ENTERPRISE_ACCESS_KEY=${DEVELOCITY_ACCESS_KEY} " + - "./mvnw -s settings.xml -Pci,artifactory " + - "-Dartifactory.server=${p['artifactory.url']} " + - "-Dartifactory.username=${ARTIFACTORY_USR} " + - "-Dartifactory.password=${ARTIFACTORY_PSW} " + - "-Dartifactory.staging-repository=${p['artifactory.repository.snapshot']} " + - "-Dartifactory.build-name=spring-data-jpa " + - "-Dartifactory.build-number=spring-data-jpa-${BRANCH_NAME}-build-${BUILD_NUMBER} " + - '-Dmaven.repo.local=/tmp/jenkins-home/.m2/spring-data-jpa-enterprise ' + - '-Dmaven.test.skip=true clean deploy -U -B ' + docker.withRegistry(p['docker.proxy.registry'], p['docker.proxy.credentials']) { + docker.image(p['docker.java.main.image']).inside(p['docker.java.inside.basic']) { + sh 'MAVEN_OPTS="-Duser.name=' + "${p['jenkins.user.name']}" + ' -Duser.home=/tmp/jenkins-home" ' + + "DEVELOCITY_CACHE_USERNAME=${DEVELOCITY_CACHE_USR} " + + "DEVELOCITY_CACHE_PASSWORD=${DEVELOCITY_CACHE_PSW} " + + "GRADLE_ENTERPRISE_ACCESS_KEY=${DEVELOCITY_ACCESS_KEY} " + + "./mvnw -s settings.xml -Pci,artifactory " + + "-Dartifactory.server=${p['artifactory.url']} " + + "-Dartifactory.username=${ARTIFACTORY_USR} " + + "-Dartifactory.password=${ARTIFACTORY_PSW} " + + "-Dartifactory.staging-repository=${p['artifactory.repository.snapshot']} " + + "-Dartifactory.build-name=spring-data-jpa " + + "-Dartifactory.build-number=spring-data-jpa-${BRANCH_NAME}-build-${BUILD_NUMBER} " + + '-Dmaven.repo.local=/tmp/jenkins-home/.m2/spring-data-jpa-enterprise ' + + '-Dmaven.test.skip=true clean deploy -U -B ' + } } } } diff --git a/ci/pipeline.properties b/ci/pipeline.properties index 60057f2659..824563a219 100644 --- a/ci/pipeline.properties +++ b/ci/pipeline.properties @@ -3,8 +3,8 @@ java.main.tag=17.0.9_9-jdk-focal java.next.tag=21.0.1_12-jdk-jammy # Docker container images - standard -docker.java.main.image=harbor-repo.vmware.com/dockerhub-proxy-cache/library/eclipse-temurin:${java.main.tag} -docker.java.next.image=harbor-repo.vmware.com/dockerhub-proxy-cache/library/eclipse-temurin:${java.next.tag} +docker.java.main.image=library/eclipse-temurin:${java.main.tag} +docker.java.next.image=library/eclipse-temurin:${java.next.tag} # Supported versions of MongoDB docker.mongodb.4.4.version=4.4.25 @@ -14,6 +14,7 @@ docker.mongodb.7.0.version=7.0.2 # Supported versions of Redis docker.redis.6.version=6.2.13 +docker.redis.7.version=7.2.4 # Supported versions of Cassandra docker.cassandra.3.version=3.11.16 @@ -25,6 +26,8 @@ docker.java.inside.docker=-u root -v /var/run/docker.sock:/var/run/docker.sock - # Credentials docker.registry= docker.credentials=hub.docker.com-springbuildmaster +docker.proxy.registry=https://docker-hub.usw1.packages.broadcom.com +docker.proxy.credentials=usw1_packages_broadcom_com-jenkins-token artifactory.credentials=02bd1690-b54f-4c9f-819d-a77cb7a9822c artifactory.url=https://repo.spring.io artifactory.repository.snapshot=libs-snapshot-local diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/support/ProxyImageNameSubstitutor.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/support/ProxyImageNameSubstitutor.java index 9ea6d2b235..24fde9888a 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/support/ProxyImageNameSubstitutor.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/support/ProxyImageNameSubstitutor.java @@ -23,7 +23,7 @@ /** * An {@link ImageNameSubstitutor} only used on CI servers to leverage internal proxy solution, that needs to vary the * prefix based on which container image is needed. - * + * * @author Greg Turnquist */ public class ProxyImageNameSubstitutor extends ImageNameSubstitutor { @@ -32,7 +32,7 @@ public class ProxyImageNameSubstitutor extends ImageNameSubstitutor { private static final List NAMES_TO_LIBRARY_PROXY_PREFIX = List.of("mysql", "postgres"); - private static final String PROXY_PREFIX = "harbor-repo.vmware.com/dockerhub-proxy-cache/"; + private static final String PROXY_PREFIX = "docker-hub.usw1.packages.broadcom.com/"; private static final String LIBRARY_PROXY_PREFIX = PROXY_PREFIX + "library/"; From b47b45411114c4cec6f76af85c834e45428a332d Mon Sep 17 00:00:00 2001 From: Mark Paluch Date: Thu, 20 Jun 2024 14:20:15 +0200 Subject: [PATCH 015/157] Remove Slack notification. See #3519 --- Jenkinsfile | 4 ---- 1 file changed, 4 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 94b8241ff3..9132728990 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -221,10 +221,6 @@ pipeline { post { changed { script { - slackSend( - color: (currentBuild.currentResult == 'SUCCESS') ? 'good' : 'danger', - channel: '#spring-data-dev', - message: "${currentBuild.fullDisplayName} - `${currentBuild.currentResult}`\n${env.BUILD_URL}") emailext( subject: "[${currentBuild.fullDisplayName}] ${currentBuild.currentResult}", mimeType: 'text/html', From 47ded391d0f2f0de4e904606ac190daa41b6b8c7 Mon Sep 17 00:00:00 2001 From: Yanming Zhou Date: Fri, 10 May 2024 12:43:25 +0800 Subject: [PATCH 016/157] Fix warnings for passing 'null' argument to parameter annotated as non nullable. Relates to: #3036 Closes: #3468 --- .../data/jpa/repository/support/SimpleJpaRepository.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/SimpleJpaRepository.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/SimpleJpaRepository.java index cbd6552b1f..a261064cca 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/SimpleJpaRepository.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/SimpleJpaRepository.java @@ -431,7 +431,7 @@ public Page findAll(Pageable pageable) { return new PageImpl<>(findAll()); } - return findAll((Specification) null, pageable); + return findAll((root, query, criteriaBuilder) -> null, pageable); } @Override @@ -483,7 +483,7 @@ public long delete(Specification spec) { CriteriaDelete delete = builder.createCriteriaDelete(getDomainClass()); if (spec != null) { - Predicate predicate = spec.toPredicate(delete.from(getDomainClass()), null, builder); + Predicate predicate = spec.toPredicate(delete.from(getDomainClass()), builder.createQuery(getDomainClass()), builder); if (predicate != null) { delete.where(predicate); From 871b1b627d4189d30e9116f873aed880add96927 Mon Sep 17 00:00:00 2001 From: Christoph Strobl Date: Thu, 20 Jun 2024 13:24:45 +0200 Subject: [PATCH 017/157] Update nullability annotations and javadoc. Reflect allowed null arguments in both documentation as well as supporting annotations. See: #3036 --- .../data/jpa/domain/Specification.java | 4 +-- .../jpa/domain/SpecificationComposition.java | 2 +- .../repository/JpaSpecificationExecutor.java | 29 +++++++++++++------ .../support/SimpleJpaRepository.java | 8 ++--- 4 files changed, 27 insertions(+), 16 deletions(-) diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/domain/Specification.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/domain/Specification.java index 635cd0d195..462a02ea77 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/domain/Specification.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/domain/Specification.java @@ -96,12 +96,12 @@ default Specification or(@Nullable Specification other) { * {@link Root} and {@link CriteriaQuery}. * * @param root must not be {@literal null}. - * @param query must not be {@literal null}. + * @param query can be {@literal null} to allow overrides that accept {@link jakarta.persistence.criteria.CriteriaDelete} which is an {@link jakarta.persistence.criteria.AbstractQuery} but no {@link CriteriaQuery}. * @param criteriaBuilder must not be {@literal null}. * @return a {@link Predicate}, may be {@literal null}. */ @Nullable - Predicate toPredicate(Root root, CriteriaQuery query, CriteriaBuilder criteriaBuilder); + Predicate toPredicate(Root root, @Nullable CriteriaQuery query, CriteriaBuilder criteriaBuilder); /** * Applies an AND operation to all the given {@link Specification}s. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/domain/SpecificationComposition.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/domain/SpecificationComposition.java index f708fcef4b..9b0654bd76 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/domain/SpecificationComposition.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/domain/SpecificationComposition.java @@ -57,7 +57,7 @@ static Specification composed(@Nullable Specification lhs, @Nullable S } @Nullable - private static Predicate toPredicate(@Nullable Specification specification, Root root, CriteriaQuery query, + private static Predicate toPredicate(@Nullable Specification specification, Root root, @Nullable CriteriaQuery query, CriteriaBuilder builder) { return specification == null ? null : specification.toPredicate(root, query, builder); } diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/JpaSpecificationExecutor.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/JpaSpecificationExecutor.java index f04544f958..0d38cc580d 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/JpaSpecificationExecutor.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/JpaSpecificationExecutor.java @@ -28,6 +28,7 @@ import org.springframework.data.domain.Sort; import org.springframework.data.jpa.domain.Specification; import org.springframework.data.repository.query.FluentQuery; +import org.springframework.lang.Nullable; /** * Interface to allow execution of {@link Specification}s based on the JPA criteria API. @@ -50,37 +51,45 @@ public interface JpaSpecificationExecutor { /** * Returns all entities matching the given {@link Specification}. + *

+ * If no {@link Specification} is given all entities matching {@code } will be selected. * - * @param spec must not be {@literal null}. + * @param spec can be {@literal null}. * @return never {@literal null}. */ - List findAll(Specification spec); + List findAll(@Nullable Specification spec); /** * Returns a {@link Page} of entities matching the given {@link Specification}. + *

+ * If no {@link Specification} is given all entities matching {@code } will be selected. * - * @param spec must not be {@literal null}. + * @param spec can be {@literal null}. * @param pageable must not be {@literal null}. * @return never {@literal null}. */ - Page findAll(Specification spec, Pageable pageable); + Page findAll(@Nullable Specification spec, Pageable pageable); /** * Returns all entities matching the given {@link Specification} and {@link Sort}. + *

+ * If no {@link Specification} is given all entities matching {@code } will be selected. * - * @param spec must not be {@literal null}. + * @param spec can be {@literal null}. * @param sort must not be {@literal null}. * @return never {@literal null}. */ - List findAll(Specification spec, Sort sort); + List findAll(@Nullable Specification spec, Sort sort); /** * Returns the number of instances that the given {@link Specification} will return. + *

+ * If no {@link Specification} is given all entities matching {@code } will be counted. * * @param spec the {@link Specification} to count instances for, must not be {@literal null}. * @return the number of instances. */ - long count(Specification spec); + long count(@Nullable Specification spec); /** * Checks whether the data store contains elements that match the given {@link Specification}. @@ -101,12 +110,14 @@ public interface JpaSpecificationExecutor { * {@link Specification#toPredicate(Root, CriteriaQuery, CriteriaBuilder)} will be {@literal null} because * {@link jakarta.persistence.criteria.CriteriaBuilder#createCriteriaDelete(Class)} does not implement * {@code CriteriaQuery}. + *

+ * If no {@link Specification} is given all entities matching {@code } will be deleted. * - * @param spec the {@link Specification} to use for the existence check, must not be {@literal null}. + * @param spec the {@link Specification} to use for the existence check, can not be {@literal null}. * @return the number of entities deleted. * @since 3.0 */ - long delete(Specification spec); + long delete(@Nullable Specification spec); /** * Returns entities matching the given {@link Specification} applying the {@code queryFunction} that defines the query diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/SimpleJpaRepository.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/SimpleJpaRepository.java index a261064cca..a2aaf3478e 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/SimpleJpaRepository.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/SimpleJpaRepository.java @@ -431,7 +431,7 @@ public Page findAll(Pageable pageable) { return new PageImpl<>(findAll()); } - return findAll((root, query, criteriaBuilder) -> null, pageable); + return findAll((Specification) null, pageable); } @Override @@ -450,7 +450,7 @@ public List findAll(Specification spec) { } @Override - public Page findAll(Specification spec, Pageable pageable) { + public Page findAll(@Nullable Specification spec, Pageable pageable) { TypedQuery query = getQuery(spec, pageable); return pageable.isUnpaged() ? new PageImpl<>(query.getResultList()) @@ -458,7 +458,7 @@ public Page findAll(Specification spec, Pageable pageable) { } @Override - public List findAll(Specification spec, Sort sort) { + public List findAll(@Nullable Specification spec, Sort sort) { return getQuery(spec, sort).getResultList(); } @@ -477,7 +477,7 @@ public boolean exists(Specification spec) { @Override @Transactional - public long delete(Specification spec) { + public long delete(@Nullable Specification spec) { CriteriaBuilder builder = this.entityManager.getCriteriaBuilder(); CriteriaDelete delete = builder.createCriteriaDelete(getDomainClass()); From 5546153ca69e917ce4b3b8120ca0d0ffb1419aac Mon Sep 17 00:00:00 2001 From: Yanming Zhou Date: Sun, 28 Apr 2024 15:41:06 +0800 Subject: [PATCH 018/157] Ignore offset for if it defaults to `0`. Avoid calling `Query.setFirstResult(0)` which maybe generated sql contains unwanted `offset 0` when using query methods accepting `Limit` . Closes #3242 Original pull request: #3454 --- .../jpa/repository/query/ParameterBinder.java | 7 ++- .../query/ParameterBinderUnitTests.java | 43 +++++++++++++++++++ 2 files changed, 49 insertions(+), 1 deletion(-) diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/ParameterBinder.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/ParameterBinder.java index 25f6cff812..dfd0dabcea 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/ParameterBinder.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/ParameterBinder.java @@ -30,6 +30,7 @@ * @author Mark Paluch * @author Christoph Strobl * @author Jens Schauder + * @author Yanming Zhou */ public class ParameterBinder { @@ -101,7 +102,11 @@ Query bindAndPrepare(Query query, QueryParameterSetter.QueryMetadata metadata, return query; } - query.setFirstResult(PageableUtils.getOffsetAsInteger(accessor.getPageable())); + // see #3242 + if (!parameters.hasLimitParameter()) { + // offset is meaningless if Limit parameter present + query.setFirstResult(PageableUtils.getOffsetAsInteger(accessor.getPageable())); + } query.setMaxResults(accessor.getPageable().getPageSize()); return query; diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/ParameterBinderUnitTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/ParameterBinderUnitTests.java index e62dc25bcc..3cd30f2913 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/ParameterBinderUnitTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/ParameterBinderUnitTests.java @@ -39,6 +39,7 @@ import org.mockito.junit.jupiter.MockitoSettings; import org.mockito.quality.Strictness; +import org.springframework.data.domain.Limit; import org.springframework.data.domain.Pageable; import org.springframework.data.domain.Sort; import org.springframework.data.jpa.repository.Temporal; @@ -53,6 +54,7 @@ * @author Thomas Darimont * @author Jens Schauder * @author Mark Paluch + * @author Yanming Zhou */ @ExtendWith(MockitoExtension.class) @MockitoSettings(strictness = Strictness.LENIENT) @@ -86,6 +88,8 @@ interface SampleRepository extends Repository { User validWithPageable(@Param("username") String username, Pageable pageable); + User validWithLimit(@Param("username") String username, Limit limit); + User validWithSort(@Param("username") String username, Sort sort); User validWithDefaultTemporalTypeParameter(@Temporal Date registerDate); @@ -122,6 +126,40 @@ void bindWorksWithNullForPageable() throws Exception { verify(query).setParameter(eq(1), eq("foo")); } + @Test + void bindAndPrepareWorksWithPageable() throws Exception { + + Method validWithPageable = SampleRepository.class.getMethod("validWithPageable", String.class, Pageable.class); + + Object[] values = { "foo", Pageable.ofSize(10).withPage(3) }; + bindAndPrepare(validWithPageable, values); + verify(query).setParameter(eq(1), eq("foo")); + verify(query).setFirstResult(eq(30)); + verify(query).setMaxResults(eq(10)); + } + + @Test + void bindWorksWithNullForLimit() throws Exception { + + Method validWithLimit = SampleRepository.class.getMethod("validWithLimit", String.class, Limit.class); + + Object[] values = { "foo", null }; + bind(validWithLimit, values); + verify(query).setParameter(eq(1), eq("foo")); + } + + @Test + void bindAndPrepareWorksWithLimit() throws Exception { + + Method validWithLimit = SampleRepository.class.getMethod("validWithLimit", String.class, Limit.class); + + Object[] values = { "foo", Limit.of(10) }; + bindAndPrepare(validWithLimit, values); + verify(query).setParameter(eq(1), eq("foo")); + verify(query).setMaxResults(eq(10)); + verify(query, never()).setFirstResult(anyInt()); + } + @Test void usesIndexedParametersIfNoParamAnnotationPresent() { @@ -236,6 +274,11 @@ private void bind(Method method, JpaParameters parameters, Object[] values) { getAccessor(method, values), QueryParameterSetter.ErrorHandling.STRICT); } + private void bindAndPrepare(Method method, Object[] values) { + ParameterBinderFactory.createBinder(createParameters(method)).bindAndPrepare(query, + new QueryParameterSetter.QueryMetadata(query), getAccessor(method, values)); + } + private JpaParametersParameterAccessor getAccessor(Method method, Object... values) { return new JpaParametersParameterAccessor(createParameters(method), values); } From a2f47a5b49b1e0ea0df4d4ed6675cbfa56e29c5e Mon Sep 17 00:00:00 2001 From: Mark Paluch Date: Thu, 27 Jun 2024 14:39:41 +0200 Subject: [PATCH 019/157] Polishing. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Skip Query.setFirstResult(…) if the pagable offset is not zero. See #3242 Original pull request: #3454 --- .../jpa/repository/query/ParameterBinder.java | 16 +++++++---- .../query/ParameterBinderUnitTests.java | 28 +++++++++++-------- 2 files changed, 26 insertions(+), 18 deletions(-) diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/ParameterBinder.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/ParameterBinder.java index dfd0dabcea..78fc9531ee 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/ParameterBinder.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/ParameterBinder.java @@ -17,6 +17,7 @@ import jakarta.persistence.Query; +import org.springframework.data.domain.Pageable; import org.springframework.data.jpa.repository.query.QueryParameterSetter.ErrorHandling; import org.springframework.data.jpa.support.PageableUtils; import org.springframework.util.Assert; @@ -98,16 +99,19 @@ Query bindAndPrepare(Query query, QueryParameterSetter.QueryMetadata metadata, bind(query, metadata, accessor); - if (!useJpaForPaging || !parameters.hasLimitingParameters() || accessor.getPageable().isUnpaged()) { + Pageable pageable = accessor.getPageable(); + + if (!useJpaForPaging || !parameters.hasLimitingParameters() || pageable.isUnpaged()) { return query; } - // see #3242 - if (!parameters.hasLimitParameter()) { - // offset is meaningless if Limit parameter present - query.setFirstResult(PageableUtils.getOffsetAsInteger(accessor.getPageable())); + // Apply offset only if it is not 0 (the default). + int offset = PageableUtils.getOffsetAsInteger(pageable); + if (offset != 0) { + query.setFirstResult(offset); } - query.setMaxResults(accessor.getPageable().getPageSize()); + + query.setMaxResults(pageable.getPageSize()); return query; } diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/ParameterBinderUnitTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/ParameterBinderUnitTests.java index 3cd30f2913..4f90c40c71 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/ParameterBinderUnitTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/ParameterBinderUnitTests.java @@ -126,37 +126,41 @@ void bindWorksWithNullForPageable() throws Exception { verify(query).setParameter(eq(1), eq("foo")); } - @Test + @Test // GH-3242 void bindAndPrepareWorksWithPageable() throws Exception { Method validWithPageable = SampleRepository.class.getMethod("validWithPageable", String.class, Pageable.class); - Object[] values = { "foo", Pageable.ofSize(10).withPage(3) }; + bindAndPrepare(validWithPageable, values); - verify(query).setParameter(eq(1), eq("foo")); - verify(query).setFirstResult(eq(30)); - verify(query).setMaxResults(eq(10)); + + verify(query).setParameter(1, "foo"); + verify(query).setFirstResult(30); + verify(query).setMaxResults(10); } - @Test + @Test // GH-3242 void bindWorksWithNullForLimit() throws Exception { Method validWithLimit = SampleRepository.class.getMethod("validWithLimit", String.class, Limit.class); - Object[] values = { "foo", null }; + bind(validWithLimit, values); - verify(query).setParameter(eq(1), eq("foo")); + + verify(query).setParameter(1, "foo"); + verify(query, never()).setFirstResult(anyInt()); } - @Test + @Test // GH-3242 void bindAndPrepareWorksWithLimit() throws Exception { Method validWithLimit = SampleRepository.class.getMethod("validWithLimit", String.class, Limit.class); - Object[] values = { "foo", Limit.of(10) }; + bindAndPrepare(validWithLimit, values); - verify(query).setParameter(eq(1), eq("foo")); - verify(query).setMaxResults(eq(10)); + + verify(query).setParameter(1, "foo"); + verify(query).setMaxResults(10); verify(query, never()).setFirstResult(anyInt()); } From 36fb898498dffa75a442e8719f238b8df45f6d7c Mon Sep 17 00:00:00 2001 From: soominsohn Date: Mon, 1 Jul 2024 21:01:55 +0900 Subject: [PATCH 020/157] Fix typo in README.adoc The correct wildcard for JPQL is `%`. Original pull request #3530 --- README.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.adoc b/README.adoc index 6d3eae3271..a8421d9d54 100644 --- a/README.adoc +++ b/README.adoc @@ -55,7 +55,7 @@ public class MyService { repository.save(person); List lastNameResults = repository.findByLastname("Gierke"); - List firstNameResults = repository.findByFirstnameLike("Oli*"); + List firstNameResults = repository.findByFirstnameLike("Oli%"); } } From 9e431b7fe8417f7b129fc7167a1609455ffceb26 Mon Sep 17 00:00:00 2001 From: Christoph Strobl Date: Thu, 4 Jul 2024 11:57:52 +0200 Subject: [PATCH 021/157] Upgrade Hibernate 6.2 & 6.5 Snapshots. See: #3473 --- pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index 73eaf075da..8bcbebe190 100755 --- a/pom.xml +++ b/pom.xml @@ -31,8 +31,8 @@ 3.0.4 4.0.2 6.5.0.Final - 6.2.24.Final - 6.5.1-SNAPSHOT + 6.2.28.Final + 6.5.3-SNAPSHOT 6.6.0-SNAPSHOT 7.0.0-SNAPSHOT 2.7.1 From 59fb2f2803ac2e09231e4005ace1a0d4de104fed Mon Sep 17 00:00:00 2001 From: Jens Schauder Date: Fri, 12 Jul 2024 19:09:00 +0200 Subject: [PATCH 022/157] Prepare 3.3.2 (2024.0.2). See #3511 --- pom.xml | 20 ++++---------------- 1 file changed, 4 insertions(+), 16 deletions(-) diff --git a/pom.xml b/pom.xml index 8bcbebe190..3210e924a9 100755 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ org.springframework.data.build spring-data-parent - 3.3.2-SNAPSHOT + 3.3.2 @@ -41,7 +41,7 @@ 4.9 8.0.33 42.6.0 - 3.3.2-SNAPSHOT + 3.3.2 0.10.3 org.hibernate @@ -278,20 +278,8 @@ - - spring-snapshot - https://repo.spring.io/snapshot - - true - - - false - - - - spring-milestone - https://repo.spring.io/milestone - + + From dba72821cfb7f397e35cabf16d778bcce613aac9 Mon Sep 17 00:00:00 2001 From: Jens Schauder Date: Fri, 12 Jul 2024 19:09:19 +0200 Subject: [PATCH 023/157] Release version 3.3.2 (2024.0.2). See #3511 --- pom.xml | 2 +- spring-data-envers/pom.xml | 4 ++-- spring-data-jpa-distribution/pom.xml | 2 +- spring-data-jpa/pom.xml | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/pom.xml b/pom.xml index 3210e924a9..cf93707fba 100755 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ org.springframework.data spring-data-jpa-parent - 3.3.2-SNAPSHOT + 3.3.2 pom Spring Data JPA Parent diff --git a/spring-data-envers/pom.xml b/spring-data-envers/pom.xml index 32de9f5ee1..4819f19d74 100755 --- a/spring-data-envers/pom.xml +++ b/spring-data-envers/pom.xml @@ -5,12 +5,12 @@ org.springframework.data spring-data-envers - 3.3.2-SNAPSHOT + 3.3.2 org.springframework.data spring-data-jpa-parent - 3.3.2-SNAPSHOT + 3.3.2 ../pom.xml diff --git a/spring-data-jpa-distribution/pom.xml b/spring-data-jpa-distribution/pom.xml index 2b607c814a..8377aed3ee 100644 --- a/spring-data-jpa-distribution/pom.xml +++ b/spring-data-jpa-distribution/pom.xml @@ -14,7 +14,7 @@ org.springframework.data spring-data-jpa-parent - 3.3.2-SNAPSHOT + 3.3.2 ../pom.xml diff --git a/spring-data-jpa/pom.xml b/spring-data-jpa/pom.xml index 9f47fc6f28..57d1c3e147 100644 --- a/spring-data-jpa/pom.xml +++ b/spring-data-jpa/pom.xml @@ -6,7 +6,7 @@ org.springframework.data spring-data-jpa - 3.3.2-SNAPSHOT + 3.3.2 Spring Data JPA Spring Data module for JPA repositories. @@ -15,7 +15,7 @@ org.springframework.data spring-data-jpa-parent - 3.3.2-SNAPSHOT + 3.3.2 ../pom.xml From cb77da26492b6cdbd5cb60ae30aa013da4a8f97c Mon Sep 17 00:00:00 2001 From: Jens Schauder Date: Fri, 12 Jul 2024 19:12:13 +0200 Subject: [PATCH 024/157] Prepare next development iteration. See #3511 --- pom.xml | 2 +- spring-data-envers/pom.xml | 4 ++-- spring-data-jpa-distribution/pom.xml | 2 +- spring-data-jpa/pom.xml | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/pom.xml b/pom.xml index cf93707fba..05a888c158 100755 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ org.springframework.data spring-data-jpa-parent - 3.3.2 + 3.3.3-SNAPSHOT pom Spring Data JPA Parent diff --git a/spring-data-envers/pom.xml b/spring-data-envers/pom.xml index 4819f19d74..bc4634fc58 100755 --- a/spring-data-envers/pom.xml +++ b/spring-data-envers/pom.xml @@ -5,12 +5,12 @@ org.springframework.data spring-data-envers - 3.3.2 + 3.3.3-SNAPSHOT org.springframework.data spring-data-jpa-parent - 3.3.2 + 3.3.3-SNAPSHOT ../pom.xml diff --git a/spring-data-jpa-distribution/pom.xml b/spring-data-jpa-distribution/pom.xml index 8377aed3ee..a3e5263b49 100644 --- a/spring-data-jpa-distribution/pom.xml +++ b/spring-data-jpa-distribution/pom.xml @@ -14,7 +14,7 @@ org.springframework.data spring-data-jpa-parent - 3.3.2 + 3.3.3-SNAPSHOT ../pom.xml diff --git a/spring-data-jpa/pom.xml b/spring-data-jpa/pom.xml index 57d1c3e147..6b93cac7d9 100644 --- a/spring-data-jpa/pom.xml +++ b/spring-data-jpa/pom.xml @@ -6,7 +6,7 @@ org.springframework.data spring-data-jpa - 3.3.2 + 3.3.3-SNAPSHOT Spring Data JPA Spring Data module for JPA repositories. @@ -15,7 +15,7 @@ org.springframework.data spring-data-jpa-parent - 3.3.2 + 3.3.3-SNAPSHOT ../pom.xml From ee0ef47749744980bdae338d5ae05f8e7d5bb776 Mon Sep 17 00:00:00 2001 From: Jens Schauder Date: Fri, 12 Jul 2024 19:12:14 +0200 Subject: [PATCH 025/157] After release cleanups. See #3511 --- pom.xml | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/pom.xml b/pom.xml index 05a888c158..362856984f 100755 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ org.springframework.data.build spring-data-parent - 3.3.2 + 3.3.3-SNAPSHOT @@ -41,7 +41,7 @@ 4.9 8.0.33 42.6.0 - 3.3.2 + 3.3.3-SNAPSHOT 0.10.3 org.hibernate @@ -278,8 +278,20 @@ - - + + spring-snapshot + https://repo.spring.io/snapshot + + true + + + false + + + + spring-milestone + https://repo.spring.io/milestone + From c1b287f8a587a8276cf7c12773e130c6f01bcd38 Mon Sep 17 00:00:00 2001 From: Mark Paluch Date: Wed, 24 Jul 2024 08:59:56 +0200 Subject: [PATCH 026/157] Remove #sort check for sorted native queries. We now no longer check for #sort in native queries to apply sorting directly. This was a leftover from earlier query rewriting. Closes #3546 --- .../query/AbstractStringBasedJpaQuery.java | 6 +- .../jpa/repository/query/NativeJpaQuery.java | 7 -- .../query/DefaultQueryEnhancerUnitTests.java | 14 +++ .../JSqlParserQueryEnhancerUnitTests.java | 11 +++ .../JpaQueryLookupStrategyUnitTests.java | 17 ---- .../query/NativeJpaQueryUnitTests.java | 97 +++++++++++++++++++ .../query/SimpleJpaQueryUnitTests.java | 12 +-- 7 files changed, 128 insertions(+), 36 deletions(-) create mode 100644 spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/NativeJpaQueryUnitTests.java diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/AbstractStringBasedJpaQuery.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/AbstractStringBasedJpaQuery.java index f219c374d2..c60da04424 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/AbstractStringBasedJpaQuery.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/AbstractStringBasedJpaQuery.java @@ -117,7 +117,7 @@ public AbstractStringBasedJpaQuery(JpaQueryMethod method, EntityManager em, Stri public Query doCreateQuery(JpaParametersParameterAccessor accessor) { Sort sort = accessor.getSort(); - String sortedQueryString = querySortRewriter.getSorted(query, sort); + String sortedQueryString = getSortedQueryString(sort); ResultProcessor processor = getQueryMethod().getResultProcessor().withDynamicProjection(accessor); @@ -130,6 +130,10 @@ public Query doCreateQuery(JpaParametersParameterAccessor accessor) { return parameterBinder.get().bindAndPrepare(query, metadata, accessor); } + String getSortedQueryString(Sort sort) { + return querySortRewriter.getSorted(query, sort); + } + @Override protected ParameterBinder createBinder() { return createBinder(query); diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/NativeJpaQuery.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/NativeJpaQuery.java index 52dfd37e22..fe5958fca0 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/NativeJpaQuery.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/NativeJpaQuery.java @@ -22,7 +22,6 @@ import org.springframework.data.domain.Pageable; import org.springframework.data.domain.Sort; import org.springframework.data.jpa.repository.QueryRewriter; -import org.springframework.data.repository.query.Parameters; import org.springframework.data.repository.query.QueryMethodEvaluationContextProvider; import org.springframework.data.repository.query.RepositoryQuery; import org.springframework.data.repository.query.ReturnedType; @@ -56,12 +55,6 @@ public NativeJpaQuery(JpaQueryMethod method, EntityManager em, String queryStrin SpelExpressionParser parser) { super(method, em, queryString, countQueryString, rewriter, evaluationContextProvider, parser); - - Parameters parameters = method.getParameters(); - - if (parameters.hasSortParameter() && !queryString.contains("#sort")) { - throw new InvalidJpaQueryMethodException("Cannot use native queries with dynamic sorting in method " + method); - } } @Override diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/DefaultQueryEnhancerUnitTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/DefaultQueryEnhancerUnitTests.java index f1d7e707d8..da2bb066ac 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/DefaultQueryEnhancerUnitTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/DefaultQueryEnhancerUnitTests.java @@ -15,9 +15,13 @@ */ package org.springframework.data.jpa.repository.query; +import static org.assertj.core.api.Assertions.*; + import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; +import org.springframework.data.domain.Sort; + /** * TCK Tests for {@link DefaultQueryEnhancer}. * @@ -34,4 +38,14 @@ QueryEnhancer createQueryEnhancer(DeclaredQuery declaredQuery) { @Test // GH-2511, GH-2773 @Disabled("Not properly supported by QueryUtils") void shouldDeriveNativeCountQueryWithVariable(String query, String expected) {} + + @Test // GH-3546 + void shouldApplySorting() { + + QueryEnhancer enhancer = createQueryEnhancer(DeclaredQuery.of("SELECT e FROM Employee e", true)); + + String sql = enhancer.applySorting(Sort.by("foo", "bar")); + + assertThat(sql).isEqualTo("SELECT e FROM Employee e order by e.foo asc, e.bar asc"); + } } diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/JSqlParserQueryEnhancerUnitTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/JSqlParserQueryEnhancerUnitTests.java index 58b5b65893..a1f3015b59 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/JSqlParserQueryEnhancerUnitTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/JSqlParserQueryEnhancerUnitTests.java @@ -41,6 +41,16 @@ QueryEnhancer createQueryEnhancer(DeclaredQuery declaredQuery) { return new JSqlParserQueryEnhancer(declaredQuery); } + @Test // GH-3546 + void shouldApplySorting() { + + QueryEnhancer enhancer = createQueryEnhancer(DeclaredQuery.of("SELECT e FROM Employee e", true)); + + String sql = enhancer.applySorting(Sort.by("foo", "bar")); + + assertThat(sql).isEqualTo("SELECT e FROM Employee e ORDER BY e.foo ASC, e.bar ASC"); + } + @Override @ParameterizedTest // GH-2773 @MethodSource("jpqlCountQueries") @@ -237,4 +247,5 @@ static Stream mergeStatementWorksSource() { "merge into a using (select id2, value from b) on (id = id2) when matched then update set a.value = value", null)); } + } diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/JpaQueryLookupStrategyUnitTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/JpaQueryLookupStrategyUnitTests.java index 5267425a50..ffa4475b45 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/JpaQueryLookupStrategyUnitTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/JpaQueryLookupStrategyUnitTests.java @@ -101,20 +101,6 @@ void invalidAnnotatedQueryCausesException() throws Exception { .withCause(reference); } - @Test // DATAJPA-554 - void sholdThrowMorePreciseExceptionIfTryingToUsePaginationInNativeQueries() throws Exception { - - QueryLookupStrategy strategy = JpaQueryLookupStrategy.create(em, queryMethodFactory, Key.CREATE_IF_NOT_FOUND, - EVALUATION_CONTEXT_PROVIDER, new BeanFactoryQueryRewriterProvider(beanFactory), EscapeCharacter.DEFAULT); - Method method = UserRepository.class.getMethod("findByInvalidNativeQuery", String.class, Sort.class); - RepositoryMetadata metadata = new DefaultRepositoryMetadata(UserRepository.class); - - assertThatExceptionOfType(InvalidJpaQueryMethodException.class) - .isThrownBy(() -> strategy.resolveQuery(method, metadata, projectionFactory, namedQueries)) - .withMessageContaining("Cannot use native queries with dynamic sorting in method") - .withMessageContaining(method.toString()); - } - @Test // GH-2217 void considersNamedCountQuery() throws Exception { @@ -235,9 +221,6 @@ interface UserRepository extends Repository { @Query("something absurd") User findByFoo(String foo); - @Query(value = "select u.* from User u", nativeQuery = true) - List findByInvalidNativeQuery(String param, Sort sort); - @Query(countName = "foo.count") Page findByNamedQuery(String foo, Pageable pageable); diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/NativeJpaQueryUnitTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/NativeJpaQueryUnitTests.java new file mode 100644 index 0000000000..67c61b9305 --- /dev/null +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/NativeJpaQueryUnitTests.java @@ -0,0 +1,97 @@ +/* + * Copyright 2024 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.springframework.data.jpa.repository.query; + +import static org.assertj.core.api.Assertions.*; +import static org.mockito.Mockito.*; + +import jakarta.persistence.EntityManager; +import jakarta.persistence.EntityManagerFactory; +import jakarta.persistence.metamodel.Metamodel; + +import java.lang.reflect.Method; + +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.mockito.Mock; +import org.mockito.junit.jupiter.MockitoSettings; +import org.mockito.quality.Strictness; + +import org.springframework.core.annotation.AnnotatedElementUtils; +import org.springframework.data.domain.Sort; +import org.springframework.data.jpa.provider.QueryExtractor; +import org.springframework.data.jpa.repository.Query; +import org.springframework.data.jpa.repository.QueryRewriter; +import org.springframework.data.projection.SpelAwareProxyProjectionFactory; +import org.springframework.data.repository.Repository; +import org.springframework.data.repository.core.RepositoryMetadata; +import org.springframework.data.repository.core.support.DefaultRepositoryMetadata; +import org.springframework.data.repository.query.QueryMethodEvaluationContextProvider; +import org.springframework.expression.spel.standard.SpelExpressionParser; +import org.springframework.util.ReflectionUtils; + +/** + * Unit tests for {@link NativeJpaQuery}. + * + * @author Mark Paluch + */ +@MockitoSettings(strictness = Strictness.LENIENT) +class NativeJpaQueryUnitTests { + + @Mock EntityManager em; + @Mock EntityManagerFactory emf; + @Mock Metamodel metamodel; + + @BeforeEach + void setUp() { + + when(em.getMetamodel()).thenReturn(metamodel); + when(em.getEntityManagerFactory()).thenReturn(emf); + when(em.getDelegate()).thenReturn(em); + } + + @Test // GH-3546 + void shouldApplySorting() { + + NativeJpaQuery query = getQuery(TestRepo.class, "find", Sort.class); + String sql = query.getSortedQueryString(Sort.by("foo", "bar")); + + assertThat(sql).isEqualTo("SELECT e FROM Employee e order by e.foo asc, e.bar asc"); + } + + private NativeJpaQuery getQuery(Class repository, String method, Class... args) { + Method respositoryMethod = ReflectionUtils.findMethod(repository, method, args); + RepositoryMetadata repositoryMetadata = new DefaultRepositoryMetadata(repository); + SpelAwareProxyProjectionFactory projectionFactory = mock(SpelAwareProxyProjectionFactory.class); + QueryExtractor queryExtractor = mock(QueryExtractor.class); + JpaQueryMethod queryMethod = new JpaQueryMethod(respositoryMethod, repositoryMetadata, projectionFactory, + queryExtractor); + + Query annotation = AnnotatedElementUtils.getMergedAnnotation(respositoryMethod, Query.class); + + NativeJpaQuery query = new NativeJpaQuery(queryMethod, em, annotation.value(), annotation.countQuery(), + QueryRewriter.IdentityQueryRewriter.INSTANCE, QueryMethodEvaluationContextProvider.DEFAULT, + new SpelExpressionParser()); + return query; + } + + interface TestRepo extends Repository { + + @Query("SELECT e FROM Employee e") + Object find(Sort sort); + } + +} diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/SimpleJpaQueryUnitTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/SimpleJpaQueryUnitTests.java index 558dc747e3..e9d7ca11fe 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/SimpleJpaQueryUnitTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/SimpleJpaQueryUnitTests.java @@ -38,10 +38,10 @@ import org.mockito.junit.jupiter.MockitoExtension; import org.mockito.junit.jupiter.MockitoSettings; import org.mockito.quality.Strictness; + import org.springframework.data.domain.Page; import org.springframework.data.domain.PageRequest; import org.springframework.data.domain.Pageable; -import org.springframework.data.domain.Sort; import org.springframework.data.jpa.domain.sample.User; import org.springframework.data.jpa.provider.QueryExtractor; import org.springframework.data.jpa.repository.Query; @@ -163,13 +163,6 @@ void discoversNativeQuery() throws Exception { verify(em).createNativeQuery("SELECT u FROM User u WHERE u.lastname = ?1", User.class); } - @Test // DATAJPA-554 - void rejectsNativeQueryWithDynamicSort() throws Exception { - - Method method = SampleRepository.class.getMethod("findNativeByLastname", String.class, Sort.class); - assertThatExceptionOfType(InvalidJpaQueryMethodException.class).isThrownBy(() -> createJpaQuery(method)); - } - @Test // DATAJPA-352 @SuppressWarnings("unchecked") void doesNotValidateCountQueryIfNotPagingMethod() throws Exception { @@ -300,9 +293,6 @@ interface SampleRepository { @Query(value = "SELECT u FROM User u WHERE u.lastname = ?1", nativeQuery = true) List findNativeByLastname(String lastname); - @Query(value = "SELECT u FROM User u WHERE u.lastname = ?1", nativeQuery = true) - List findNativeByLastname(String lastname, Sort sort); - @Query(value = "SELECT u FROM User u WHERE u.lastname = ?1", nativeQuery = true) List findNativeByLastname(String lastname, Pageable pageable); From 422135bcc51e236758e62c3308586ee347f72567 Mon Sep 17 00:00:00 2001 From: Mark Paluch Date: Wed, 24 Jul 2024 09:00:11 +0200 Subject: [PATCH 027/157] Polishing. Reformat documentation. See #3546 --- src/main/antora/modules/ROOT/pages/jpa/query-methods.adoc | 1 - 1 file changed, 1 deletion(-) diff --git a/src/main/antora/modules/ROOT/pages/jpa/query-methods.adoc b/src/main/antora/modules/ROOT/pages/jpa/query-methods.adoc index d6fb186acc..9b86d9ee6d 100644 --- a/src/main/antora/modules/ROOT/pages/jpa/query-methods.adoc +++ b/src/main/antora/modules/ROOT/pages/jpa/query-methods.adoc @@ -302,7 +302,6 @@ public interface UserRepository extends JpaRepository { Page findByLastname(String lastname, Pageable pageable); } ---- - ==== A similar approach also works with named native queries, by adding the `.count` suffix to a copy of your query. You probably need to register a result set mapping for your count query, though. From 7b2ae0ead98888f22d844e9e1d231838de3001d7 Mon Sep 17 00:00:00 2001 From: Mark Paluch Date: Tue, 30 Jul 2024 15:33:27 +0200 Subject: [PATCH 028/157] Bundle Javadoc with Antora documentation site. Closes #3549 --- .gitignore | 1 - spring-data-jpa-distribution/package.json | 10 ++++++++++ spring-data-jpa-distribution/pom.xml | 2 +- src/main/antora/antora-playbook.yml | 10 ++++------ src/main/antora/antora.yml | 10 +++++++++- src/main/antora/modules/ROOT/nav.adoc | 3 ++- .../modules/ROOT/pages/jpa/entity-persistence.adoc | 2 +- .../antora/modules/ROOT/pages/jpa/transactions.adoc | 2 +- 8 files changed, 28 insertions(+), 12 deletions(-) create mode 100644 spring-data-jpa-distribution/package.json diff --git a/.gitignore b/.gitignore index 6b743d7650..8b11c48a15 100644 --- a/.gitignore +++ b/.gitignore @@ -10,7 +10,6 @@ target/ .DS_Store node_modules package-lock.json -package.json node build/ .mvn/.gradle-enterprise diff --git a/spring-data-jpa-distribution/package.json b/spring-data-jpa-distribution/package.json new file mode 100644 index 0000000000..057a40fe8b --- /dev/null +++ b/spring-data-jpa-distribution/package.json @@ -0,0 +1,10 @@ +{ + "dependencies": { + "antora": "3.2.0-alpha.6", + "@antora/atlas-extension": "1.0.0-alpha.2", + "@antora/collector-extension": "1.0.0-alpha.7", + "@asciidoctor/tabs": "1.0.0-beta.6", + "@springio/antora-extensions": "1.13.0", + "@springio/asciidoctor-extensions": "1.0.0-alpha.11" + } +} diff --git a/spring-data-jpa-distribution/pom.xml b/spring-data-jpa-distribution/pom.xml index a3e5263b49..1163d78f9f 100644 --- a/spring-data-jpa-distribution/pom.xml +++ b/spring-data-jpa-distribution/pom.xml @@ -51,7 +51,7 @@ - io.spring.maven.antora + org.antora antora-maven-plugin diff --git a/src/main/antora/antora-playbook.yml b/src/main/antora/antora-playbook.yml index db6ae1d713..54e23dabe2 100644 --- a/src/main/antora/antora-playbook.yml +++ b/src/main/antora/antora-playbook.yml @@ -3,12 +3,11 @@ # The purpose of this Antora playbook is to build the docs in the current branch. antora: extensions: - - '@antora/collector-extension' - - require: '@springio/antora-extensions/root-component-extension' + - require: '@springio/antora-extensions' root_component_name: 'data-jpa' site: title: Spring Data JPA - url: https://docs.spring.io/spring-data/jpa/reference/ + url: https://docs.spring.io/spring-data/jpa/reference content: sources: - url: ./../../.. @@ -22,13 +21,12 @@ content: start_path: src/main/antora asciidoc: attributes: - page-pagination: '' hide-uri-scheme: '@' tabs-sync-option: '@' - chomp: 'all' extensions: - '@asciidoctor/tabs' - '@springio/asciidoctor-extensions' + - '@springio/asciidoctor-extensions/javadoc-extension' sourcemap: true urls: latest_version_segment: '' @@ -38,5 +36,5 @@ runtime: format: pretty ui: bundle: - url: https://github.com/spring-io/antora-ui-spring/releases/download/v0.3.3/ui-bundle.zip + url: https://github.com/spring-io/antora-ui-spring/releases/download/v0.4.16/ui-bundle.zip snapshot: true diff --git a/src/main/antora/antora.yml b/src/main/antora/antora.yml index 68f27da5f3..53d5a75b58 100644 --- a/src/main/antora/antora.yml +++ b/src/main/antora/antora.yml @@ -5,8 +5,16 @@ nav: - modules/ROOT/nav.adoc ext: collector: + - run: + command: ./mvnw test-compile + local: true - run: command: ./mvnw validate process-resources -pl :spring-data-jpa-distribution -am -Pantora-process-resources local: true scan: - dir: spring-data-jpa-distribution/target/classes/ + dir: spring-data-jpa-distribution/target/classes + - run: + command: ./mvnw package -Pdistribute + local: true + scan: + dir: target/antora diff --git a/src/main/antora/modules/ROOT/nav.adoc b/src/main/antora/modules/ROOT/nav.adoc index 5a0deada15..501232f800 100644 --- a/src/main/antora/modules/ROOT/nav.adoc +++ b/src/main/antora/modules/ROOT/nav.adoc @@ -32,4 +32,5 @@ ** xref:envers/configuration.adoc[] ** xref:envers/usage.adoc[] -* https://github.com/spring-projects/spring-data-commons/wiki[Wiki] +* xref:attachment$api/java/index.html[Javadoc,role=link-external, window=_blank] +* https://github.com/spring-projects/spring-data-commons/wiki[Wiki,role=link-external, window=_blank] diff --git a/src/main/antora/modules/ROOT/pages/jpa/entity-persistence.adoc b/src/main/antora/modules/ROOT/pages/jpa/entity-persistence.adoc index 2fdf37d7a2..0c8392585e 100644 --- a/src/main/antora/modules/ROOT/pages/jpa/entity-persistence.adoc +++ b/src/main/antora/modules/ROOT/pages/jpa/entity-persistence.adoc @@ -19,7 +19,7 @@ Spring Data JPA offers the following strategies to detect whether an entity is n If the identifier property is `null`, then the entity is assumed to be new. Otherwise, it is assumed to be not new. 2. Implementing `Persistable`: If an entity implements `Persistable`, Spring Data JPA delegates the new detection to the `isNew(…)` method of the entity. See the link:$$https://docs.spring.io/spring-data/data-commons/docs/current/api/index.html?org/springframework/data/domain/Persistable.html$$[JavaDoc] for details. -3. Implementing `EntityInformation`: You can customize the `EntityInformation` abstraction used in the `SimpleJpaRepository` implementation by creating a subclass of `JpaRepositoryFactory` and overriding the `getEntityInformation(…)` method accordingly. You then have to register the custom implementation of `JpaRepositoryFactory` as a Spring bean. Note that this should be rarely necessary. See the link:$$https://docs.spring.io/spring-data/data-jpa/docs/current/api/index.html?org/springframework/data/jpa/repository/support/JpaRepositoryFactory.html$$[JavaDoc] for details. +3. Implementing `EntityInformation`: You can customize the `EntityInformation` abstraction used in the `SimpleJpaRepository` implementation by creating a subclass of `JpaRepositoryFactory` and overriding the `getEntityInformation(…)` method accordingly. You then have to register the custom implementation of `JpaRepositoryFactory` as a Spring bean. Note that this should be rarely necessary. See the javadoc:org.springframework.data.jpa.repository.support.JpaRepositoryFactory[JavaDoc] for details. Option 1 is not an option for entities that use manually assigned identifiers and no version attribute as with those the identifier will always be non-`null`. A common pattern in that scenario is to use a common base class with a transient flag defaulting to indicate a new instance and using JPA lifecycle callbacks to flip that flag on persistence operations: diff --git a/src/main/antora/modules/ROOT/pages/jpa/transactions.adoc b/src/main/antora/modules/ROOT/pages/jpa/transactions.adoc index f4abfccdd3..abd25d4f5f 100644 --- a/src/main/antora/modules/ROOT/pages/jpa/transactions.adoc +++ b/src/main/antora/modules/ROOT/pages/jpa/transactions.adoc @@ -1,7 +1,7 @@ [[transactions]] = Transactionality -By default, methods inherited from `CrudRepository` inherit the transactional configuration from link:$$https://docs.spring.io/spring-data/data-jpa/docs/current/api/org/springframework/data/jpa/repository/support/SimpleJpaRepository.html$$[`SimpleJpaRepository`]. +By default, methods inherited from `CrudRepository` inherit the transactional configuration from javadoc:org.springframework.data.jpa.repository.support.SimpleJpaRepository[]. For read operations, the transaction configuration `readOnly` flag is set to `true`. All others are configured with a plain `@Transactional` so that default transaction configuration applies. Repository methods that are backed by transactional repository fragments inherit the transactional attributes from the actual fragment method. From 398b82b9488d503d68fb6d52cd169a3bbca3b10d Mon Sep 17 00:00:00 2001 From: Mark Paluch Date: Thu, 1 Aug 2024 10:17:03 +0200 Subject: [PATCH 029/157] Remove exception guard for absent query handling. We now no longer fall back to an absent query when a NamedQuery construction fails with IllegalArgumentException. IllegalArgumentException is also used by the JPA API to indicate an absent query. In other cases, where we fail with IllegalArgumentException, we fell back to query derivation as handling IAE as signal for an absent query. We already have better query absence checks in place so we can remove the try/catch blocks in favor of the named query presence check. Closes #3550 --- .../data/jpa/repository/query/NamedQuery.java | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/NamedQuery.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/NamedQuery.java index 5b665c287d..e1271d4ea5 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/NamedQuery.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/NamedQuery.java @@ -129,7 +129,7 @@ static boolean hasNamedQuery(EntityManager em, String queryName) { @Nullable public static RepositoryQuery lookupFrom(JpaQueryMethod method, EntityManager em) { - final String queryName = method.getNamedQueryName(); + String queryName = method.getNamedQueryName(); if (LOG.isDebugEnabled()) { LOG.debug(String.format("Looking up named query %s", queryName)); @@ -143,16 +143,11 @@ public static RepositoryQuery lookupFrom(JpaQueryMethod method, EntityManager em throw QueryCreationException.create(method, "Scroll queries are not supported using String-based queries"); } - try { - - RepositoryQuery query = new NamedQuery(method, em); - if (LOG.isDebugEnabled()) { - LOG.debug(String.format("Found named query %s", queryName)); - } - return query; - } catch (IllegalArgumentException e) { - return null; + RepositoryQuery query = new NamedQuery(method, em); + if (LOG.isDebugEnabled()) { + LOG.debug(String.format("Found named query %s", queryName)); } + return query; } @Override From 55157873d90727131c58f06dab324816fe308be8 Mon Sep 17 00:00:00 2001 From: Eric Haag Date: Mon, 5 Aug 2024 03:43:59 -0500 Subject: [PATCH 030/157] Migrate build to Spring Develocity Conventions extension. * Migrate build to Spring Develocity Conventions extension. * Adopt Develocity environment variables. Closes #3552 --- .gitignore | 2 +- .mvn/extensions.xml | 13 ++++--------- .mvn/gradle-enterprise.xml | 31 ------------------------------- Jenkinsfile | 10 ---------- ci/pipeline.properties | 1 - ci/test.sh | 9 ++------- pom.xml | 6 +++--- 7 files changed, 10 insertions(+), 62 deletions(-) delete mode 100644 .mvn/gradle-enterprise.xml diff --git a/.gitignore b/.gitignore index 8b11c48a15..6306c81ec6 100644 --- a/.gitignore +++ b/.gitignore @@ -12,4 +12,4 @@ node_modules package-lock.json node build/ -.mvn/.gradle-enterprise +.mvn/.develocity diff --git a/.mvn/extensions.xml b/.mvn/extensions.xml index 85a16c3aa2..1e3bb355f5 100644 --- a/.mvn/extensions.xml +++ b/.mvn/extensions.xml @@ -1,13 +1,8 @@ - com.gradle - gradle-enterprise-maven-extension - 1.18.1 + io.spring.develocity.conventions + develocity-conventions-maven-extension + 0.0.19 - - com.gradle - common-custom-user-data-maven-extension - 1.12.2 - - \ No newline at end of file + diff --git a/.mvn/gradle-enterprise.xml b/.mvn/gradle-enterprise.xml deleted file mode 100644 index bbc0073bfe..0000000000 --- a/.mvn/gradle-enterprise.xml +++ /dev/null @@ -1,31 +0,0 @@ - - - - https://ge.spring.io - - - false - true - true - - #{{'0.0.0.0'}} - - - - - true - - - - - ${env.DEVELOCITY_CACHE_USERNAME} - ${env.DEVELOCITY_CACHE_PASSWORD} - - - true - #{env['DEVELOCITY_CACHE_USERNAME'] != null and env['DEVELOCITY_CACHE_PASSWORD'] != null} - - - \ No newline at end of file diff --git a/Jenkinsfile b/Jenkinsfile index 9132728990..4a10215b53 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -32,7 +32,6 @@ pipeline { options { timeout(time: 30, unit: 'MINUTES') } environment { ARTIFACTORY = credentials("${p['artifactory.credentials']}") - DEVELOCITY_CACHE = credentials("${p['develocity.cache.credentials']}") DEVELOCITY_ACCESS_KEY = credentials("${p['develocity.access-key']}") TESTCONTAINERS_IMAGE_SUBSTITUTOR = 'org.springframework.data.jpa.support.ProxyImageNameSubstitutor' } @@ -66,7 +65,6 @@ pipeline { options { timeout(time: 30, unit: 'MINUTES')} environment { ARTIFACTORY = credentials("${p['artifactory.credentials']}") - DEVELOCITY_CACHE = credentials("${p['develocity.cache.credentials']}") DEVELOCITY_ACCESS_KEY = credentials("${p['develocity.access-key']}") TESTCONTAINERS_IMAGE_SUBSTITUTOR = 'org.springframework.data.jpa.support.ProxyImageNameSubstitutor' } @@ -89,7 +87,6 @@ pipeline { options { timeout(time: 30, unit: 'MINUTES')} environment { ARTIFACTORY = credentials("${p['artifactory.credentials']}") - DEVELOCITY_CACHE = credentials("${p['develocity.cache.credentials']}") DEVELOCITY_ACCESS_KEY = credentials("${p['develocity.access-key']}") TESTCONTAINERS_IMAGE_SUBSTITUTOR = 'org.springframework.data.jpa.support.ProxyImageNameSubstitutor' } @@ -112,7 +109,6 @@ pipeline { options { timeout(time: 30, unit: 'MINUTES')} environment { ARTIFACTORY = credentials("${p['artifactory.credentials']}") - DEVELOCITY_CACHE = credentials("${p['develocity.cache.credentials']}") DEVELOCITY_ACCESS_KEY = credentials("${p['develocity.access-key']}") TESTCONTAINERS_IMAGE_SUBSTITUTOR = 'org.springframework.data.jpa.support.ProxyImageNameSubstitutor' } @@ -135,7 +131,6 @@ pipeline { options { timeout(time: 30, unit: 'MINUTES')} environment { ARTIFACTORY = credentials("${p['artifactory.credentials']}") - DEVELOCITY_CACHE = credentials("${p['develocity.cache.credentials']}") DEVELOCITY_ACCESS_KEY = credentials("${p['develocity.access-key']}") TESTCONTAINERS_IMAGE_SUBSTITUTOR = 'org.springframework.data.jpa.support.ProxyImageNameSubstitutor' } @@ -158,7 +153,6 @@ pipeline { options { timeout(time: 30, unit: 'MINUTES')} environment { ARTIFACTORY = credentials("${p['artifactory.credentials']}") - DEVELOCITY_CACHE = credentials("${p['develocity.cache.credentials']}") DEVELOCITY_ACCESS_KEY = credentials("${p['develocity.access-key']}") TESTCONTAINERS_IMAGE_SUBSTITUTOR = 'org.springframework.data.jpa.support.ProxyImageNameSubstitutor' } @@ -191,7 +185,6 @@ pipeline { options { timeout(time: 20, unit: 'MINUTES') } environment { ARTIFACTORY = credentials("${p['artifactory.credentials']}") - DEVELOCITY_CACHE = credentials("${p['develocity.cache.credentials']}") DEVELOCITY_ACCESS_KEY = credentials("${p['develocity.access-key']}") } steps { @@ -199,9 +192,6 @@ pipeline { docker.withRegistry(p['docker.proxy.registry'], p['docker.proxy.credentials']) { docker.image(p['docker.java.main.image']).inside(p['docker.java.inside.basic']) { sh 'MAVEN_OPTS="-Duser.name=' + "${p['jenkins.user.name']}" + ' -Duser.home=/tmp/jenkins-home" ' + - "DEVELOCITY_CACHE_USERNAME=${DEVELOCITY_CACHE_USR} " + - "DEVELOCITY_CACHE_PASSWORD=${DEVELOCITY_CACHE_PSW} " + - "GRADLE_ENTERPRISE_ACCESS_KEY=${DEVELOCITY_ACCESS_KEY} " + "./mvnw -s settings.xml -Pci,artifactory " + "-Dartifactory.server=${p['artifactory.url']} " + "-Dartifactory.username=${ARTIFACTORY_USR} " + diff --git a/ci/pipeline.properties b/ci/pipeline.properties index 824563a219..dea8357201 100644 --- a/ci/pipeline.properties +++ b/ci/pipeline.properties @@ -31,6 +31,5 @@ docker.proxy.credentials=usw1_packages_broadcom_com-jenkins-token artifactory.credentials=02bd1690-b54f-4c9f-819d-a77cb7a9822c artifactory.url=https://repo.spring.io artifactory.repository.snapshot=libs-snapshot-local -develocity.cache.credentials=gradle_enterprise_cache_user develocity.access-key=gradle_enterprise_secret_access_key jenkins.user.name=spring-builds+jenkins diff --git a/ci/test.sh b/ci/test.sh index 7e1fecebf0..b22fbc56a5 100755 --- a/ci/test.sh +++ b/ci/test.sh @@ -3,16 +3,11 @@ set -euo pipefail mkdir -p /tmp/jenkins-home/.m2/spring-data-jpa -mkdir -p /tmp/jenkins-home/.m2/.gradle-enterprise +mkdir -p /tmp/jenkins-home/.m2/.develocity chown -R 1001:1001 . -export DEVELOCITY_CACHE_USERNAME=${DEVELOCITY_CACHE_USR} -export DEVELOCITY_CACHE_PASSWORD=${DEVELOCITY_CACHE_PSW} export JENKINS_USER=${JENKINS_USER_NAME} -# The environment variable to configure access key is still GRADLE_ENTERPRISE_ACCESS_KEY -export GRADLE_ENTERPRISE_ACCESS_KEY=${DEVELOCITY_ACCESS_KEY} - MAVEN_OPTS="-Duser.name=${JENKINS_USER} -Duser.home=/tmp/jenkins-home" \ ./mvnw -s settings.xml \ -P${PROFILE} clean dependency:list test -Dsort -U -B -Dmaven.repo.local=/tmp/jenkins-home/.m2/spring-data-jpa @@ -20,4 +15,4 @@ MAVEN_OPTS="-Duser.name=${JENKINS_USER} -Duser.home=/tmp/jenkins-home" \ MAVEN_OPTS="-Duser.name=${JENKINS_USER} -Duser.home=/tmp/jenkins-home" \ ./mvnw -s settings.xml clean -Dscan=false -Dmaven.repo.local=/tmp/jenkins-home/.m2/spring-data-jpa -chown -R 1001:1001 /tmp/jenkins-home/.m2/.gradle-enterprise +chown -R 1001:1001 /tmp/jenkins-home/.m2/.develocity diff --git a/pom.xml b/pom.xml index 362856984f..dc1b2f9b6d 100755 --- a/pom.xml +++ b/pom.xml @@ -260,9 +260,9 @@ com.gradle - gradle-enterprise-maven-extension + develocity-maven-extension - + @@ -270,7 +270,7 @@ - + From 6fd4fa25158ae52bb8d35e1e81c55226087bcda2 Mon Sep 17 00:00:00 2001 From: Mark Paluch Date: Mon, 5 Aug 2024 11:06:00 +0200 Subject: [PATCH 031/157] Fix CDI integration test. Closes #3558 --- .../data/jpa/repository/cdi/RepositoryConsumer.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/cdi/RepositoryConsumer.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/cdi/RepositoryConsumer.java index df3c96474f..f9ff0fa711 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/cdi/RepositoryConsumer.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/cdi/RepositoryConsumer.java @@ -36,6 +36,9 @@ public void findAll() { public void save(Person person) { unqualifiedRepo.save(person); + } + + public void saveUserDb(Person person) { qualifiedRepo.save(person); } From 2e6bd178abd1ff446fa26e1866804e7b30a37db5 Mon Sep 17 00:00:00 2001 From: Oliver Drotbohm Date: Tue, 6 Aug 2024 10:37:22 +0200 Subject: [PATCH 032/157] Add build profile for Hibernate 6.6 stable previews. Fixes GH-3562. --- Jenkinsfile | 21 +++++++++++++++++++++ pom.xml | 7 +++++++ 2 files changed, 28 insertions(+) diff --git a/Jenkinsfile b/Jenkinsfile index 4a10215b53..0406d7f8ee 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -102,6 +102,27 @@ pipeline { } } } + stage("test: baseline (hibernate 6.6 preview)") { + agent { + label 'data' + } + options { timeout(time: 30, unit: 'MINUTES')} + environment { + ARTIFACTORY = credentials("${p['artifactory.credentials']}") + DEVELOCITY_CACHE = credentials("${p['develocity.cache.credentials']}") + DEVELOCITY_ACCESS_KEY = credentials("${p['develocity.access-key']}") + TESTCONTAINERS_IMAGE_SUBSTITUTOR = 'org.springframework.data.jpa.support.ProxyImageNameSubstitutor' + } + steps { + script { + docker.image(p['docker.java.next.image']).inside(p['docker.java.inside.docker']) { + sh "PROFILE=all-dbs,hibernate-66 " + + "JENKINS_USER_NAME=${p['jenkins.user.name']} " + + "ci/test.sh" + } + } + } + } stage("test: baseline (hibernate 6.6 snapshots)") { agent { label 'data' diff --git a/pom.xml b/pom.xml index dc1b2f9b6d..8aa6248f74 100755 --- a/pom.xml +++ b/pom.xml @@ -33,6 +33,7 @@ 6.5.0.Final 6.2.28.Final 6.5.3-SNAPSHOT + 6.6.0.CR1 6.6.0-SNAPSHOT 7.0.0-SNAPSHOT 2.7.1 @@ -79,6 +80,12 @@ + + hibernate-66 + + ${hibernate-66} + + hibernate-66-snapshots From 1cffac3357ed0ddc4e51c08a643c4295a4ff0077 Mon Sep 17 00:00:00 2001 From: Oliver Drotbohm Date: Tue, 6 Aug 2024 10:30:50 +0200 Subject: [PATCH 033/157] Align AuditingEntityWithEmbeddableListenerTests.auditsEmbeddedCorrectly() with aggregate lifecycle expectations. Fixes GH-3561. --- ...tingEntityWithEmbeddableListenerTests.java | 35 ++++++++----------- 1 file changed, 15 insertions(+), 20 deletions(-) diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/support/AuditingEntityWithEmbeddableListenerTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/support/AuditingEntityWithEmbeddableListenerTests.java index c728da9176..2887bb4dd3 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/support/AuditingEntityWithEmbeddableListenerTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/support/AuditingEntityWithEmbeddableListenerTests.java @@ -17,9 +17,6 @@ import static org.assertj.core.api.Assertions.*; -import java.time.Instant; -import java.util.Optional; - import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; @@ -34,6 +31,7 @@ * Integration test for {@link AuditingEntityListener}. * * @author Greg Turnquist + * @author Oliver Drotbohm */ @ExtendWith(SpringExtension.class) @ContextConfiguration("classpath:auditing/auditing-entity-with-embeddable-listener.xml") @@ -48,7 +46,6 @@ class AuditingEntityWithEmbeddableListenerTests { void setUp() { entity = new AuditableEntity(); - entity.setId(1L); entity.setData("original value"); auditDetails = new AuditableEmbeddable(); @@ -60,32 +57,30 @@ void auditsEmbeddedCorrectly() { // when repository.saveAndFlush(entity); - Optional optionalEntity = repository.findById(1L); // then - assertThat(optionalEntity).isNotEmpty(); - AuditableEntity auditableEntity = optionalEntity.get(); - assertThat(auditableEntity.getData()).isEqualTo("original value"); + assertThat(repository.findById(1L)).hasValueSatisfying(it -> { - assertThat(auditableEntity.getAuditDetails().getDateCreated()).isNotNull(); - assertThat(auditableEntity.getAuditDetails().getDateUpdated()).isNotNull(); + assertThat(it.getData()).isEqualTo("original value"); - Instant originalCreationDate = auditableEntity.getAuditDetails().getDateCreated(); - Instant originalDateUpdated = auditableEntity.getAuditDetails().getDateUpdated(); + AuditableEmbeddable details = it.getAuditDetails(); - auditableEntity.setData("updated value"); + assertThat(details.getDateCreated()).isNotNull(); + assertThat(details.getDateUpdated()).isNotNull(); - repository.saveAndFlush(auditableEntity); + it.setData("updated value"); + repository.saveAndFlush(it); - Optional optionalRevisedEntity = repository.findById(1L); + assertThat(repository.findById(1L)).hasValueSatisfying(revised -> { - assertThat(optionalRevisedEntity).isNotEmpty(); + assertThat(revised.getData()).isEqualTo("updated value"); - AuditableEntity revisedEntity = optionalRevisedEntity.get(); - assertThat(revisedEntity.getData()).isEqualTo("updated value"); + AuditableEmbeddable revisedDetails = revised.getAuditDetails(); - assertThat(revisedEntity.getAuditDetails().getDateCreated()).isEqualTo(originalCreationDate); - assertThat(revisedEntity.getAuditDetails().getDateUpdated()).isAfter(originalDateUpdated); + assertThat(revisedDetails.getDateCreated()).isEqualTo(details.getDateCreated()); + assertThat(revisedDetails.getDateUpdated()).isAfter(details.getDateUpdated()); + }); + }); } } From 5305fc450b88ff5cf0cfdbd20b4ea8164cba562b Mon Sep 17 00:00:00 2001 From: Oliver Drotbohm Date: Tue, 6 Aug 2024 13:20:42 +0200 Subject: [PATCH 034/157] Add profile for Hibernate 7 stable previews. --- pom.xml | 17 +++++++++++++++++ .../MySqlStoredProcedureIntegrationTests.java | 14 ++++++++------ 2 files changed, 25 insertions(+), 6 deletions(-) diff --git a/pom.xml b/pom.xml index 8aa6248f74..9ec5eb0940 100755 --- a/pom.xml +++ b/pom.xml @@ -35,6 +35,7 @@ 6.5.3-SNAPSHOT 6.6.0.CR1 6.6.0-SNAPSHOT + 7.0.0.Beta1 7.0.0-SNAPSHOT 2.7.1

2.2.220

@@ -101,6 +102,22 @@ + + hibernate-70 + + ${hibernate-70} + 3.2.0-M2 + + + + sonatype-oss + https://oss.sonatype.org/content/repositories/snapshots + + false + + + + hibernate-70-snapshots diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/procedures/MySqlStoredProcedureIntegrationTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/procedures/MySqlStoredProcedureIntegrationTests.java index 6755dbb88c..ec37517f2a 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/procedures/MySqlStoredProcedureIntegrationTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/procedures/MySqlStoredProcedureIntegrationTests.java @@ -30,7 +30,7 @@ import javax.sql.DataSource; -import org.hibernate.dialect.MySQL8Dialect; +import org.hibernate.dialect.MySQLDialect; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; import org.springframework.beans.factory.annotation.Autowired; @@ -149,8 +149,7 @@ void testEntityListFromNamedProcedure() { resultClasses = Employee.class) public static class Employee { - @Id - @GeneratedValue // + @Id @GeneratedValue // private Integer id; private String name; @@ -181,10 +180,12 @@ public void setName(String name) { @Override public boolean equals(Object o) { - if (this == o) + if (this == o) { return true; - if (o == null || getClass() != o.getClass()) + } + if (o == null || getClass() != o.getClass()) { return false; + } Employee employee = (Employee) o; return Objects.equals(id, employee.id) && Objects.equals(name, employee.name); } @@ -194,6 +195,7 @@ public int hashCode() { return Objects.hash(id, name); } + @Override public String toString() { return "MySqlStoredProcedureIntegrationTests.Employee(id=" + this.getId() + ", name=" + this.getName() + ")"; } @@ -265,7 +267,7 @@ public AbstractEntityManagerFactoryBean entityManagerFactory(DataSource dataSour Properties properties = new Properties(); properties.setProperty("hibernate.hbm2ddl.auto", "create"); - properties.setProperty("hibernate.dialect", MySQL8Dialect.class.getCanonicalName()); + properties.setProperty("hibernate.dialect", MySQLDialect.class.getCanonicalName()); factoryBean.setJpaProperties(properties); return factoryBean; From 6fde6b20359777114466b17c8f41d1e8cb2a7dd6 Mon Sep 17 00:00:00 2001 From: Mark Paluch Date: Thu, 8 Aug 2024 10:00:31 +0200 Subject: [PATCH 035/157] Upgrade to Hibernate 6.5.2.Final. Closes #3567 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 9ec5eb0940..09debc7ab2 100755 --- a/pom.xml +++ b/pom.xml @@ -30,7 +30,7 @@ 4.13.0 3.0.4 4.0.2 - 6.5.0.Final + 6.5.2.Final 6.2.28.Final 6.5.3-SNAPSHOT 6.6.0.CR1 From dd77e166226accb530dd99e151a15c67ae61e64f Mon Sep 17 00:00:00 2001 From: Mark Paluch Date: Thu, 8 Aug 2024 10:18:11 +0200 Subject: [PATCH 036/157] Upgrade to Maven Wrapper 3.9.8. See #3569 --- .mvn/wrapper/maven-wrapper.properties | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.mvn/wrapper/maven-wrapper.properties b/.mvn/wrapper/maven-wrapper.properties index 15f4332d38..6977100838 100755 --- a/.mvn/wrapper/maven-wrapper.properties +++ b/.mvn/wrapper/maven-wrapper.properties @@ -1,2 +1,2 @@ -#Thu Dec 14 08:40:35 CET 2023 -distributionUrl=https\://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.6/apache-maven-3.9.6-bin.zip +#Thu Aug 08 10:18:11 CEST 2024 +distributionUrl=https\://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.8/apache-maven-3.9.8-bin.zip From 9ddc2acb67720fbe6fb7cfda238566c8f7a672dc Mon Sep 17 00:00:00 2001 From: Mark Paluch Date: Thu, 8 Aug 2024 10:19:18 +0200 Subject: [PATCH 037/157] Update CI properties. See #3539 --- ci/pipeline.properties | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ci/pipeline.properties b/ci/pipeline.properties index dea8357201..40bb349196 100644 --- a/ci/pipeline.properties +++ b/ci/pipeline.properties @@ -1,6 +1,6 @@ # Java versions -java.main.tag=17.0.9_9-jdk-focal -java.next.tag=21.0.1_12-jdk-jammy +java.main.tag=17.0.12_7-jdk-focal +java.next.tag=22.0.2_9-jdk-jammy # Docker container images - standard docker.java.main.image=library/eclipse-temurin:${java.main.tag} From 63d44c8341e4498aaa0832e53f2b404e3a04fab0 Mon Sep 17 00:00:00 2001 From: Mark Paluch Date: Thu, 8 Aug 2024 10:44:19 +0200 Subject: [PATCH 038/157] Revert "Upgrade to Hibernate 6.5.2.Final." This reverts commit 6fde6b20359777114466b17c8f41d1e8cb2a7dd6. See #3567 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 09debc7ab2..9ec5eb0940 100755 --- a/pom.xml +++ b/pom.xml @@ -30,7 +30,7 @@ 4.13.0 3.0.4 4.0.2 - 6.5.2.Final + 6.5.0.Final 6.2.28.Final 6.5.3-SNAPSHOT 6.6.0.CR1 From f15d1584f7215a55b1dbf51e8023e59e9b676636 Mon Sep 17 00:00:00 2001 From: Seol_JY Date: Thu, 8 Aug 2024 14:24:05 +0900 Subject: [PATCH 039/157] Fix typo in assertion message. Corrected the assertion message from "Sample must not be null" to "Example must not be null" for clarity and consistency. Closes #3565 --- .../data/jpa/repository/support/SimpleJpaRepository.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/SimpleJpaRepository.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/SimpleJpaRepository.java index a2aaf3478e..c716b45147 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/SimpleJpaRepository.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/SimpleJpaRepository.java @@ -595,7 +595,7 @@ public Page findAll(Example example, Pageable pageable) { @Override public R findBy(Example example, Function, R> queryFunction) { - Assert.notNull(example, "Sample must not be null"); + Assert.notNull(example, "Example must not be null"); Assert.notNull(queryFunction, "Query function must not be null"); ExampleSpecification spec = new ExampleSpecification<>(example, escapeCharacter); From f62d38288f71ee84632441c485d1fa645c37c542 Mon Sep 17 00:00:00 2001 From: Mark Paluch Date: Thu, 1 Aug 2024 09:50:01 +0200 Subject: [PATCH 040/157] Suppress selection item aliasing for the actual count query. We now no longer apply count selection filtering but rather skip select field aliasing when rendering a count query to drop the field alias within a count query. Previously, we removed field aliasing by filtering the token stream which also removed the AS keyword from cast operators. Closes: #3536 Original Pull Request: #3553 --- .../repository/query/HqlQueryTransformer.java | 19 +++++++++++++---- .../query/HqlQueryTransformerTests.java | 21 +++++++++++++++++-- 2 files changed, 34 insertions(+), 6 deletions(-) diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/HqlQueryTransformer.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/HqlQueryTransformer.java index f1e18f3970..7aa2df8cfb 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/HqlQueryTransformer.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/HqlQueryTransformer.java @@ -23,6 +23,7 @@ import org.antlr.v4.runtime.ParserRuleContext; import org.springframework.data.domain.Sort; +import org.springframework.data.jpa.repository.query.HqlParser.SelectionContext; import org.springframework.lang.Nullable; import org.springframework.util.Assert; @@ -331,6 +332,17 @@ public List visitVariable(HqlParser.VariableContext ctx) { return tokens; } + @Override + public List visitSelection(SelectionContext ctx) { + + if(!countQuery || isSubquery(ctx)) { + return super.visitSelection(ctx); + } + + // do not append variables to skip AS field aliasing + return visit(ctx.selectExpression()); + } + @Override public List visitSelectClause(HqlParser.SelectClauseContext ctx) { @@ -339,6 +351,7 @@ public List visitSelectClause(HqlParser.SelectClauseContex tokens.add(new JpaQueryParsingToken(ctx.SELECT())); if (countQuery && !isSubquery(ctx)) { + tokens.add(TOKEN_COUNT_FUNC); if (countProjection != null) { @@ -358,14 +371,12 @@ public List visitSelectClause(HqlParser.SelectClauseContex if (ctx.DISTINCT() != null) { - List countSelection = QueryTransformers.filterCountSelection(selectionListTokens); - - if (countSelection.stream().anyMatch(hqlToken -> hqlToken.getToken().contains("new"))) { + if (selectionListTokens.stream().anyMatch(hqlToken -> hqlToken.getToken().contains("new"))) { // constructor tokens.add(new JpaQueryParsingToken(() -> primaryFromAlias)); } else { // keep all the select items to distinct against - tokens.addAll(countSelection); + tokens.addAll(selectionListTokens); } } else { tokens.add(new JpaQueryParsingToken(() -> primaryFromAlias)); diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/HqlQueryTransformerTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/HqlQueryTransformerTests.java index c476f0d5bc..549a1ed5ff 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/HqlQueryTransformerTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/HqlQueryTransformerTests.java @@ -85,6 +85,23 @@ void applyCountToSimpleQuery() { assertThat(results).isEqualTo("select count(e) FROM Employee e where e.name = :name"); } + @Test // GH-3536 + void shouldCreateCountQueryForDistinctCount() { + + // given + var original = """ + select distinct cast(e.timestampField as date) as foo + from ExampleEntity e + order by cast(e.timestampField as date) desc + """; + + // when + var results = createCountQueryFor(original); + + // then + assertThat(results).isEqualTo("select count(distinct cast(e.timestampField as date)) from ExampleEntity e"); + } + @Test void applyCountToMoreComplexQuery() { @@ -1037,9 +1054,9 @@ void createsCountQueryUsingAliasCorrectly() { assertCountQuery("select distinct 1 as x from Employee","select count(distinct 1) from Employee AS __"); assertCountQuery("SELECT DISTINCT abc AS x FROM T","SELECT count(DISTINCT abc) FROM T AS __"); - assertCountQuery("select distinct a as x, b as y from Employee","select count(distinct a , b) from Employee AS __"); + assertCountQuery("select distinct a as x, b as y from Employee","select count(distinct a, b) from Employee AS __"); assertCountQuery("select distinct sum(amount) as x from Employee GROUP BY n","select count(distinct sum(amount)) from Employee AS __ GROUP BY n"); - assertCountQuery("select distinct a, b, sum(amount) as c, d from Employee GROUP BY n","select count(distinct a, b, sum(amount) , d) from Employee AS __ GROUP BY n"); + assertCountQuery("select distinct a, b, sum(amount) as c, d from Employee GROUP BY n","select count(distinct a, b, sum(amount), d) from Employee AS __ GROUP BY n"); assertCountQuery("select distinct a, count(b) as c from Employee GROUP BY n","select count(distinct a, count(b)) from Employee AS __ GROUP BY n"); } From bd8e3989c01a3eda1b953281a519d1055499e1d7 Mon Sep 17 00:00:00 2001 From: Mark Paluch Date: Mon, 12 Aug 2024 08:42:49 +0200 Subject: [PATCH 041/157] Upgrade Hibernate 6.6 builds to Final release. Closes #3573 --- Jenkinsfile | 47 +------------------ pom.xml | 22 ++------- ...ProcedureNullHandlingIntegrationTests.java | 2 +- 3 files changed, 6 insertions(+), 65 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 0406d7f8ee..8a62b99f09 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -80,7 +80,7 @@ pipeline { } } } - stage("test: baseline (hibernate 6.5 snapshots)") { + stage("test: baseline (hibernate 6.6)") { agent { label 'data' } @@ -94,50 +94,7 @@ pipeline { script { docker.withRegistry(p['docker.proxy.registry'], p['docker.proxy.credentials']) { docker.image(p['docker.java.next.image']).inside(p['docker.java.inside.docker']) { - sh "PROFILE=all-dbs,hibernate-65-snapshots " + - "JENKINS_USER_NAME=${p['jenkins.user.name']} " + - "ci/test.sh" - } - } - } - } - } - stage("test: baseline (hibernate 6.6 preview)") { - agent { - label 'data' - } - options { timeout(time: 30, unit: 'MINUTES')} - environment { - ARTIFACTORY = credentials("${p['artifactory.credentials']}") - DEVELOCITY_CACHE = credentials("${p['develocity.cache.credentials']}") - DEVELOCITY_ACCESS_KEY = credentials("${p['develocity.access-key']}") - TESTCONTAINERS_IMAGE_SUBSTITUTOR = 'org.springframework.data.jpa.support.ProxyImageNameSubstitutor' - } - steps { - script { - docker.image(p['docker.java.next.image']).inside(p['docker.java.inside.docker']) { - sh "PROFILE=all-dbs,hibernate-66 " + - "JENKINS_USER_NAME=${p['jenkins.user.name']} " + - "ci/test.sh" - } - } - } - } - stage("test: baseline (hibernate 6.6 snapshots)") { - agent { - label 'data' - } - options { timeout(time: 30, unit: 'MINUTES')} - environment { - ARTIFACTORY = credentials("${p['artifactory.credentials']}") - DEVELOCITY_ACCESS_KEY = credentials("${p['develocity.access-key']}") - TESTCONTAINERS_IMAGE_SUBSTITUTOR = 'org.springframework.data.jpa.support.ProxyImageNameSubstitutor' - } - steps { - script { - docker.withRegistry(p['docker.proxy.registry'], p['docker.proxy.credentials']) { - docker.image(p['docker.java.next.image']).inside(p['docker.java.inside.docker']) { - sh "PROFILE=all-dbs,hibernate-66-snapshots " + + sh "PROFILE=all-dbs,hibernate-66 " + "JENKINS_USER_NAME=${p['jenkins.user.name']} " + "ci/test.sh" } diff --git a/pom.xml b/pom.xml index 9ec5eb0940..0f195adc05 100755 --- a/pom.xml +++ b/pom.xml @@ -31,10 +31,9 @@ 3.0.4 4.0.2 6.5.0.Final - 6.2.28.Final - 6.5.3-SNAPSHOT - 6.6.0.CR1 - 6.6.0-SNAPSHOT + 6.2.30.Final + 6.6.0.Final + 6.6.1-SNAPSHOT 7.0.0.Beta1 7.0.0-SNAPSHOT 2.7.1 @@ -66,21 +65,6 @@ ${hibernate-62} - - hibernate-65-snapshots - - ${hibernate-65-snapshots} - - - - sonatype-oss - https://oss.sonatype.org/content/repositories/snapshots - - false - - - - hibernate-66 diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/procedures/PostgresStoredProcedureNullHandlingIntegrationTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/procedures/PostgresStoredProcedureNullHandlingIntegrationTests.java index bf52ffc665..565779574a 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/procedures/PostgresStoredProcedureNullHandlingIntegrationTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/procedures/PostgresStoredProcedureNullHandlingIntegrationTests.java @@ -132,7 +132,7 @@ public interface TestModelRepository extends JpaRepository { void countUuid(UUID this_uuid); @Procedure("countByLocalDate") - void countLocalDate(@Temporal Date localDate); + void countLocalDate(@Temporal Date this_local_date); } @EnableJpaRepositories(considerNestedRepositories = true, From bf36d1c562db04b5263c0c820511b05cae272b4c Mon Sep 17 00:00:00 2001 From: Tran Ngoc Nhan Date: Tue, 23 Jul 2024 00:05:34 +0700 Subject: [PATCH 042/157] Replace documentation link to deprecated `ResultTransformer` with its replacement `ResultListTransformer`. Closes #3544 --- .../antora/modules/ROOT/pages/repositories/projections.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/antora/modules/ROOT/pages/repositories/projections.adoc b/src/main/antora/modules/ROOT/pages/repositories/projections.adoc index 5635695699..69d62d3716 100644 --- a/src/main/antora/modules/ROOT/pages/repositories/projections.adoc +++ b/src/main/antora/modules/ROOT/pages/repositories/projections.adoc @@ -3,4 +3,4 @@ include::{commons}@data-commons::page$repositories/projections.adoc[leveloffset=+1] -NOTE: It is important to note that <> with JPQL is limited to *constructor expressions* in your JPQL expression, e.g. `SELECT new com.example.NamesOnly(u.firstname, u.lastname) from User u`. (Note the usage of a FQDN for the DTO type!) This JPQL expression can be used in `@Query` annotations as well where you define any named queries. And it's important to point out that class-based projections do not work with native queries AT ALL. As a workaround you may use named queries with `ResultSetMapping` or the Hibernate specific https://docs.jboss.org/hibernate/orm/6.0/javadocs/org/hibernate/transform/ResultTransformer.html[`ResultTransformer`] +NOTE: It is important to note that <> with JPQL is limited to *constructor expressions* in your JPQL expression, e.g. `SELECT new com.example.NamesOnly(u.firstname, u.lastname) from User u`. (Note the usage of a FQDN for the DTO type!) This JPQL expression can be used in `@Query` annotations as well where you define any named queries. And it's important to point out that class-based projections do not work with native queries AT ALL. As a workaround you may use named queries with `ResultSetMapping` or the Hibernate specific https://docs.jboss.org/hibernate/orm/6.0/javadocs/org/hibernate/query/TupleTransformer.html[`TupleTransformer`] and https://docs.jboss.org/hibernate/orm/6.0/javadocs/org/hibernate/query/ResultListTransformer.html[`ResultListTransformer`] From 3ab36fa705e78ee08750c9ebbb50af985646e7c2 Mon Sep 17 00:00:00 2001 From: Mark Paluch Date: Mon, 12 Aug 2024 09:28:43 +0200 Subject: [PATCH 043/157] Polishing. Use Javadoc macro. Reformat code. See #3544 --- .../antora/modules/ROOT/pages/repositories/projections.adoc | 5 ++++- src/main/antora/resources/antora-resources/antora.yml | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/main/antora/modules/ROOT/pages/repositories/projections.adoc b/src/main/antora/modules/ROOT/pages/repositories/projections.adoc index 69d62d3716..d34f5f5f56 100644 --- a/src/main/antora/modules/ROOT/pages/repositories/projections.adoc +++ b/src/main/antora/modules/ROOT/pages/repositories/projections.adoc @@ -3,4 +3,7 @@ include::{commons}@data-commons::page$repositories/projections.adoc[leveloffset=+1] -NOTE: It is important to note that <> with JPQL is limited to *constructor expressions* in your JPQL expression, e.g. `SELECT new com.example.NamesOnly(u.firstname, u.lastname) from User u`. (Note the usage of a FQDN for the DTO type!) This JPQL expression can be used in `@Query` annotations as well where you define any named queries. And it's important to point out that class-based projections do not work with native queries AT ALL. As a workaround you may use named queries with `ResultSetMapping` or the Hibernate specific https://docs.jboss.org/hibernate/orm/6.0/javadocs/org/hibernate/query/TupleTransformer.html[`TupleTransformer`] and https://docs.jboss.org/hibernate/orm/6.0/javadocs/org/hibernate/query/ResultListTransformer.html[`ResultListTransformer`] +NOTE: It is important to note that <> with JPQL is limited to *constructor expressions* in your JPQL expression, e.g. `SELECT new com.example.NamesOnly(u.firstname, u.lastname) from User u`. +(Note the usage of a FQDN for the DTO type!) This JPQL expression can be used in `@Query` annotations as well where you define any named queries. +And it's important to point out that class-based projections do not work with native queries AT ALL. +As a workaround you may use named queries with `ResultSetMapping` or the Hibernate-specific javadoc:{hibernatejavadocurl}org.hibernate.query.ResultListTransformer[] diff --git a/src/main/antora/resources/antora-resources/antora.yml b/src/main/antora/resources/antora-resources/antora.yml index 4b911037b3..ed14d8c6d8 100644 --- a/src/main/antora/resources/antora-resources/antora.yml +++ b/src/main/antora/resources/antora-resources/antora.yml @@ -16,5 +16,6 @@ asciidoc: spring-framework-docs: '{springdocsurl}' spring-framework-javadoc: '{springjavadocurl}' springhateoasversion: ${spring-hateoas} + hibernatejavadocurl: https://docs.jboss.org/hibernate/orm/6.6/javadocs/ releasetrainversion: ${releasetrain} store: Jpa From 4f542915f54b94c68277958486d1dde6db65bcdf Mon Sep 17 00:00:00 2001 From: Seol_JY Date: Wed, 7 Aug 2024 15:55:15 +0900 Subject: [PATCH 044/157] Optimize entity deletion in SimpleJpaRepository. This change improves the performance of the delete method by first checking if the entity is already managed by the EntityManager. If so, it removes the entity directly without additional database queries. This optimization can reduce unnecessary database lookups in certain scenarios. Closes #3564 --- .../jpa/repository/support/SimpleJpaRepository.java | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/SimpleJpaRepository.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/SimpleJpaRepository.java index c716b45147..3b024ddbbd 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/SimpleJpaRepository.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/SimpleJpaRepository.java @@ -93,6 +93,7 @@ * @author Yanming Zhou * @author Ernst-Jan van der Laan * @author Diego Krupitza + * @author Seol-JY */ @Repository @Transactional(readOnly = true) @@ -196,14 +197,16 @@ public void delete(T entity) { Class type = ProxyUtils.getUserClass(entity); - T existing = (T) entityManager.find(type, entityInformation.getId(entity)); - - // if the entity to be deleted doesn't exist, delete is a NOOP - if (existing == null) { + if (entityManager.contains(entity)) { + entityManager.remove(entity); return; } - entityManager.remove(entityManager.contains(entity) ? entity : entityManager.merge(entity)); + // if the entity to be deleted doesn't exist, delete is a NOOP + T existing = (T) entityManager.find(type, entityInformation.getId(entity)); + if (existing != null) { + entityManager.remove(entityManager.merge(entity)); + } } @Override From 303c2dbf7886549bdc32c39b81f7bb20896f8cac Mon Sep 17 00:00:00 2001 From: Mark Paluch Date: Tue, 13 Aug 2024 11:14:01 +0200 Subject: [PATCH 045/157] Polishing. Defer user-class lookup. See #3564 --- .../support/SimpleJpaRepository.java | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/SimpleJpaRepository.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/SimpleJpaRepository.java index 3b024ddbbd..cd66dfcba4 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/SimpleJpaRepository.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/SimpleJpaRepository.java @@ -195,13 +195,13 @@ public void delete(T entity) { return; } - Class type = ProxyUtils.getUserClass(entity); - if (entityManager.contains(entity)) { entityManager.remove(entity); return; } + Class type = ProxyUtils.getUserClass(entity); + // if the entity to be deleted doesn't exist, delete is a NOOP T existing = (T) entityManager.find(type, entityInformation.getId(entity)); if (existing != null) { @@ -282,8 +282,7 @@ public void deleteAllInBatch(Iterable entities) { return; } - applyAndBind(getQueryString(DELETE_ALL_QUERY_STRING, entityInformation.getEntityName()), entities, - entityManager) + applyAndBind(getQueryString(DELETE_ALL_QUERY_STRING, entityInformation.getEntityName()), entities, entityManager) .executeUpdate(); } @@ -321,7 +320,8 @@ public Optional findById(ID id) { LockModeType type = metadata.getLockModeType(); Map hints = getHints(); - return Optional.ofNullable(type == null ? entityManager.find(domainType, id, hints) : entityManager.find(domainType, id, type, hints)); + return Optional.ofNullable( + type == null ? entityManager.find(domainType, id, hints) : entityManager.find(domainType, id, type, hints)); } @Deprecated @@ -486,7 +486,8 @@ public long delete(@Nullable Specification spec) { CriteriaDelete delete = builder.createCriteriaDelete(getDomainClass()); if (spec != null) { - Predicate predicate = spec.toPredicate(delete.from(getDomainClass()), builder.createQuery(getDomainClass()), builder); + Predicate predicate = spec.toPredicate(delete.from(getDomainClass()), builder.createQuery(getDomainClass()), + builder); if (predicate != null) { delete.where(predicate); @@ -524,7 +525,7 @@ private R doFindBy(Specification spec, Class domainClass, TypedQuery query = getQuery(specToUse, domainClass, sort); if (scrollPosition instanceof OffsetScrollPosition offset) { - if(!offset.isInitial()) { + if (!offset.isInitial()) { query.setFirstResult(Math.toIntExact(offset.getOffset()) + 1); } } @@ -536,8 +537,8 @@ private R doFindBy(Specification spec, Class domainClass, SpecificationScrollDelegate scrollDelegate = new SpecificationScrollDelegate<>(scrollFunction, entityInformation); - FetchableFluentQueryBySpecification fluentQuery = new FetchableFluentQueryBySpecification<>(spec, domainClass, finder, - scrollDelegate, this::count, this::exists, this.entityManager, getProjectionFactory()); + FetchableFluentQueryBySpecification fluentQuery = new FetchableFluentQueryBySpecification<>(spec, domainClass, + finder, scrollDelegate, this::count, this::exists, this.entityManager, getProjectionFactory()); return queryFunction.apply((FetchableFluentQuery) fluentQuery); } From fcdebde1e58379993670fc7d08531752f62c9c41 Mon Sep 17 00:00:00 2001 From: Seol_JY Date: Wed, 14 Aug 2024 14:06:40 +0900 Subject: [PATCH 046/157] Polishing. Replace Collection.class.isInstance with instanceof for type checking. Remove unnecessary type check for ConfigurableListableBeanFactory in postProcessBeanFactory method. Closes #3580 --- .../repository/config/JpaRepositoryConfigExtension.java | 2 +- ...EntityManagerBeanDefinitionRegistrarPostProcessor.java | 8 +------- .../data/jpa/repository/support/SimpleJpaRepository.java | 2 +- 3 files changed, 3 insertions(+), 9 deletions(-) diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/config/JpaRepositoryConfigExtension.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/config/JpaRepositoryConfigExtension.java index 7188c0c184..7010542f45 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/config/JpaRepositoryConfigExtension.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/config/JpaRepositoryConfigExtension.java @@ -195,7 +195,7 @@ public void registerBeansForRoot(BeanDefinitionRegistry registry, RepositoryConf registerIfNotAlreadyRegistered(() -> { - Object value = AnnotationRepositoryConfigurationSource.class.isInstance(config) // + Object value = config instanceof AnnotationRepositoryConfigurationSource // ? config.getRequiredAttribute(ESCAPE_CHARACTER_PROPERTY, Character.class) // : config.getAttribute(ESCAPE_CHARACTER_PROPERTY).orElse("\\"); diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/EntityManagerBeanDefinitionRegistrarPostProcessor.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/EntityManagerBeanDefinitionRegistrarPostProcessor.java index d48c84af96..a3344c2c94 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/EntityManagerBeanDefinitionRegistrarPostProcessor.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/EntityManagerBeanDefinitionRegistrarPostProcessor.java @@ -55,13 +55,7 @@ public int getOrder() { @Override public void postProcessBeanFactory(ConfigurableListableBeanFactory beanFactory) throws BeansException { - if (!ConfigurableListableBeanFactory.class.isInstance(beanFactory)) { - return; - } - - ConfigurableListableBeanFactory factory = beanFactory; - - for (EntityManagerFactoryBeanDefinition definition : getEntityManagerFactoryBeanDefinitions(factory)) { + for (EntityManagerFactoryBeanDefinition definition : getEntityManagerFactoryBeanDefinitions(beanFactory)) { BeanFactory definitionFactory = definition.getBeanFactory(); diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/SimpleJpaRepository.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/SimpleJpaRepository.java index cd66dfcba4..44ffc727b0 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/SimpleJpaRepository.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/SimpleJpaRepository.java @@ -247,7 +247,7 @@ public void deleteAllByIdInBatch(Iterable ids) { * Some JPA providers require {@code ids} to be a {@link Collection} so we must convert if it's not already. */ - if (Collection.class.isInstance(ids)) { + if (ids instanceof Collection) { query.setParameter("ids", ids); } else { Collection idsCollection = StreamSupport.stream(ids.spliterator(), false) From 21b7718c07a2b86b7eaf9214feeea73ce8b1ffc3 Mon Sep 17 00:00:00 2001 From: Mark Paluch Date: Wed, 14 Aug 2024 10:15:05 +0200 Subject: [PATCH 047/157] Polishing. Consistently convert Iterable to Collection for identifier parameters. See #3580 --- .../support/SimpleJpaRepository.java | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/SimpleJpaRepository.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/SimpleJpaRepository.java index 44ffc727b0..063093858f 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/SimpleJpaRepository.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/SimpleJpaRepository.java @@ -40,8 +40,6 @@ import java.util.Optional; import java.util.function.BiConsumer; import java.util.function.Function; -import java.util.stream.Collectors; -import java.util.stream.StreamSupport; import org.springframework.data.domain.Example; import org.springframework.data.domain.KeysetScrollPosition; @@ -246,14 +244,8 @@ public void deleteAllByIdInBatch(Iterable ids) { /* * Some JPA providers require {@code ids} to be a {@link Collection} so we must convert if it's not already. */ - - if (ids instanceof Collection) { - query.setParameter("ids", ids); - } else { - Collection idsCollection = StreamSupport.stream(ids.spliterator(), false) - .collect(Collectors.toCollection(ArrayList::new)); - query.setParameter("ids", idsCollection); - } + Collection idCollection = toCollection(ids); + query.setParameter("ids", idCollection); applyQueryHints(query); @@ -414,7 +406,7 @@ public List findAllById(Iterable ids) { return results; } - Collection idCollection = Streamable.of(ids).toList(); + Collection idCollection = toCollection(ids); ByIdsSpecification specification = new ByIdsSpecification<>(entityInformation); TypedQuery query = getQuery(specification, Sort.unsorted()); @@ -925,6 +917,11 @@ private ProjectionFactory getProjectionFactory() { return projectionFactory; } + @SuppressWarnings({ "rawtypes", "unchecked" }) + private static Collection toCollection(Iterable ids) { + return ids instanceof Collection c ? c : Streamable.of(ids).toList(); + } + /** * Executes a count query and transparently sums up all values returned. * From 6e586353e18131a07deba696c27f30882466960e Mon Sep 17 00:00:00 2001 From: Jens Schauder Date: Fri, 16 Aug 2024 10:05:38 +0200 Subject: [PATCH 048/157] Prepare 3.3.3 (2024.0.3). See #3539 --- pom.xml | 20 ++++---------------- 1 file changed, 4 insertions(+), 16 deletions(-) diff --git a/pom.xml b/pom.xml index 0f195adc05..6ccabb6dfd 100755 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ org.springframework.data.build spring-data-parent - 3.3.3-SNAPSHOT + 3.3.3 @@ -42,7 +42,7 @@ 4.9 8.0.33 42.6.0 - 3.3.3-SNAPSHOT + 3.3.3 0.10.3 org.hibernate @@ -286,20 +286,8 @@ - - spring-snapshot - https://repo.spring.io/snapshot - - true - - - false - - - - spring-milestone - https://repo.spring.io/milestone - + + From 42efa2785ea17bc22277146872ba6b839dc56475 Mon Sep 17 00:00:00 2001 From: Jens Schauder Date: Fri, 16 Aug 2024 10:05:57 +0200 Subject: [PATCH 049/157] Release version 3.3.3 (2024.0.3). See #3539 --- pom.xml | 2 +- spring-data-envers/pom.xml | 4 ++-- spring-data-jpa-distribution/pom.xml | 2 +- spring-data-jpa/pom.xml | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/pom.xml b/pom.xml index 6ccabb6dfd..1f234a7147 100755 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ org.springframework.data spring-data-jpa-parent - 3.3.3-SNAPSHOT + 3.3.3 pom Spring Data JPA Parent diff --git a/spring-data-envers/pom.xml b/spring-data-envers/pom.xml index bc4634fc58..a4edd2a888 100755 --- a/spring-data-envers/pom.xml +++ b/spring-data-envers/pom.xml @@ -5,12 +5,12 @@ org.springframework.data spring-data-envers - 3.3.3-SNAPSHOT + 3.3.3 org.springframework.data spring-data-jpa-parent - 3.3.3-SNAPSHOT + 3.3.3 ../pom.xml diff --git a/spring-data-jpa-distribution/pom.xml b/spring-data-jpa-distribution/pom.xml index 1163d78f9f..c9a7200733 100644 --- a/spring-data-jpa-distribution/pom.xml +++ b/spring-data-jpa-distribution/pom.xml @@ -14,7 +14,7 @@ org.springframework.data spring-data-jpa-parent - 3.3.3-SNAPSHOT + 3.3.3 ../pom.xml diff --git a/spring-data-jpa/pom.xml b/spring-data-jpa/pom.xml index 6b93cac7d9..478d90ef02 100644 --- a/spring-data-jpa/pom.xml +++ b/spring-data-jpa/pom.xml @@ -6,7 +6,7 @@ org.springframework.data spring-data-jpa - 3.3.3-SNAPSHOT + 3.3.3 Spring Data JPA Spring Data module for JPA repositories. @@ -15,7 +15,7 @@ org.springframework.data spring-data-jpa-parent - 3.3.3-SNAPSHOT + 3.3.3 ../pom.xml From a7b69ac1b145a8fe4c386cf36d72a6f16effc6b1 Mon Sep 17 00:00:00 2001 From: Jens Schauder Date: Fri, 16 Aug 2024 10:08:53 +0200 Subject: [PATCH 050/157] Prepare next development iteration. See #3539 --- pom.xml | 2 +- spring-data-envers/pom.xml | 4 ++-- spring-data-jpa-distribution/pom.xml | 2 +- spring-data-jpa/pom.xml | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/pom.xml b/pom.xml index 1f234a7147..9bdd2e726e 100755 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ org.springframework.data spring-data-jpa-parent - 3.3.3 + 3.3.4-SNAPSHOT pom Spring Data JPA Parent diff --git a/spring-data-envers/pom.xml b/spring-data-envers/pom.xml index a4edd2a888..f4616f0499 100755 --- a/spring-data-envers/pom.xml +++ b/spring-data-envers/pom.xml @@ -5,12 +5,12 @@ org.springframework.data spring-data-envers - 3.3.3 + 3.3.4-SNAPSHOT org.springframework.data spring-data-jpa-parent - 3.3.3 + 3.3.4-SNAPSHOT ../pom.xml diff --git a/spring-data-jpa-distribution/pom.xml b/spring-data-jpa-distribution/pom.xml index c9a7200733..3c4f07476e 100644 --- a/spring-data-jpa-distribution/pom.xml +++ b/spring-data-jpa-distribution/pom.xml @@ -14,7 +14,7 @@ org.springframework.data spring-data-jpa-parent - 3.3.3 + 3.3.4-SNAPSHOT ../pom.xml diff --git a/spring-data-jpa/pom.xml b/spring-data-jpa/pom.xml index 478d90ef02..a0ca33358b 100644 --- a/spring-data-jpa/pom.xml +++ b/spring-data-jpa/pom.xml @@ -6,7 +6,7 @@ org.springframework.data spring-data-jpa - 3.3.3 + 3.3.4-SNAPSHOT Spring Data JPA Spring Data module for JPA repositories. @@ -15,7 +15,7 @@ org.springframework.data spring-data-jpa-parent - 3.3.3 + 3.3.4-SNAPSHOT ../pom.xml From 7191e35228b248ec250b1caff0c434fa7f18618d Mon Sep 17 00:00:00 2001 From: Jens Schauder Date: Fri, 16 Aug 2024 10:08:54 +0200 Subject: [PATCH 051/157] After release cleanups. See #3539 --- pom.xml | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/pom.xml b/pom.xml index 9bdd2e726e..671a2e7858 100755 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ org.springframework.data.build spring-data-parent - 3.3.3 + 3.3.4-SNAPSHOT @@ -42,7 +42,7 @@ 4.9 8.0.33 42.6.0 - 3.3.3 + 3.3.4-SNAPSHOT 0.10.3 org.hibernate @@ -286,8 +286,20 @@ - - + + spring-snapshot + https://repo.spring.io/snapshot + + true + + + false + + + + spring-milestone + https://repo.spring.io/milestone + From 64eccd434eed932eeef37b132bf5412db9be52cb Mon Sep 17 00:00:00 2001 From: Mark Paluch Date: Mon, 19 Aug 2024 09:41:22 +0200 Subject: [PATCH 052/157] Polishing. Merge antora prepare tasks into a single run. See #3539 --- src/main/antora/antora.yml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/main/antora/antora.yml b/src/main/antora/antora.yml index 53d5a75b58..3a4a343f36 100644 --- a/src/main/antora/antora.yml +++ b/src/main/antora/antora.yml @@ -6,10 +6,7 @@ nav: ext: collector: - run: - command: ./mvnw test-compile - local: true - - run: - command: ./mvnw validate process-resources -pl :spring-data-jpa-distribution -am -Pantora-process-resources + command: ./mvnw test-compile -Pantora-process-resources local: true scan: dir: spring-data-jpa-distribution/target/classes From ccbe20878e454cb1fcee0625ec36219131889d03 Mon Sep 17 00:00:00 2001 From: Jens Schauder Date: Mon, 19 Aug 2024 15:00:24 +0200 Subject: [PATCH 053/157] Sort revisions by revision number. Timestamps might not be unique, but the revision number "should form a strictly-increasing sequence of numbers". See https://docs.jboss.org/hibernate/orm/5.2/javadocs/org/hibernate/envers/RevisionNumber.html Closes #3579 --- .../envers/repository/support/EnversRevisionRepositoryImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spring-data-envers/src/main/java/org/springframework/data/envers/repository/support/EnversRevisionRepositoryImpl.java b/spring-data-envers/src/main/java/org/springframework/data/envers/repository/support/EnversRevisionRepositoryImpl.java index ed620c15a3..4c87a24621 100755 --- a/spring-data-envers/src/main/java/org/springframework/data/envers/repository/support/EnversRevisionRepositoryImpl.java +++ b/spring-data-envers/src/main/java/org/springframework/data/envers/repository/support/EnversRevisionRepositoryImpl.java @@ -93,7 +93,7 @@ public EnversRevisionRepositoryImpl(JpaEntityInformation entityInformation public Optional> findLastChangeRevision(ID id) { List singleResult = createBaseQuery(id) // - .addOrder(AuditEntity.revisionProperty("timestamp").desc()) // + .addOrder(AuditEntity.revisionNumber().desc()) // .setMaxResults(1) // .getResultList(); From 2e6e1cf5703a4f5447a9ab640433330643aed1c3 Mon Sep 17 00:00:00 2001 From: Seol_JY Date: Mon, 19 Aug 2024 03:36:29 +0900 Subject: [PATCH 054/157] Add `@Serial` annotation to all `serialVersionUID` fields. - Enhance code readability and maintainability - Improve static analysis capabilities - Ensure proper declaration of serialVersionUID fields Closes #3584 --- .../org/springframework/data/envers/sample/QCountry.java | 4 +++- .../java/org/springframework/data/jpa/domain/JpaSort.java | 5 +++-- .../org/springframework/data/jpa/domain/Specification.java | 3 ++- .../jpa/repository/query/InvalidJpaQueryMethodException.java | 4 +++- .../data/jpa/repository/support/SimpleJpaRepository.java | 5 +++-- .../org/springframework/data/jpa/domain/sample/Account.java | 2 ++ .../data/jpa/domain/sample/EmbeddedIdExampleEmployeePK.java | 3 ++- .../data/jpa/domain/sample/IdClassExampleEmployeePK.java | 3 ++- .../org/springframework/data/jpa/domain/sample/ItemId.java | 3 ++- .../springframework/data/jpa/domain/sample/ItemSiteId.java | 3 ++- .../data/jpa/domain/sample/PersistableWithIdClassPK.java | 3 ++- .../jpa/domain/sample/PersistableWithSingleIdClassPK.java | 3 ++- .../data/jpa/domain/sample/SampleEntityPK.java | 3 ++- .../org/springframework/data/jpa/domain/sample/Site.java | 4 +++- 14 files changed, 33 insertions(+), 15 deletions(-) diff --git a/spring-data-envers/src/test/java/org/springframework/data/envers/sample/QCountry.java b/spring-data-envers/src/test/java/org/springframework/data/envers/sample/QCountry.java index c7269cab3d..66a3d509b9 100755 --- a/spring-data-envers/src/test/java/org/springframework/data/envers/sample/QCountry.java +++ b/spring-data-envers/src/test/java/org/springframework/data/envers/sample/QCountry.java @@ -23,6 +23,8 @@ import static com.querydsl.core.types.PathMetadataFactory.forVariable; +import java.io.Serial; + /** * Query class for Country domain. * @@ -30,7 +32,7 @@ */ public class QCountry extends EntityPathBase { - private static final long serialVersionUID = -936338527; + @Serial private static final long serialVersionUID = -936338527; private static final PathInits INITS = PathInits.DIRECT2; diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/domain/JpaSort.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/domain/JpaSort.java index a844135fd0..e1fa003384 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/domain/JpaSort.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/domain/JpaSort.java @@ -22,6 +22,7 @@ import org.springframework.lang.Nullable; import org.springframework.util.Assert; +import java.io.Serial; import java.util.ArrayList; import java.util.Arrays; import java.util.Collection; @@ -39,7 +40,7 @@ */ public class JpaSort extends Sort { - private static final long serialVersionUID = 1L; + @Serial private static final long serialVersionUID = 1L; private JpaSort(Direction direction, List> paths) { this(Collections.emptyList(), direction, paths); @@ -316,7 +317,7 @@ public String toString() { */ public static class JpaOrder extends Order { - private static final long serialVersionUID = 1L; + @Serial private static final long serialVersionUID = 1L; private final boolean unsafe; diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/domain/Specification.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/domain/Specification.java index 462a02ea77..32c84faae9 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/domain/Specification.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/domain/Specification.java @@ -20,6 +20,7 @@ import jakarta.persistence.criteria.Predicate; import jakarta.persistence.criteria.Root; +import java.io.Serial; import java.io.Serializable; import java.util.Arrays; import java.util.stream.StreamSupport; @@ -40,7 +41,7 @@ */ public interface Specification extends Serializable { - long serialVersionUID = 1L; + @Serial long serialVersionUID = 1L; /** * Negates the given {@link Specification}. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/InvalidJpaQueryMethodException.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/InvalidJpaQueryMethodException.java index a70c4beb29..5662d7d091 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/InvalidJpaQueryMethodException.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/InvalidJpaQueryMethodException.java @@ -15,6 +15,8 @@ */ package org.springframework.data.jpa.repository.query; +import java.io.Serial; + /** * Signals that we encountered an invalid query method. * @@ -23,7 +25,7 @@ */ public class InvalidJpaQueryMethodException extends RuntimeException { - private static final long serialVersionUID = 1L; + @Serial private static final long serialVersionUID = 1L; /** * Creates a new {@link InvalidJpaQueryMethodException} with the given message. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/SimpleJpaRepository.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/SimpleJpaRepository.java index 063093858f..b47b502b4f 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/SimpleJpaRepository.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/SimpleJpaRepository.java @@ -31,6 +31,7 @@ import jakarta.persistence.criteria.Predicate; import jakarta.persistence.criteria.Root; +import java.io.Serial; import java.util.ArrayList; import java.util.Collection; import java.util.Collections; @@ -952,7 +953,7 @@ private static long executeCountQuery(TypedQuery query) { @SuppressWarnings("rawtypes") private static final class ByIdsSpecification implements Specification { - private static final long serialVersionUID = 1L; + @Serial private static final long serialVersionUID = 1L; private final JpaEntityInformation entityInformation; @@ -981,7 +982,7 @@ public Predicate toPredicate(Root root, CriteriaQuery query, CriteriaBuild */ private static class ExampleSpecification implements Specification { - private static final long serialVersionUID = 1L; + @Serial private static final long serialVersionUID = 1L; private final Example example; private final EscapeCharacter escapeCharacter; diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/Account.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/Account.java index 9b0fcbb036..e297d3ab5b 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/Account.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/Account.java @@ -15,6 +15,8 @@ */ package org.springframework.data.jpa.domain.sample; +import java.io.Serial; + import jakarta.persistence.Entity; import org.springframework.data.jpa.domain.AbstractPersistable; diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/EmbeddedIdExampleEmployeePK.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/EmbeddedIdExampleEmployeePK.java index f492e758ec..1b5e49bef7 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/EmbeddedIdExampleEmployeePK.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/EmbeddedIdExampleEmployeePK.java @@ -15,6 +15,7 @@ */ package org.springframework.data.jpa.domain.sample; +import java.io.Serial; import java.io.Serializable; import jakarta.persistence.Column; @@ -25,7 +26,7 @@ */ @Embeddable public class EmbeddedIdExampleEmployeePK implements Serializable { - private static final long serialVersionUID = 1L; + @Serial private static final long serialVersionUID = 1L; @Column(nullable = false) private Long employeeId; diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/IdClassExampleEmployeePK.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/IdClassExampleEmployeePK.java index 094f965554..142c75b5f9 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/IdClassExampleEmployeePK.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/IdClassExampleEmployeePK.java @@ -15,13 +15,14 @@ */ package org.springframework.data.jpa.domain.sample; +import java.io.Serial; import java.io.Serializable; /** * @author Thomas Darimont */ public class IdClassExampleEmployeePK implements Serializable { - private static final long serialVersionUID = 1L; + @Serial private static final long serialVersionUID = 1L; private long empId; private long department; diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/ItemId.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/ItemId.java index 3d65578cce..27b5417af1 100755 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/ItemId.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/ItemId.java @@ -15,6 +15,7 @@ */ package org.springframework.data.jpa.domain.sample; +import java.io.Serial; import java.io.Serializable; /** @@ -25,7 +26,7 @@ */ public class ItemId implements Serializable { - private static final long serialVersionUID = -2986871112875450036L; + @Serial private static final long serialVersionUID = -2986871112875450036L; private Integer id; private Integer manufacturerId; diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/ItemSiteId.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/ItemSiteId.java index 4b9f2bc159..e645fe3f4c 100755 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/ItemSiteId.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/ItemSiteId.java @@ -15,6 +15,7 @@ */ package org.springframework.data.jpa.domain.sample; +import java.io.Serial; import java.io.Serializable; /** @@ -25,7 +26,7 @@ */ public class ItemSiteId implements Serializable { - private static final long serialVersionUID = 1822540289216799357L; + @Serial private static final long serialVersionUID = 1822540289216799357L; private ItemId item; private Integer site; diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/PersistableWithIdClassPK.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/PersistableWithIdClassPK.java index 4b830e5ec4..5f7a6ffa43 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/PersistableWithIdClassPK.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/PersistableWithIdClassPK.java @@ -17,6 +17,7 @@ import static org.springframework.util.ObjectUtils.*; +import java.io.Serial; import java.io.Serializable; /** @@ -25,7 +26,7 @@ */ public class PersistableWithIdClassPK implements Serializable { - private static final long serialVersionUID = 23126782341L; + @Serial private static final long serialVersionUID = 23126782341L; private Long first; private Long second; diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/PersistableWithSingleIdClassPK.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/PersistableWithSingleIdClassPK.java index 4c90313fe8..e405b3c4ba 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/PersistableWithSingleIdClassPK.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/PersistableWithSingleIdClassPK.java @@ -17,6 +17,7 @@ import static org.springframework.util.ObjectUtils.*; +import java.io.Serial; import java.io.Serializable; /** @@ -24,7 +25,7 @@ */ public class PersistableWithSingleIdClassPK implements Serializable { - private static final long serialVersionUID = 23126782341L; + @Serial private static final long serialVersionUID = 23126782341L; private Long first; diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/SampleEntityPK.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/SampleEntityPK.java index eec8849df3..c46143f81d 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/SampleEntityPK.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/SampleEntityPK.java @@ -15,6 +15,7 @@ */ package org.springframework.data.jpa.domain.sample; +import java.io.Serial; import java.io.Serializable; import jakarta.persistence.Column; @@ -25,7 +26,7 @@ @Embeddable public class SampleEntityPK implements Serializable { - private static final long serialVersionUID = 231060947L; + @Serial private static final long serialVersionUID = 231060947L; @Column(nullable = false) private String first; diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/Site.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/Site.java index 4bc3683b95..996561cdf4 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/Site.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/Site.java @@ -15,6 +15,8 @@ */ package org.springframework.data.jpa.domain.sample; +import java.io.Serial; + import jakarta.persistence.Entity; import jakarta.persistence.GeneratedValue; import jakarta.persistence.Id; @@ -31,7 +33,7 @@ @Table public class Site implements java.io.Serializable { - private static final long serialVersionUID = 1L; + @Serial private static final long serialVersionUID = 1L; @Id @GeneratedValue Integer id; From 1f95c61cba4fdad473e35164005fc811d33e56cb Mon Sep 17 00:00:00 2001 From: Mark Paluch Date: Tue, 20 Aug 2024 14:06:07 +0200 Subject: [PATCH 055/157] Polishing. Remove serialVersionUID for types that aren't serializable. See #3584 --- .../data/jpa/domain/AbstractAuditable.java | 12 +++++------- .../data/jpa/domain/sample/Account.java | 3 --- .../data/jpa/domain/sample/AuditableRole.java | 2 -- .../data/jpa/domain/sample/AuditableUser.java | 8 +++----- .../jpa/domain/sample/CustomAbstractPersistable.java | 1 - .../data/jpa/domain/sample/Parent.java | 8 +++----- .../jpa/domain/sample/PersistableWithIdClass.java | 2 -- .../domain/sample/PersistableWithSingleIdClass.java | 2 -- 8 files changed, 11 insertions(+), 27 deletions(-) diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/domain/AbstractAuditable.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/domain/AbstractAuditable.java index 46384cb1bd..6cc365619f 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/domain/AbstractAuditable.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/domain/AbstractAuditable.java @@ -15,17 +15,17 @@ */ package org.springframework.data.jpa.domain; +import jakarta.persistence.ManyToOne; +import jakarta.persistence.MappedSuperclass; +import jakarta.persistence.Temporal; +import jakarta.persistence.TemporalType; + import java.io.Serializable; import java.time.LocalDateTime; import java.time.ZoneId; import java.util.Date; import java.util.Optional; -import jakarta.persistence.ManyToOne; -import jakarta.persistence.MappedSuperclass; -import jakarta.persistence.Temporal; -import jakarta.persistence.TemporalType; - import org.springframework.data.domain.Auditable; import org.springframework.lang.Nullable; @@ -42,8 +42,6 @@ public abstract class AbstractAuditable extends AbstractPersistable implements Auditable { - private static final long serialVersionUID = 141481953116476081L; - @ManyToOne // private @Nullable U createdBy; diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/Account.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/Account.java index e297d3ab5b..856611e95f 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/Account.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/Account.java @@ -15,8 +15,6 @@ */ package org.springframework.data.jpa.domain.sample; -import java.io.Serial; - import jakarta.persistence.Entity; import org.springframework.data.jpa.domain.AbstractPersistable; @@ -27,5 +25,4 @@ @Entity public class Account extends AbstractPersistable { - private static final long serialVersionUID = -5719129808165758887L; } diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/AuditableRole.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/AuditableRole.java index 855b0ded60..9fa9442b30 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/AuditableRole.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/AuditableRole.java @@ -27,8 +27,6 @@ @Entity public class AuditableRole extends AbstractAuditable { - private static final long serialVersionUID = 5997359055260303863L; - private String name; public void setName(String name) { diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/AuditableUser.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/AuditableUser.java index 794b2cd899..e69864c553 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/AuditableUser.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/AuditableUser.java @@ -15,14 +15,14 @@ */ package org.springframework.data.jpa.domain.sample; -import java.util.HashSet; -import java.util.Set; - import jakarta.persistence.CascadeType; import jakarta.persistence.Entity; import jakarta.persistence.ManyToMany; import jakarta.persistence.NamedQuery; +import java.util.HashSet; +import java.util.Set; + import org.springframework.data.jpa.domain.AbstractAuditable; import org.springframework.lang.Nullable; @@ -37,8 +37,6 @@ @NamedQuery(name = "AuditableUser.findByFirstname", query = "SELECT u FROM AuditableUser u WHERE u.firstname = ?1") public class AuditableUser extends AbstractAuditable { - private static final long serialVersionUID = 7409344446795693011L; - private String firstname; @ManyToMany( diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/CustomAbstractPersistable.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/CustomAbstractPersistable.java index 7209fa41fc..aa136318aa 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/CustomAbstractPersistable.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/CustomAbstractPersistable.java @@ -27,5 +27,4 @@ @Table(name = "customAbstractPersistable") public class CustomAbstractPersistable extends AbstractPersistable { - private static final long serialVersionUID = 1L; } diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/Parent.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/Parent.java index ed392f102e..b0a00f0ace 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/Parent.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/Parent.java @@ -15,15 +15,15 @@ */ package org.springframework.data.jpa.domain.sample; -import java.util.HashSet; -import java.util.Set; - import jakarta.persistence.CascadeType; import jakarta.persistence.Entity; import jakarta.persistence.GeneratedValue; import jakarta.persistence.Id; import jakarta.persistence.ManyToMany; +import java.util.HashSet; +import java.util.Set; + @Entity public class Parent { @@ -31,8 +31,6 @@ public class Parent { @GeneratedValue Long id; - static final long serialVersionUID = -89717120680485957L; - @ManyToMany(cascade = CascadeType.ALL) Set children = new HashSet<>(); diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/PersistableWithIdClass.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/PersistableWithIdClass.java index 6ccab3d688..5b6d1277d9 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/PersistableWithIdClass.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/PersistableWithIdClass.java @@ -30,8 +30,6 @@ @IdClass(PersistableWithIdClassPK.class) public class PersistableWithIdClass implements Persistable { - private static final long serialVersionUID = 1L; - @Id private Long first; diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/PersistableWithSingleIdClass.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/PersistableWithSingleIdClass.java index 9abf2d8a68..38305b4b90 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/PersistableWithSingleIdClass.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/PersistableWithSingleIdClass.java @@ -28,8 +28,6 @@ @IdClass(PersistableWithSingleIdClassPK.class) public class PersistableWithSingleIdClass { - private static final long serialVersionUID = 1L; - @Id private Long first; protected PersistableWithSingleIdClass() { From 074bfecb1155983ea46fce7ad0b300d58106b115 Mon Sep 17 00:00:00 2001 From: Mark Paluch Date: Tue, 20 Aug 2024 14:11:07 +0200 Subject: [PATCH 056/157] Refactor `instanceof` to use pattern variable. Closes #3586 --- .../data/jpa/repository/query/EscapeCharacter.java | 3 +-- .../data/jpa/repository/query/ParameterBinding.java | 4 +--- .../data/jpa/repository/query/ProcedureParameter.java | 3 +-- .../data/jpa/util/BeanDefinitionUtils.java | 4 +--- .../springframework/data/jpa/domain/sample/ItemId.java | 4 +--- .../data/jpa/domain/sample/ItemSiteId.java | 4 +--- .../data/jpa/domain/sample/SampleWithIdClass.java | 8 +++----- .../org/springframework/data/jpa/domain/sample/User.java | 4 +--- 8 files changed, 10 insertions(+), 24 deletions(-) diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/EscapeCharacter.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/EscapeCharacter.java index 99a1dd02ca..b9897832f6 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/EscapeCharacter.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/EscapeCharacter.java @@ -69,11 +69,10 @@ public boolean equals(Object o) { return true; } - if (!(o instanceof EscapeCharacter)) { + if (!(o instanceof EscapeCharacter that)) { return false; } - EscapeCharacter that = (EscapeCharacter) o; return escapeCharacter == that.escapeCharacter; } diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/ParameterBinding.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/ParameterBinding.java index f60be14198..4778943f68 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/ParameterBinding.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/ParameterBinding.java @@ -279,12 +279,10 @@ public Object prepare(@Nullable Object value) { @Override public boolean equals(Object obj) { - if (!(obj instanceof LikeParameterBinding)) { + if (!(obj instanceof LikeParameterBinding that)) { return false; } - LikeParameterBinding that = (LikeParameterBinding) obj; - return super.equals(obj) && this.type.equals(that.type); } diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/ProcedureParameter.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/ProcedureParameter.java index c589001f5e..e86a59151a 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/ProcedureParameter.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/ProcedureParameter.java @@ -77,11 +77,10 @@ public boolean equals(Object o) { return true; } - if (!(o instanceof ProcedureParameter)) { + if (!(o instanceof ProcedureParameter that)) { return false; } - ProcedureParameter that = (ProcedureParameter) o; return Objects.equals(name, that.name) && mode == that.mode && Objects.equals(type, that.type); } diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/util/BeanDefinitionUtils.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/util/BeanDefinitionUtils.java index 0357fefa86..80403737d5 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/util/BeanDefinitionUtils.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/util/BeanDefinitionUtils.java @@ -223,12 +223,10 @@ public boolean equals(Object o) { return true; } - if (!(o instanceof EntityManagerFactoryBeanDefinition)) { + if (!(o instanceof EntityManagerFactoryBeanDefinition that)) { return false; } - EntityManagerFactoryBeanDefinition that = (EntityManagerFactoryBeanDefinition) o; - if (!ObjectUtils.nullSafeEquals(beanName, that.beanName)) { return false; } diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/ItemId.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/ItemId.java index 27b5417af1..774c609c97 100755 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/ItemId.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/ItemId.java @@ -58,11 +58,9 @@ public void setManufacturerId(Integer manufacturerId) { public boolean equals(Object o) { if (this == o) return true; - if (!(o instanceof ItemId)) + if (!(o instanceof ItemId itemId)) return false; - ItemId itemId = (ItemId) o; - if (id != null ? !id.equals(itemId.id) : itemId.id != null) return false; return manufacturerId != null ? manufacturerId.equals(itemId.manufacturerId) : itemId.manufacturerId == null; diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/ItemSiteId.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/ItemSiteId.java index e645fe3f4c..c691ac8f50 100755 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/ItemSiteId.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/ItemSiteId.java @@ -42,11 +42,9 @@ public ItemSiteId(ItemId item, Integer site) { public boolean equals(Object o) { if (this == o) return true; - if (!(o instanceof ItemSiteId)) + if (!(o instanceof ItemSiteId that)) return false; - ItemSiteId that = (ItemSiteId) o; - if (item != null ? !item.equals(that.item) : that.item != null) return false; return site != null ? site.equals(that.site) : that.site == null; diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/SampleWithIdClass.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/SampleWithIdClass.java index ba1cef184a..d029ba5c96 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/SampleWithIdClass.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/SampleWithIdClass.java @@ -1,13 +1,13 @@ package org.springframework.data.jpa.domain.sample; -import java.io.Serializable; - import jakarta.persistence.Access; import jakarta.persistence.AccessType; import jakarta.persistence.Entity; import jakarta.persistence.Id; import jakarta.persistence.IdClass; +import java.io.Serializable; + @Entity @IdClass(SampleWithIdClass.SampleWithIdClassPK.class) @Access(AccessType.FIELD) @@ -29,12 +29,10 @@ public boolean equals(Object obj) { return true; } - if (!(obj instanceof SampleWithIdClassPK)) { + if (!(obj instanceof SampleWithIdClassPK that)) { return false; } - SampleWithIdClassPK that = (SampleWithIdClassPK) obj; - return this.first.equals(that.first) && this.second.equals(that.second); } diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/User.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/User.java index d98ed10d6a..ec981b020f 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/User.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/User.java @@ -262,12 +262,10 @@ public byte[] getBinaryData() { @Override public boolean equals(Object obj) { - if (!(obj instanceof User)) { + if (!(obj instanceof User that)) { return false; } - User that = (User) obj; - if ((null == this.getId()) || (null == that.getId())) { return false; } From e55de1a84a440de7415168202968f752cabfd10e Mon Sep 17 00:00:00 2001 From: Mark Paluch Date: Thu, 29 Aug 2024 10:07:39 +0200 Subject: [PATCH 057/157] Reorder documentation of class-based projection support for JPA Native Queries. Closes #3599 --- .../modules/ROOT/pages/repositories/projections.adoc | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/main/antora/modules/ROOT/pages/repositories/projections.adoc b/src/main/antora/modules/ROOT/pages/repositories/projections.adoc index d34f5f5f56..556eebe91f 100644 --- a/src/main/antora/modules/ROOT/pages/repositories/projections.adoc +++ b/src/main/antora/modules/ROOT/pages/repositories/projections.adoc @@ -1,9 +1,17 @@ [[jpa.projections]] = Projections -include::{commons}@data-commons::page$repositories/projections.adoc[leveloffset=+1] +:projection-collection: Collection + +include::{commons}@data-commons::page$repositories/projections-intro.adoc[] NOTE: It is important to note that <> with JPQL is limited to *constructor expressions* in your JPQL expression, e.g. `SELECT new com.example.NamesOnly(u.firstname, u.lastname) from User u`. (Note the usage of a FQDN for the DTO type!) This JPQL expression can be used in `@Query` annotations as well where you define any named queries. And it's important to point out that class-based projections do not work with native queries AT ALL. As a workaround you may use named queries with `ResultSetMapping` or the Hibernate-specific javadoc:{hibernatejavadocurl}org.hibernate.query.ResultListTransformer[] + +include::{commons}@data-commons::page$repositories/projections-interface.adoc[leveloffset=1] + +include::{commons}@data-commons::page$repositories/projections-class.adoc[leveloffset=1] + + From acc56d6747fb24b09efcc13f8cba1cfb096d08aa Mon Sep 17 00:00:00 2001 From: Bohao Jing Date: Mon, 2 Sep 2024 14:56:30 +0800 Subject: [PATCH 058/157] Fix double-sorting usung `limit` of `FetchableFluentQueryBySpecification`. Closes #3600 Original pull request: #3601 --- .../repository/support/FetchableFluentQueryBySpecification.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/FetchableFluentQueryBySpecification.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/FetchableFluentQueryBySpecification.java index 6121be4374..08659af984 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/FetchableFluentQueryBySpecification.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/FetchableFluentQueryBySpecification.java @@ -98,7 +98,7 @@ public FetchableFluentQuery limit(int limit) { Assert.isTrue(limit >= 0, "Limit must not be negative"); - return new FetchableFluentQueryBySpecification<>(spec, entityType, resultType, this.sort.and(sort), limit, + return new FetchableFluentQueryBySpecification<>(spec, entityType, resultType, sort, limit, properties, finder, scroll, countOperation, existsOperation, entityManager, projectionFactory); } From 8a40806f02b33dcd33a3792fc2bc633a6be8f474 Mon Sep 17 00:00:00 2001 From: Jens Schauder Date: Fri, 13 Sep 2024 11:36:34 +0200 Subject: [PATCH 059/157] Prepare 3.3.4 (2024.0.4). See #3583 --- pom.xml | 20 ++++---------------- 1 file changed, 4 insertions(+), 16 deletions(-) diff --git a/pom.xml b/pom.xml index 671a2e7858..1f1e999ea5 100755 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ org.springframework.data.build spring-data-parent - 3.3.4-SNAPSHOT + 3.3.4 @@ -42,7 +42,7 @@ 4.9 8.0.33 42.6.0 - 3.3.4-SNAPSHOT + 3.3.4 0.10.3 org.hibernate @@ -286,20 +286,8 @@ - - spring-snapshot - https://repo.spring.io/snapshot - - true - - - false - - - - spring-milestone - https://repo.spring.io/milestone - + + From 7edbb1bed9c0f46d16858d7aabf2c2da37968648 Mon Sep 17 00:00:00 2001 From: Jens Schauder Date: Fri, 13 Sep 2024 11:36:54 +0200 Subject: [PATCH 060/157] Release version 3.3.4 (2024.0.4). See #3583 --- pom.xml | 2 +- spring-data-envers/pom.xml | 4 ++-- spring-data-jpa-distribution/pom.xml | 2 +- spring-data-jpa/pom.xml | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/pom.xml b/pom.xml index 1f1e999ea5..3a73042923 100755 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ org.springframework.data spring-data-jpa-parent - 3.3.4-SNAPSHOT + 3.3.4 pom Spring Data JPA Parent diff --git a/spring-data-envers/pom.xml b/spring-data-envers/pom.xml index f4616f0499..8bffd45fee 100755 --- a/spring-data-envers/pom.xml +++ b/spring-data-envers/pom.xml @@ -5,12 +5,12 @@ org.springframework.data spring-data-envers - 3.3.4-SNAPSHOT + 3.3.4 org.springframework.data spring-data-jpa-parent - 3.3.4-SNAPSHOT + 3.3.4 ../pom.xml diff --git a/spring-data-jpa-distribution/pom.xml b/spring-data-jpa-distribution/pom.xml index 3c4f07476e..1ecbf4f8fc 100644 --- a/spring-data-jpa-distribution/pom.xml +++ b/spring-data-jpa-distribution/pom.xml @@ -14,7 +14,7 @@ org.springframework.data spring-data-jpa-parent - 3.3.4-SNAPSHOT + 3.3.4 ../pom.xml diff --git a/spring-data-jpa/pom.xml b/spring-data-jpa/pom.xml index a0ca33358b..c4872f27fc 100644 --- a/spring-data-jpa/pom.xml +++ b/spring-data-jpa/pom.xml @@ -6,7 +6,7 @@ org.springframework.data spring-data-jpa - 3.3.4-SNAPSHOT + 3.3.4 Spring Data JPA Spring Data module for JPA repositories. @@ -15,7 +15,7 @@ org.springframework.data spring-data-jpa-parent - 3.3.4-SNAPSHOT + 3.3.4 ../pom.xml From 49304e1b69e0ba0b37720f9ac60faa6924b7e2ff Mon Sep 17 00:00:00 2001 From: Jens Schauder Date: Fri, 13 Sep 2024 11:40:08 +0200 Subject: [PATCH 061/157] Prepare next development iteration. See #3583 --- pom.xml | 2 +- spring-data-envers/pom.xml | 4 ++-- spring-data-jpa-distribution/pom.xml | 2 +- spring-data-jpa/pom.xml | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/pom.xml b/pom.xml index 3a73042923..63c87e81e4 100755 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ org.springframework.data spring-data-jpa-parent - 3.3.4 + 3.3.5-SNAPSHOT pom Spring Data JPA Parent diff --git a/spring-data-envers/pom.xml b/spring-data-envers/pom.xml index 8bffd45fee..9c8cef7578 100755 --- a/spring-data-envers/pom.xml +++ b/spring-data-envers/pom.xml @@ -5,12 +5,12 @@ org.springframework.data spring-data-envers - 3.3.4 + 3.3.5-SNAPSHOT org.springframework.data spring-data-jpa-parent - 3.3.4 + 3.3.5-SNAPSHOT ../pom.xml diff --git a/spring-data-jpa-distribution/pom.xml b/spring-data-jpa-distribution/pom.xml index 1ecbf4f8fc..ed291cbc99 100644 --- a/spring-data-jpa-distribution/pom.xml +++ b/spring-data-jpa-distribution/pom.xml @@ -14,7 +14,7 @@ org.springframework.data spring-data-jpa-parent - 3.3.4 + 3.3.5-SNAPSHOT ../pom.xml diff --git a/spring-data-jpa/pom.xml b/spring-data-jpa/pom.xml index c4872f27fc..a63272e45c 100644 --- a/spring-data-jpa/pom.xml +++ b/spring-data-jpa/pom.xml @@ -6,7 +6,7 @@ org.springframework.data spring-data-jpa - 3.3.4 + 3.3.5-SNAPSHOT Spring Data JPA Spring Data module for JPA repositories. @@ -15,7 +15,7 @@ org.springframework.data spring-data-jpa-parent - 3.3.4 + 3.3.5-SNAPSHOT ../pom.xml From c1d93e2b0bfbb58901c2454ccf08c0c1ce159929 Mon Sep 17 00:00:00 2001 From: Jens Schauder Date: Fri, 13 Sep 2024 11:40:09 +0200 Subject: [PATCH 062/157] After release cleanups. See #3583 --- pom.xml | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/pom.xml b/pom.xml index 63c87e81e4..bd2d8375c7 100755 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ org.springframework.data.build spring-data-parent - 3.3.4 + 3.3.5-SNAPSHOT @@ -42,7 +42,7 @@ 4.9 8.0.33 42.6.0 - 3.3.4 + 3.3.5-SNAPSHOT 0.10.3 org.hibernate @@ -286,8 +286,20 @@ - - + + spring-snapshot + https://repo.spring.io/snapshot + + true + + + false + + + + spring-milestone + https://repo.spring.io/milestone + From 99be018949346f2f2d4dc8a69ca2c7b521edc6ac Mon Sep 17 00:00:00 2001 From: Mark Paluch Date: Wed, 18 Sep 2024 08:54:04 +0200 Subject: [PATCH 063/157] Upgrade build profiles to Hibernate 6.6.1.Final. See #3613 --- pom.xml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pom.xml b/pom.xml index bd2d8375c7..de8b426bbe 100755 --- a/pom.xml +++ b/pom.xml @@ -31,9 +31,9 @@ 3.0.4 4.0.2 6.5.0.Final - 6.2.30.Final - 6.6.0.Final - 6.6.1-SNAPSHOT + 6.2.31.Final + 6.6.1.Final + 6.6.2-SNAPSHOT 7.0.0.Beta1 7.0.0-SNAPSHOT 2.7.1 From 29e69a02a73b852dcb015abdc712603c2f2fad56 Mon Sep 17 00:00:00 2001 From: Jens Schauder Date: Thu, 19 Sep 2024 15:00:55 +0200 Subject: [PATCH 064/157] Upgrade Hibernate to 6.5.3.Final Closes #3617 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index de8b426bbe..8a83a8971a 100755 --- a/pom.xml +++ b/pom.xml @@ -30,7 +30,7 @@ 4.13.0 3.0.4 4.0.2 - 6.5.0.Final + 6.5.3.Final 6.2.31.Final 6.6.1.Final 6.6.2-SNAPSHOT From 7a00b284a05bab04147f3efc67ed9c60b3cad535 Mon Sep 17 00:00:00 2001 From: arefbehboudi Date: Tue, 17 Sep 2024 14:27:10 +0330 Subject: [PATCH 065/157] Polishing. Original pull request #3612 --- .../data/jpa/domain/JpaSort.java | 2 +- .../jpa/repository/aot/JpaRuntimeHints.java | 5 ++- .../data/jpa/repository/support/Querydsl.java | 31 ++++++------------- .../support/SimpleJpaRepository.java | 14 +++++---- 4 files changed, 21 insertions(+), 31 deletions(-) diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/domain/JpaSort.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/domain/JpaSort.java index e1fa003384..a28bf8a390 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/domain/JpaSort.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/domain/JpaSort.java @@ -303,7 +303,7 @@ public String toString() { builder.append(attribute.getName()).append("."); } - return builder.length() == 0 ? "" : builder.substring(0, builder.lastIndexOf(".")); + return builder.isEmpty() ? "" : builder.substring(0, builder.lastIndexOf(".")); } } diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/aot/JpaRuntimeHints.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/aot/JpaRuntimeHints.java index 955401af7d..a2dcece1f2 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/aot/JpaRuntimeHints.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/aot/JpaRuntimeHints.java @@ -88,9 +88,8 @@ public void registerHints(RuntimeHints hints, @Nullable ClassLoader classLoader) // streaming results requires reflective access to jakarta.persistence.Query#getResultAsStream hints.reflection().registerType(jakarta.persistence.Query.class, MemberCategory.INTROSPECT_PUBLIC_METHODS); - hints.reflection().registerType(jakarta.persistence.Query.class, hint -> { - hint.withMethod("getResultStream", Collections.emptyList(), ExecutableMode.INVOKE); - }); + hints.reflection().registerType(jakarta.persistence.Query.class, hint -> + hint.withMethod("getResultStream", Collections.emptyList(), ExecutableMode.INVOKE)); hints.reflection().registerType(NamedEntityGraph.class, hint -> hint.onReachableType(EntityGraph.class).withMembers(MemberCategory.INVOKE_PUBLIC_METHODS)); diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/Querydsl.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/Querydsl.java index eaadddb2a3..0ade24f133 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/Querydsl.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/Querydsl.java @@ -77,15 +77,11 @@ public Querydsl(EntityManager em, PathBuilder builder) { */ public AbstractJPAQuery> createQuery() { - switch (provider) { - case ECLIPSELINK: - return new JPAQuery<>(em, EclipseLinkTemplates.DEFAULT); - case HIBERNATE: - return new JPAQuery<>(em, HQLTemplates.DEFAULT); - case GENERIC_JPA: - default: - return new JPAQuery<>(em); - } + return switch (provider) { + case ECLIPSELINK -> new JPAQuery<>(em, EclipseLinkTemplates.DEFAULT); + case HIBERNATE -> new JPAQuery<>(em, HQLTemplates.DEFAULT); + default -> new JPAQuery<>(em); + }; } /** @@ -202,18 +198,11 @@ private NullHandling toQueryDslNullHandling(org.springframework.data.domain.Sort Assert.notNull(nullHandling, "NullHandling must not be null"); - switch (nullHandling) { - - case NULLS_FIRST: - return NullHandling.NullsFirst; - - case NULLS_LAST: - return NullHandling.NullsLast; - - case NATIVE: - default: - return NullHandling.Default; - } + return switch (nullHandling) { + case NULLS_FIRST -> NullHandling.NullsFirst; + case NULLS_LAST -> NullHandling.NullsLast; + default -> NullHandling.Default; + }; } /** diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/SimpleJpaRepository.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/SimpleJpaRepository.java index b47b502b4f..d170a8acfc 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/SimpleJpaRepository.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/SimpleJpaRepository.java @@ -99,6 +99,8 @@ public class SimpleJpaRepository implements JpaRepositoryImplementation { private static final String ID_MUST_NOT_BE_NULL = "The given id must not be null"; + private static final String IDS_MUST_NOT_BE_NULL = "Ids must not be null"; + private static final String ENTITIES_MUST_NOT_BE_NULL = "Entities must not be null"; private final JpaEntityInformation entityInformation; private final EntityManager entityManager; @@ -212,7 +214,7 @@ public void delete(T entity) { @Transactional public void deleteAllById(Iterable ids) { - Assert.notNull(ids, "Ids must not be null"); + Assert.notNull(ids, IDS_MUST_NOT_BE_NULL); for (ID id : ids) { deleteById(id); @@ -223,7 +225,7 @@ public void deleteAllById(Iterable ids) { @Transactional public void deleteAllByIdInBatch(Iterable ids) { - Assert.notNull(ids, "Ids must not be null"); + Assert.notNull(ids, IDS_MUST_NOT_BE_NULL); if (!ids.iterator().hasNext()) { return; @@ -258,7 +260,7 @@ public void deleteAllByIdInBatch(Iterable ids) { @Transactional public void deleteAll(Iterable entities) { - Assert.notNull(entities, "Entities must not be null"); + Assert.notNull(entities, ENTITIES_MUST_NOT_BE_NULL); for (T entity : entities) { delete(entity); @@ -269,7 +271,7 @@ public void deleteAll(Iterable entities) { @Transactional public void deleteAllInBatch(Iterable entities) { - Assert.notNull(entities, "Entities must not be null"); + Assert.notNull(entities, ENTITIES_MUST_NOT_BE_NULL); if (!entities.iterator().hasNext()) { return; @@ -390,7 +392,7 @@ public List findAll() { @Override public List findAllById(Iterable ids) { - Assert.notNull(ids, "Ids must not be null"); + Assert.notNull(ids, IDS_MUST_NOT_BE_NULL); if (!ids.iterator().hasNext()) { return Collections.emptyList(); @@ -644,7 +646,7 @@ public S saveAndFlush(S entity) { @Transactional public List saveAll(Iterable entities) { - Assert.notNull(entities, "Entities must not be null"); + Assert.notNull(entities, ENTITIES_MUST_NOT_BE_NULL); List result = new ArrayList<>(); From b888bac65b579c0b65285036509e1331a2502d0a Mon Sep 17 00:00:00 2001 From: Mark Paluch Date: Mon, 30 Sep 2024 13:46:09 +0200 Subject: [PATCH 066/157] Add support for `IS TRUE|FALSE|EMPTY` and `CONTAINS|INCLUDES|INTERSECTS` HQL predicates. Closes #3628 --- .../data/jpa/repository/query/Hql.g4 | 26 ++- .../repository/query/HqlQueryRenderer.java | 159 +++++++++++------- .../query/HqlSpecificationTests.java | 80 ++++++++- 3 files changed, 187 insertions(+), 78 deletions(-) diff --git a/spring-data-jpa/src/main/antlr4/org/springframework/data/jpa/repository/query/Hql.g4 b/spring-data-jpa/src/main/antlr4/org/springframework/data/jpa/repository/query/Hql.g4 index 5edddf97d1..2734420da9 100644 --- a/spring-data-jpa/src/main/antlr4/org/springframework/data/jpa/repository/query/Hql.g4 +++ b/spring-data-jpa/src/main/antlr4/org/springframework/data/jpa/repository/query/Hql.g4 @@ -571,13 +571,15 @@ pathContinutation // https://docs.jboss.org/hibernate/orm/6.1/userguide/html_single/Hibernate_User_Guide.html#hql-conditional-expressions predicate : '(' predicate ')' # GroupedPredicate - | dealingWithNullExpression # NullExpressionPredicate + | expression IS NOT? (NULL|EMPTY|TRUE|FALSE) # IsBooleanPredicate + | expression IS NOT? DISTINCT FROM expression # IsDistinctFromPredicate + | expression NOT? MEMBER OF? path # MemberOfPredicate | inExpression # InPredicate | betweenExpression # BetweenPredicate + | expression NOT? (CONTAINS|INCLUDES|INTERSECTS) expression # ContainsPredicate | relationalExpression # RelationalPredicate | stringPatternMatching # LikePredicate | existsExpression # ExistsPredicate - | collectionExpression # CollectionPredicate | NOT predicate # NotPredicate | predicate AND predicate # AndPredicate | predicate OR predicate # OrPredicate @@ -600,12 +602,6 @@ betweenExpression : expression NOT? BETWEEN expression AND expression ; -// https://docs.jboss.org/hibernate/orm/6.1/userguide/html_single/Hibernate_User_Guide.html#hql-null-predicate -dealingWithNullExpression - : expression IS NOT? NULL - | expression IS NOT? DISTINCT FROM expression - ; - // https://docs.jboss.org/hibernate/orm/6.1/userguide/html_single/Hibernate_User_Guide.html#hql-like-predicate stringPatternMatching : expression NOT? (LIKE | ILIKE) expression (ESCAPE (stringLiteral|parameter))? @@ -632,12 +628,6 @@ existsExpression | EXISTS expression ; -// https://docs.jboss.org/hibernate/orm/6.1/userguide/html_single/Hibernate_User_Guide.html#hql-collection-operators -collectionExpression - : expression IS NOT? EMPTY - | expression NOT? MEMBER OF path - ; - // Projection // https://docs.jboss.org/hibernate/orm/6.1/userguide/html_single/Hibernate_User_Guide.html#hql-select-new instantiationTarget @@ -707,6 +697,7 @@ reservedWord | CASE | CAST | COLLATE + | CONTAINS | COUNT | CROSS | CUBE @@ -739,6 +730,7 @@ reservedWord | EXISTS | EXP | EXTRACT + | FALSE | FETCH | FILTER | FIRST @@ -757,12 +749,14 @@ reservedWord | IGNORE | ILIKE | IN + | INCLUDES | INDEX | INDICES | INNER | INSERT | INSTANT | INTERSECT + | INTERSECTS | INTO | IS | JOIN @@ -834,6 +828,7 @@ reservedWord | SOME | SUBSTRING | SUM + | TRUE | THEN | TIES | TIME @@ -917,6 +912,7 @@ CASE : C A S E; CAST : C A S T; CEILING : C E I L I N G; COLLATE : C O L L A T E; +CONTAINS : C O N T A I N S; COUNT : C O U N T; CROSS : C R O S S; CUBE : C U B E; @@ -969,12 +965,14 @@ ID : I D; IGNORE : I G N O R E; ILIKE : I L I K E; IN : I N; +INCLUDES : I N C L U D E S; INDEX : I N D E X; INDICES : I N D I C E S; INNER : I N N E R; INSERT : I N S E R T; INSTANT : I N S T A N T; INTERSECT : I N T E R S E C T; +INTERSECTS : I N T E R S E C T S; INTO : I N T O; IS : I S; JOIN : J O I N; diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/HqlQueryRenderer.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/HqlQueryRenderer.java index 5b8c990fe9..28fa868b1e 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/HqlQueryRenderer.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/HqlQueryRenderer.java @@ -2094,8 +2094,77 @@ public List visitPathContinutation(HqlParser.PathContinuta } @Override - public List visitNullExpressionPredicate(HqlParser.NullExpressionPredicateContext ctx) { - return visit(ctx.dealingWithNullExpression()); + public List visitIsBooleanPredicate(HqlParser.IsBooleanPredicateContext ctx) { + + List tokens = new ArrayList<>(); + + tokens.addAll(visit(ctx.expression())); + tokens.add(new JpaQueryParsingToken(ctx.IS())); + + if (ctx.NOT() != null) { + tokens.add(new JpaQueryParsingToken(ctx.NOT())); + } + + if (ctx.NULL() != null) { + tokens.add(new JpaQueryParsingToken(ctx.NULL())); + } + + if (ctx.TRUE() != null) { + tokens.add(new JpaQueryParsingToken(ctx.TRUE())); + } + + if (ctx.FALSE() != null) { + tokens.add(new JpaQueryParsingToken(ctx.FALSE())); + } + + if (ctx.EMPTY() != null) { + tokens.add(new JpaQueryParsingToken(ctx.EMPTY())); + } + + return tokens; + } + + @Override + public List visitMemberOfPredicate(HqlParser.MemberOfPredicateContext ctx) { + + List tokens = new ArrayList<>(); + + tokens.addAll(visit(ctx.expression())); + if (ctx.NOT() != null) { + tokens.add(new JpaQueryParsingToken(ctx.NOT())); + } + if (ctx.MEMBER() != null) { + tokens.add(new JpaQueryParsingToken(ctx.MEMBER())); + } + if (ctx.OF() != null) { + tokens.add(new JpaQueryParsingToken(ctx.OF())); + } + + tokens.addAll(visit(ctx.path())); + + return tokens; + } + + @Override + public List visitIsDistinctFromPredicate(HqlParser.IsDistinctFromPredicateContext ctx) { + + List tokens = new ArrayList<>(16); + + tokens.addAll(visit(ctx.expression(0))); + tokens.add(new JpaQueryParsingToken(ctx.IS())); + + if (ctx.NOT() != null) { + tokens.add(new JpaQueryParsingToken(ctx.NOT())); + } + + if (ctx.DISTINCT() != null) { + + tokens.add(new JpaQueryParsingToken(ctx.DISTINCT())); + tokens.add(new JpaQueryParsingToken(ctx.FROM())); + tokens.addAll(visit(ctx.expression(1))); + } + + return tokens; } @Override @@ -2103,6 +2172,33 @@ public List visitBetweenPredicate(HqlParser.BetweenPredica return visit(ctx.betweenExpression()); } + @Override + public List visitContainsPredicate(HqlParser.ContainsPredicateContext ctx) { + + List tokens = new ArrayList<>(); + + tokens.addAll(visit(ctx.expression(0))); + + if (ctx.NOT() != null) { + tokens.add(new JpaQueryParsingToken(ctx.NOT())); + } + + if (ctx.CONTAINS() != null) { + tokens.add(new JpaQueryParsingToken(ctx.CONTAINS())); + } + if (ctx.INCLUDES() != null) { + tokens.add(new JpaQueryParsingToken(ctx.INCLUDES())); + } + if (ctx.INTERSECTS() != null) { + tokens.add(new JpaQueryParsingToken(ctx.INTERSECTS())); + } + + tokens.addAll(visit(ctx.expression(1))); + + return tokens; + + } + @Override public List visitOrPredicate(HqlParser.OrPredicateContext ctx) { @@ -2125,11 +2221,6 @@ public List visitExistsPredicate(HqlParser.ExistsPredicate return visit(ctx.existsExpression()); } - @Override - public List visitCollectionPredicate(HqlParser.CollectionPredicateContext ctx) { - return visit(ctx.collectionExpression()); - } - @Override public List visitAndPredicate(HqlParser.AndPredicateContext ctx) { @@ -2224,30 +2315,6 @@ public List visitBetweenExpression(HqlParser.BetweenExpres return tokens; } - @Override - public List visitDealingWithNullExpression(HqlParser.DealingWithNullExpressionContext ctx) { - - List tokens = new ArrayList<>(); - - tokens.addAll(visit(ctx.expression(0))); - tokens.add(new JpaQueryParsingToken(ctx.IS())); - - if (ctx.NOT() != null) { - tokens.add(TOKEN_NOT); - } - - if (ctx.NULL() != null) { - tokens.add(new JpaQueryParsingToken(ctx.NULL())); - } else if (ctx.DISTINCT() != null) { - - tokens.add(new JpaQueryParsingToken(ctx.DISTINCT())); - tokens.add(new JpaQueryParsingToken(ctx.FROM())); - tokens.addAll(visit(ctx.expression(1))); - } - - return tokens; - } - @Override public List visitStringPatternMatching(HqlParser.StringPatternMatchingContext ctx) { @@ -2368,36 +2435,6 @@ public List visitExistsExpression(HqlParser.ExistsExpressi return tokens; } - @Override - public List visitCollectionExpression(HqlParser.CollectionExpressionContext ctx) { - - List tokens = new ArrayList<>(); - - tokens.addAll(visit(ctx.expression())); - - if (ctx.IS() != null) { - - tokens.add(new JpaQueryParsingToken(ctx.IS())); - - if (ctx.NOT() != null) { - tokens.add(TOKEN_NOT); - } - - tokens.add(new JpaQueryParsingToken(ctx.EMPTY())); - } else if (ctx.MEMBER() != null) { - - if (ctx.NOT() != null) { - tokens.add(TOKEN_NOT); - } - - tokens.add(new JpaQueryParsingToken(ctx.MEMBER())); - tokens.add(new JpaQueryParsingToken(ctx.OF())); - tokens.addAll(visit(ctx.path())); - } - - return tokens; - } - @Override public List visitInstantiationTarget(HqlParser.InstantiationTargetContext ctx) { diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/HqlSpecificationTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/HqlSpecificationTests.java index 3440616f4c..d4946711fd 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/HqlSpecificationTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/HqlSpecificationTests.java @@ -416,8 +416,7 @@ AND INDEX(w) = 0 * @see #functionInvocationExampleWithCorrection() */ @Test - @Disabled(SPEC_FAULT + "FUNCTION calls needs a comparator") - void functionInvocationExample_SPEC_BUG() { + void functionInvocationExampleAsBooleanExpression() { HqlQueryParser.parseQuery(""" SELECT c @@ -436,6 +435,18 @@ WHERE FUNCTION('hasGoodCredit', c.balance, c.creditLimit) = TRUE """); } + @Test // GH-3628 + void functionInvocationWithIsBoolean() { + + assertQuery(""" + from RoleTmpl where find_in_set(:appId, appIds) is true + """); + + assertQuery(""" + from RoleTmpl where find_in_set(:appId, appIds) is false + """); + } + @Test void updateCaseExample1() { @@ -751,7 +762,7 @@ void theRest25() { } @Test - void theRest26() { + void collectionIsEmpty() { HqlQueryParser.parseQuery(""" DELETE @@ -759,6 +770,69 @@ void theRest26() { WHERE c.status = 'inactive' AND c.orders IS EMPTY """); + + assertQuery(""" + DELETE + FROM Customer c + WHERE c.status = 'inactive' + AND c.orders IS NOT EMPTY + """); + } + + @Test // GH-3628 + void booleanPredicate() { + + assertQuery(""" + SELECT c + FROM Customer c + WHERE c.orders IS TRUE + """); + + assertQuery(""" + SELECT c + FROM Customer c + WHERE c.orders IS NOT TRUE + """); + + assertQuery(""" + SELECT c + FROM Customer c + WHERE c.orders IS FALSE + """); + + assertQuery(""" + SELECT c + FROM Customer c + WHERE c.orders IS NOT FALSE + """); + + assertQuery(""" + SELECT c + FROM Customer c + WHERE c.orders IS NULL + """); + + assertQuery(""" + SELECT c + FROM Customer c + WHERE c.orders IS NOT NULL + """); + } + + @Test // GH-3628 + void distinctFromPredicate() { + + assertQuery(""" + SELECT c + FROM Customer c + WHERE c.orders IS DISTINCT FROM c.payments + """); + + assertQuery(""" + SELECT c + FROM Customer c + WHERE c.orders IS NOT DISTINCT FROM c.payments + """); } @Test From 9b3e77693b0a3a7a2520434e625a445a9b20649e Mon Sep 17 00:00:00 2001 From: Mark Paluch Date: Mon, 30 Sep 2024 13:47:12 +0200 Subject: [PATCH 067/157] Polishing. Replace tabs with spaces. See #3628 --- .../data/jpa/repository/query/Hql.g4 | 498 +++++++++--------- .../query/HqlSpecificationTests.java | 22 +- 2 files changed, 260 insertions(+), 260 deletions(-) diff --git a/spring-data-jpa/src/main/antlr4/org/springframework/data/jpa/repository/query/Hql.g4 b/spring-data-jpa/src/main/antlr4/org/springframework/data/jpa/repository/query/Hql.g4 index 2734420da9..54a93e9ebf 100644 --- a/spring-data-jpa/src/main/antlr4/org/springframework/data/jpa/repository/query/Hql.g4 +++ b/spring-data-jpa/src/main/antlr4/org/springframework/data/jpa/repository/query/Hql.g4 @@ -47,12 +47,12 @@ ql_statement // https://docs.jboss.org/hibernate/orm/6.1/userguide/html_single/Hibernate_User_Guide.html#hql-select selectStatement - : queryExpression - ; + : queryExpression + ; queryExpression - : withClause? orderedQuery (setOperator orderedQuery)* - ; + : withClause? orderedQuery (setOperator orderedQuery)* + ; withClause : WITH cte (',' cte)* @@ -83,25 +83,25 @@ cteAttributes ; orderedQuery - : (query | '(' queryExpression ')') queryOrder? - ; + : (query | '(' queryExpression ')') queryOrder? + ; query - : selectClause fromClause? whereClause? (groupByClause havingClause?)? # SelectQuery - | fromClause whereClause? (groupByClause havingClause?)? selectClause? # FromQuery - ; + : selectClause fromClause? whereClause? (groupByClause havingClause?)? # SelectQuery + | fromClause whereClause? (groupByClause havingClause?)? selectClause? # FromQuery + ; queryOrder - : orderByClause limitClause? offsetClause? fetchClause? - ; + : orderByClause limitClause? offsetClause? fetchClause? + ; fromClause - : FROM entityWithJoins (',' entityWithJoins)* - ; + : FROM entityWithJoins (',' entityWithJoins)* + ; entityWithJoins - : fromRoot (joinSpecifier)* - ; + : fromRoot (joinSpecifier)* + ; joinSpecifier : join @@ -110,18 +110,18 @@ joinSpecifier ; fromRoot - : entityName variable? - | LATERAL? '(' subquery ')' variable? - ; + : entityName variable? + | LATERAL? '(' subquery ')' variable? + ; join - : joinType JOIN FETCH? joinTarget joinRestriction? // Spec BNF says joinType isn't optional, but text says that it is. - ; + : joinType JOIN FETCH? joinTarget joinRestriction? // Spec BNF says joinType isn't optional, but text says that it is. + ; joinTarget - : path variable? # JoinPath - | LATERAL? '(' subquery ')' variable? # JoinSubquery - ; + : path variable? # JoinPath + | LATERAL? '(' subquery ')' variable? # JoinSubquery + ; // https://docs.jboss.org/hibernate/orm/6.1/userguide/html_single/Hibernate_User_Guide.html#hql-update updateStatement @@ -129,12 +129,12 @@ updateStatement ; targetEntity - : entityName variable? - ; + : entityName variable? + ; setClause - : SET assignment (',' assignment)* - ; + : SET assignment (',' assignment)* + ; assignment : simplePath '=' expressionOrPredicate @@ -152,20 +152,20 @@ insertStatement // Already defined underneath updateStatement //targetEntity -// : entityName variable? -// ; +// : entityName variable? +// ; targetFields - : '(' simplePath (',' simplePath)* ')' - ; + : '(' simplePath (',' simplePath)* ')' + ; valuesList - : VALUES values (',' values)* - ; + : VALUES values (',' values)* + ; values - : '(' expression (',' expression)* ')' - ; + : '(' expression (',' expression)* ')' + ; instantiation : NEW instantiationTarget '(' instantiationArguments ')' @@ -247,8 +247,8 @@ mapEntrySelection * Deprecated syntax dating back to EJB-QL prior to EJB 3, required by JPA, never documented in Hibernate */ jpaSelectObjectSyntax - : OBJECT '(' identifier ')' - ; + : OBJECT '(' identifier ')' + ; whereClause : WHERE predicate (',' predicate)* @@ -339,17 +339,17 @@ dateTimeLiteral // https://docs.jboss.org/hibernate/orm/6.1/userguide/html_single/Hibernate_User_Guide.html#hql-duration-literals datetimeField - : YEAR - | MONTH - | DAY - | WEEK - | QUARTER - | HOUR - | MINUTE - | SECOND - | NANOSECOND - | EPOCH - ; + : YEAR + | MONTH + | DAY + | WEEK + | QUARTER + | HOUR + | MINUTE + | SECOND + | NANOSECOND + | EPOCH + ; // https://docs.jboss.org/hibernate/orm/6.1/userguide/html_single/Hibernate_User_Guide.html#hql-binary-literals binaryLiteral @@ -414,8 +414,8 @@ generalPathFragment ; indexedPathAccessFragment - : '[' expression ']' ('.' generalPathFragment)? - ; + : '[' expression ']' ('.' generalPathFragment)? + ; simplePath : identifier simplePathElement* @@ -490,24 +490,24 @@ frameClause ; frameStart - : UNBOUNDED PRECEDING # UnboundedPrecedingFrameStart - | expression PRECEDING # ExpressionPrecedingFrameStart - | CURRENT ROW # CurrentRowFrameStart - | expression FOLLOWING # ExpressionFollowingFrameStart - ; + : UNBOUNDED PRECEDING # UnboundedPrecedingFrameStart + | expression PRECEDING # ExpressionPrecedingFrameStart + | CURRENT ROW # CurrentRowFrameStart + | expression FOLLOWING # ExpressionFollowingFrameStart + ; frameExclusion - : EXCLUDE CURRENT ROW # CurrentRowFrameExclusion - | EXCLUDE GROUP # GroupFrameExclusion - | EXCLUDE TIES # TiesFrameExclusion - | EXCLUDE NO OTHERS # NoOthersFrameExclusion + : EXCLUDE CURRENT ROW # CurrentRowFrameExclusion + | EXCLUDE GROUP # GroupFrameExclusion + | EXCLUDE TIES # TiesFrameExclusion + | EXCLUDE NO OTHERS # NoOthersFrameExclusion ; frameEnd - : expression PRECEDING # ExpressionPrecedingFrameEnd - | CURRENT ROW # CurrentRowFrameEnd - | expression FOLLOWING # ExpressionFollowingFrameEnd - | UNBOUNDED FOLLOWING # UnboundedFollowingFrameEnd + : expression PRECEDING # ExpressionPrecedingFrameEnd + | CURRENT ROW # CurrentRowFrameEnd + | expression FOLLOWING # ExpressionFollowingFrameEnd + | UNBOUNDED FOLLOWING # UnboundedFollowingFrameEnd ; // https://docs.jboss.org/hibernate/orm/6.1/userguide/html_single/Hibernate_User_Guide.html#hql-functions @@ -516,13 +516,13 @@ castFunction ; castTarget - : castTargetType ('(' INTEGER_LITERAL (',' INTEGER_LITERAL)? ')')? - ; + : castTargetType ('(' INTEGER_LITERAL (',' INTEGER_LITERAL)? ')')? + ; castTargetType - returns [String fullTargetName] - : (i=identifier { $fullTargetName = _localctx.i.getText(); }) ('.' c=identifier { $fullTargetName += ("." + _localctx.c.getText() ); })* - ; + returns [String fullTargetName] + : (i=identifier { $fullTargetName = _localctx.i.getText(); }) ('.' c=identifier { $fullTargetName += ("." + _localctx.c.getText() ); })* + ; extractFunction : EXTRACT '(' expression FROM expression ')' @@ -616,11 +616,11 @@ inExpression ; inList - : (ELEMENTS | INDICES) '(' simplePath ')' - | '(' subquery ')' - | parameter - | '(' (expressionOrPredicate (',' expressionOrPredicate)*)? ')' - ; + : (ELEMENTS | INDICES) '(' simplePath ')' + | '(' subquery ')' + | parameter + | '(' (expressionOrPredicate (',' expressionOrPredicate)*)? ')' + ; // https://docs.jboss.org/hibernate/orm/6.1/userguide/html_single/Hibernate_User_Guide.html#hql-exists-predicate existsExpression @@ -641,8 +641,8 @@ instantiationArguments ; instantiationArgument - : (expressionOrPredicate | instantiation) variable? - ; + : (expressionOrPredicate | instantiation) variable? + ; // Low level parsing rules @@ -684,180 +684,180 @@ functionName reservedWord : IDENTIFICATION_VARIABLE - | f=(ALL - | AND - | ANY - | AS - | ASC - | AVG - | BETWEEN - | BOTH - | BREADTH - | BY - | CASE - | CAST - | COLLATE - | CONTAINS - | COUNT - | CROSS - | CUBE - | CURRENT - | CURRENT_DATE - | CURRENT_INSTANT - | CURRENT_TIME - | CURRENT_TIMESTAMP - | CYCLE - | DATE - | DATETIME - | DAY - | DEFAULT - | DELETE - | DEPTH - | DESC - | DISTINCT - | ELEMENT - | ELEMENTS - | ELSE - | EMPTY - | END - | ENTRY - | EPOCH - | ERROR - | ESCAPE - | EVERY - | EXCEPT - | EXCLUDE - | EXISTS - | EXP - | EXTRACT - | FALSE - | FETCH - | FILTER - | FIRST - | FLOOR - | FOLLOWING - | FOR - | FORMAT - | FROM - | FULL - | FUNCTION - | GROUP - | GROUPS - | HAVING - | HOUR - | ID - | IGNORE - | ILIKE - | IN - | INCLUDES - | INDEX - | INDICES - | INNER - | INSERT - | INSTANT - | INTERSECT - | INTERSECTS - | INTO - | IS - | JOIN - | KEY - | LAST - | LATERAL - | LEADING - | LEFT - | LIKE - | LIMIT - | LIST - | LISTAGG - | LOCAL - | LOCAL_DATE - | LOCAL_DATETIME - | LOCAL_TIME - | MAP - | MATERIALIZED - | MAX - | MAXELEMENT - | MAXINDEX - | MEMBER - | MICROSECOND - | MILLISECOND - | MIN - | MINELEMENT - | MININDEX - | MINUTE - | MONTH - | NANOSECOND - | NATURALID - | NEW - | NEXT - | NO - | NOT - | NULLS - | OBJECT - | OF - | OFFSET - | OFFSET_DATETIME - | ON - | ONLY - | OR - | ORDER - | OTHERS - | OUTER - | OVER - | OVERFLOW - | OVERLAY - | PAD - | PARTITION - | PERCENT - | PLACING - | POSITION - | POWER - | PRECEDING - | QUARTER - | RANGE - | RESPECT - | RIGHT - | ROLLUP - | ROW - | ROWS - | SEARCH - | SECOND - | SELECT - | SET - | SIZE - | SOME - | SUBSTRING - | SUM - | TRUE - | THEN - | TIES - | TIME - | TIMESTAMP - | TIMEZONE_HOUR - | TIMEZONE_MINUTE - | TO - | TRAILING - | TREAT - | TRIM - | TRUNC - | TRUNCATE - | TYPE - | UNBOUNDED - | UNION - | UPDATE - | USING - | VALUE - | VALUES - | VERSION - | VERSIONED - | WEEK - | WHEN - | WHERE - | WITH - | WITHIN - | WITHOUT - | YEAR) - ; + | f=(ALL + | AND + | ANY + | AS + | ASC + | AVG + | BETWEEN + | BOTH + | BREADTH + | BY + | CASE + | CAST + | COLLATE + | CONTAINS + | COUNT + | CROSS + | CUBE + | CURRENT + | CURRENT_DATE + | CURRENT_INSTANT + | CURRENT_TIME + | CURRENT_TIMESTAMP + | CYCLE + | DATE + | DATETIME + | DAY + | DEFAULT + | DELETE + | DEPTH + | DESC + | DISTINCT + | ELEMENT + | ELEMENTS + | ELSE + | EMPTY + | END + | ENTRY + | EPOCH + | ERROR + | ESCAPE + | EVERY + | EXCEPT + | EXCLUDE + | EXISTS + | EXP + | EXTRACT + | FALSE + | FETCH + | FILTER + | FIRST + | FLOOR + | FOLLOWING + | FOR + | FORMAT + | FROM + | FULL + | FUNCTION + | GROUP + | GROUPS + | HAVING + | HOUR + | ID + | IGNORE + | ILIKE + | IN + | INCLUDES + | INDEX + | INDICES + | INNER + | INSERT + | INSTANT + | INTERSECT + | INTERSECTS + | INTO + | IS + | JOIN + | KEY + | LAST + | LATERAL + | LEADING + | LEFT + | LIKE + | LIMIT + | LIST + | LISTAGG + | LOCAL + | LOCAL_DATE + | LOCAL_DATETIME + | LOCAL_TIME + | MAP + | MATERIALIZED + | MAX + | MAXELEMENT + | MAXINDEX + | MEMBER + | MICROSECOND + | MILLISECOND + | MIN + | MINELEMENT + | MININDEX + | MINUTE + | MONTH + | NANOSECOND + | NATURALID + | NEW + | NEXT + | NO + | NOT + | NULLS + | OBJECT + | OF + | OFFSET + | OFFSET_DATETIME + | ON + | ONLY + | OR + | ORDER + | OTHERS + | OUTER + | OVER + | OVERFLOW + | OVERLAY + | PAD + | PARTITION + | PERCENT + | PLACING + | POSITION + | POWER + | PRECEDING + | QUARTER + | RANGE + | RESPECT + | RIGHT + | ROLLUP + | ROW + | ROWS + | SEARCH + | SECOND + | SELECT + | SET + | SIZE + | SOME + | SUBSTRING + | SUM + | TRUE + | THEN + | TIES + | TIME + | TIMESTAMP + | TIMEZONE_HOUR + | TIMEZONE_MINUTE + | TO + | TRAILING + | TREAT + | TRIM + | TRUNC + | TRUNCATE + | TYPE + | UNBOUNDED + | UNION + | UPDATE + | USING + | VALUE + | VALUES + | VERSION + | VERSIONED + | WEEK + | WHEN + | WHERE + | WITH + | WITHIN + | WITHOUT + | YEAR) + ; /* Lexer rules diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/HqlSpecificationTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/HqlSpecificationTests.java index d4946711fd..91afec5a0c 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/HqlSpecificationTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/HqlSpecificationTests.java @@ -438,11 +438,11 @@ WHERE FUNCTION('hasGoodCredit', c.balance, c.creditLimit) = TRUE @Test // GH-3628 void functionInvocationWithIsBoolean() { - assertQuery(""" + HqlQueryParser.parseQuery(""" from RoleTmpl where find_in_set(:appId, appIds) is true """); - assertQuery(""" + HqlQueryParser.parseQuery(""" from RoleTmpl where find_in_set(:appId, appIds) is false """); } @@ -771,7 +771,7 @@ void collectionIsEmpty() { AND c.orders IS EMPTY """); - assertQuery(""" + HqlQueryParser.parseQuery(""" DELETE FROM Customer c WHERE c.status = 'inactive' @@ -782,37 +782,37 @@ void collectionIsEmpty() { @Test // GH-3628 void booleanPredicate() { - assertQuery(""" + HqlQueryParser.parseQuery(""" SELECT c FROM Customer c WHERE c.orders IS TRUE """); - assertQuery(""" + HqlQueryParser.parseQuery(""" SELECT c FROM Customer c WHERE c.orders IS NOT TRUE """); - assertQuery(""" + HqlQueryParser.parseQuery(""" SELECT c FROM Customer c WHERE c.orders IS FALSE """); - assertQuery(""" + HqlQueryParser.parseQuery(""" SELECT c FROM Customer c WHERE c.orders IS NOT FALSE """); - assertQuery(""" + HqlQueryParser.parseQuery(""" SELECT c FROM Customer c WHERE c.orders IS NULL """); - assertQuery(""" + HqlQueryParser.parseQuery(""" SELECT c FROM Customer c WHERE c.orders IS NOT NULL @@ -822,13 +822,13 @@ void booleanPredicate() { @Test // GH-3628 void distinctFromPredicate() { - assertQuery(""" + HqlQueryParser.parseQuery(""" SELECT c FROM Customer c WHERE c.orders IS DISTINCT FROM c.payments """); - assertQuery(""" + HqlQueryParser.parseQuery(""" SELECT c FROM Customer c WHERE c.orders IS NOT DISTINCT FROM c.payments From f474af7811c24846067b0b3dd0aed32a58c56493 Mon Sep 17 00:00:00 2001 From: Christoph Strobl Date: Tue, 16 Apr 2024 08:25:08 +0200 Subject: [PATCH 068/157] Fix order by rendering for queries containing UNION. Make sure to append space after order by clause and fix alias detection for wrapped sub select. Also make sure to ignore alias used in subselect so they do not conflict with root ones. Render order by only on full select if set operator is present in EQL. Closes #3630 Original pull request: #3429 See #3427 --- .../repository/query/EqlQueryTransformer.java | 39 +++++++++++------ .../repository/query/HqlQueryTransformer.java | 42 +++++++++++++++++-- .../query/JpaQueryTransformerSupport.java | 8 ++-- .../query/EqlQueryTransformerTests.java | 9 ++++ .../query/HqlQueryTransformerTests.java | 38 +++++++++++++++++ 5 files changed, 115 insertions(+), 21 deletions(-) diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/EqlQueryTransformer.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/EqlQueryTransformer.java index 890c5d39d8..26c067b5d5 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/EqlQueryTransformer.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/EqlQueryTransformer.java @@ -24,6 +24,7 @@ import org.springframework.data.domain.Sort; import org.springframework.lang.Nullable; import org.springframework.util.Assert; +import org.springframework.util.ObjectUtils; /** * An ANTLR {@link org.antlr.v4.runtime.tree.ParseTreeVisitor} that transforms a parsed EQL query. @@ -105,27 +106,39 @@ public List visitSelect_statement(EqlParser.Select_stateme if (!countQuery) { - if (ctx.orderby_clause() != null) { - tokens.addAll(visit(ctx.orderby_clause())); + doVisitOrderBy(tokens, ctx, ObjectUtils.isEmpty(ctx.setOperator()) ? this.sort : Sort.unsorted()); + + for (int i = 0; i < ctx.setOperator().size(); i++) { + + tokens.addAll(visit(ctx.setOperator(i))); + tokens.addAll(visit(ctx.select_statement(i))); } - if (sort.isSorted()) { + } - if (ctx.orderby_clause() != null) { + return tokens; + } - NOSPACE(tokens); - tokens.add(TOKEN_COMMA); - } else { + private void doVisitOrderBy(List tokens, EqlParser.Select_statementContext ctx, Sort sort) { - SPACE(tokens); - tokens.add(TOKEN_ORDER_BY); - } + if (ctx.orderby_clause() != null) { + tokens.addAll(visit(ctx.orderby_clause())); + } - tokens.addAll(transformerSupport.generateOrderByArguments(primaryFromAlias, sort)); + if (sort.isSorted()) { + + if (ctx.orderby_clause() != null) { + + NOSPACE(tokens); + tokens.add(TOKEN_COMMA); + } else { + + SPACE(tokens); + tokens.add(TOKEN_ORDER_BY); } - } - return tokens; + tokens.addAll(transformerSupport.generateOrderByArguments(primaryFromAlias, sort)); + } } @Override diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/HqlQueryTransformer.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/HqlQueryTransformer.java index 7aa2df8cfb..dc0445263d 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/HqlQueryTransformer.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/HqlQueryTransformer.java @@ -26,6 +26,7 @@ import org.springframework.data.jpa.repository.query.HqlParser.SelectionContext; import org.springframework.lang.Nullable; import org.springframework.util.Assert; +import org.springframework.util.ObjectUtils; /** * An ANTLR {@link org.antlr.v4.runtime.tree.ParseTreeVisitor} that transforms a parsed HQL query. @@ -105,8 +106,7 @@ private static boolean isSubquery(ParserRuleContext ctx) { } } - @Override - public List visitOrderedQuery(HqlParser.OrderedQueryContext ctx) { + private List visitOrderedQuery(HqlParser.OrderedQueryContext ctx, Sort sort) { List tokens = newArrayList(); @@ -190,6 +190,40 @@ public List visitFromQuery(HqlParser.FromQueryContext ctx) return tokens; } + @Override + public List visitQueryExpression(HqlParser.QueryExpressionContext ctx) { + + if (ObjectUtils.isEmpty(ctx.setOperator())) { + return super.visitQueryExpression(ctx); + } + + List builder = new ArrayList<>(); + if (ctx.withClause() != null) { + builder.addAll(visit(ctx.withClause())); + } + + List orderedQueries = ctx.orderedQuery(); + for (int i = 0; i < orderedQueries.size(); i++) { + + if (i != 0) { + builder.addAll(visit(ctx.setOperator(i - 1))); + } + + if (i == orderedQueries.size() - 1) { + builder.addAll(visitOrderedQuery(ctx.orderedQuery(i), this.sort)); + } else { + builder.addAll(visitOrderedQuery(ctx.orderedQuery(i), Sort.unsorted())); + } + } + + return builder; + } + + @Override + public List visitOrderedQuery(HqlParser.OrderedQueryContext ctx) { + return visitOrderedQuery(ctx, this.sort); + } + @Override public List visitQueryOrder(HqlParser.QueryOrderContext ctx) { @@ -325,7 +359,7 @@ public List visitVariable(HqlParser.VariableContext ctx) { List tokens = super.visitVariable(ctx); - if (ctx.identifier() != null) { + if (ctx.identifier() != null && !tokens.isEmpty() && !isSubquery(ctx)) { transformerSupport.registerAlias(tokens.get(tokens.size() - 1).getToken()); } @@ -335,7 +369,7 @@ public List visitVariable(HqlParser.VariableContext ctx) { @Override public List visitSelection(SelectionContext ctx) { - if(!countQuery || isSubquery(ctx)) { + if (!countQuery || isSubquery(ctx)) { return super.visitSelection(ctx); } diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/JpaQueryTransformerSupport.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/JpaQueryTransformerSupport.java index 6c730e7924..2cd883fa12 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/JpaQueryTransformerSupport.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/JpaQueryTransformerSupport.java @@ -16,7 +16,7 @@ /** * Transformational operations needed to support either {@link HqlQueryTransformer} or {@link JpqlQueryTransformer}. - * + * * @author Greg Turnquist * @author Donghun Shin * @since 3.1 @@ -47,12 +47,12 @@ void registerAlias(String token) { /** * Using the primary {@literal FROM} clause's alias and a {@link Sort}, construct all the {@literal ORDER BY} * arguments. - * + * * @param primaryFromAlias * @param sort * @return */ - List generateOrderByArguments(String primaryFromAlias, Sort sort) { + List generateOrderByArguments(@Nullable String primaryFromAlias, Sort sort) { List tokens = new ArrayList<>(); @@ -98,7 +98,7 @@ private void checkSortExpression(Sort.Order order) { /** * Using the {@code primaryFromAlias} and the {@link org.springframework.data.domain.Sort.Order}, construct a suitable * argument to be added to an {@literal ORDER BY} expression. - * + * * @param primaryFromAlias * @param order * @return diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/EqlQueryTransformerTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/EqlQueryTransformerTests.java index 2b5e052527..e43ff50ec0 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/EqlQueryTransformerTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/EqlQueryTransformerTests.java @@ -753,6 +753,15 @@ void sortingRecognizesJoinAliases() { """); } + @Test // GH-3427 + void sortShouldBeAppendedToFullSelectOnlyInCaseOfSetOperator() { + + String source = "SELECT tb FROM Test tb WHERE (tb.type='A') UNION SELECT tb FROM Test tb WHERE (tb.type='B')"; + String target = createQueryFor(source, Sort.by("Type").ascending()); + + assertThat(target).isEqualTo("SELECT tb FROM Test tb WHERE (tb.type = 'A') UNION SELECT tb FROM Test tb WHERE (tb.type = 'B') order by tb.Type asc"); + } + static Stream queriesWithReservedWordsAsIdentifiers() { return Stream.of( // diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/HqlQueryTransformerTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/HqlQueryTransformerTests.java index 549a1ed5ff..648c03e055 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/HqlQueryTransformerTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/HqlQueryTransformerTests.java @@ -17,6 +17,8 @@ import static org.assertj.core.api.Assertions.*; +import java.util.regex.Matcher; +import java.util.regex.Pattern; import java.util.stream.Stream; import org.assertj.core.api.SoftAssertions; @@ -24,11 +26,13 @@ import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.Arguments; import org.junit.jupiter.params.provider.MethodSource; +import org.junit.jupiter.params.provider.ValueSource; import org.springframework.dao.InvalidDataAccessApiUsageException; import org.springframework.data.domain.PageRequest; import org.springframework.data.domain.Sort; import org.springframework.data.jpa.domain.JpaSort; import org.springframework.lang.Nullable; +import org.springframework.util.StringUtils; /** * Verify that HQL queries are properly transformed through the {@link JpaQueryEnhancer} and the {@link HqlQueryParser}. @@ -1060,6 +1064,40 @@ void createsCountQueryUsingAliasCorrectly() { assertCountQuery("select distinct a, count(b) as c from Employee GROUP BY n","select count(distinct a, count(b)) from Employee AS __ GROUP BY n"); } + @Test // GH-3427 + void sortShouldBeAppendedWithSpacingInCaseOfSetOperator() { + + String source = "SELECT tb FROM Test tb WHERE (tb.type='A') UNION SELECT tb FROM Test tb WHERE (tb.type='B')"; + String target = createQueryFor(source, Sort.by("Type").ascending()); + + assertThat(target).isEqualTo("SELECT tb FROM Test tb WHERE (tb.type = 'A') UNION SELECT tb FROM Test tb WHERE (tb.type = 'B') order by tb.Type asc"); + } + + @ParameterizedTest // GH-3427 + @ValueSource(strings = {"", "res"}) + void sortShouldBeAppendedToSubSelectWithSetOperatorInSubselect(String alias) { + + String prefix = StringUtils.hasText(alias) ? (alias + ".") : ""; + String source = "SELECT %sname FROM (SELECT c.name as name FROM Category c UNION SELECT t.name as name FROM Tag t)".formatted(prefix); + if(StringUtils.hasText(alias)) { + source = source + " %s".formatted(alias); + } + + String target = createQueryFor(source, Sort.by("name").ascending()); + + assertThat(target).contains(" UNION SELECT ").doesNotContainPattern(Pattern.compile(".*\\SUNION")); + assertThat(target).endsWith("order by %sname asc".formatted(prefix)).satisfies(it -> { + Pattern pattern = Pattern.compile("order by %sname".formatted(prefix)); + Matcher matcher = pattern.matcher(target); + int count = 0; + while(matcher.find()) { + count++; + } + assertThat(count).describedAs("Found order by clause more than once in: \n%s", it).isOne(); + }); + + } + private void assertCountQuery(String originalQuery, String countQuery) { assertThat(createCountQueryFor(originalQuery)).isEqualTo(countQuery); } From c56851c9aa494bcd6e90cd719815e6f5c4517a8d Mon Sep 17 00:00:00 2001 From: Christoph Strobl Date: Thu, 26 Sep 2024 11:31:05 +0200 Subject: [PATCH 069/157] Add configuration option to disable usage of JSqlParser for native queries. This commit introduces the spring.data.jpa.query.native.parser property that allows to switch native query parsing to the default internal parser for scenarios where JSqlParser is on the classpath but should not be used by spring-data. Closes #2989 Original pull request: #3623 --- spring-data-jpa/pom.xml | 6 + .../query/QueryEnhancerFactory.java | 75 +++++++-- .../query/QueryEnhancerFactoryUnitTests.java | 63 +++++++- .../data/jpa/util/ClassPathExclusions.java | 45 ++++++ .../util/ClassPathExclusionsExtension.java | 130 ++++++++++++++++ .../jpa/util/PackageExcludingClassLoader.java | 143 ++++++++++++++++++ .../modules/ROOT/pages/jpa/query-methods.adoc | 5 + 7 files changed, 450 insertions(+), 17 deletions(-) create mode 100644 spring-data-jpa/src/test/java/org/springframework/data/jpa/util/ClassPathExclusions.java create mode 100644 spring-data-jpa/src/test/java/org/springframework/data/jpa/util/ClassPathExclusionsExtension.java create mode 100644 spring-data-jpa/src/test/java/org/springframework/data/jpa/util/PackageExcludingClassLoader.java diff --git a/spring-data-jpa/pom.xml b/spring-data-jpa/pom.xml index a63272e45c..cc4bd54949 100644 --- a/spring-data-jpa/pom.xml +++ b/spring-data-jpa/pom.xml @@ -86,6 +86,12 @@ true + + org.junit.platform + junit-platform-launcher + test + + org.hsqldb hsqldb diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/QueryEnhancerFactory.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/QueryEnhancerFactory.java index f7c6f7dd1c..0ffcc6b660 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/QueryEnhancerFactory.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/QueryEnhancerFactory.java @@ -17,8 +17,11 @@ import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; +import org.springframework.core.SpringProperties; import org.springframework.data.jpa.provider.PersistenceProvider; +import org.springframework.lang.Nullable; import org.springframework.util.ClassUtils; +import org.springframework.util.StringUtils; /** * Encapsulates different strategies for the creation of a {@link QueryEnhancer} from a {@link DeclaredQuery}. @@ -26,20 +29,17 @@ * @author Diego Krupitza * @author Greg Turnquist * @author Mark Paluch + * @author Christoph Strobl * @since 2.7.0 */ public final class QueryEnhancerFactory { private static final Log LOG = LogFactory.getLog(QueryEnhancerFactory.class); - - private static final boolean jSqlParserPresent = ClassUtils.isPresent("net.sf.jsqlparser.parser.JSqlParser", - QueryEnhancerFactory.class.getClassLoader()); + private static final NativeQueryEnhancer NATIVE_QUERY_ENHANCER; static { - if (jSqlParserPresent) { - LOG.info("JSqlParser is in classpath; If applicable, JSqlParser will be used"); - } + NATIVE_QUERY_ENHANCER = NativeQueryEnhancer.select(QueryEnhancerFactory.class.getClassLoader()); if (PersistenceProvider.ECLIPSELINK.isPresent()) { LOG.info("EclipseLink is in classpath; If applicable, EQL parser will be used."); @@ -48,7 +48,6 @@ public final class QueryEnhancerFactory { if (PersistenceProvider.HIBERNATE.isPresent()) { LOG.info("Hibernate is in classpath; If applicable, HQL parser will be used."); } - } private QueryEnhancerFactory() {} @@ -62,15 +61,7 @@ private QueryEnhancerFactory() {} public static QueryEnhancer forQuery(DeclaredQuery query) { if (query.isNativeQuery()) { - - if (jSqlParserPresent) { - /* - * If JSqlParser fails, throw some alert signaling that people should write a custom Impl. - */ - return new JSqlParserQueryEnhancer(query); - } - - return new DefaultQueryEnhancer(query); + return getNativeQueryEnhancer(query); } if (PersistenceProvider.HIBERNATE.isPresent()) { @@ -82,4 +73,56 @@ public static QueryEnhancer forQuery(DeclaredQuery query) { } } + /** + * Get the native query enhancer for the given {@link DeclaredQuery query} based on {@link #NATIVE_QUERY_ENHANCER}. + * + * @param query the declared query. + * @return new instance of {@link QueryEnhancer}. + */ + private static QueryEnhancer getNativeQueryEnhancer(DeclaredQuery query) { + + if (NATIVE_QUERY_ENHANCER.equals(NativeQueryEnhancer.JSQL)) { + return new JSqlParserQueryEnhancer(query); + } + return new DefaultQueryEnhancer(query); + } + + /** + * Possible choices for the {@link #NATIVE_PARSER_PROPERTY}. Read current selection via {@link #select(ClassLoader)}. + */ + enum NativeQueryEnhancer { + + AUTO, DEFAULT, JSQL; + + static final String NATIVE_PARSER_PROPERTY = "spring.data.jpa.query.native.parser"; + + private static NativeQueryEnhancer from(@Nullable String name) { + if (!StringUtils.hasText(name)) { + return AUTO; + } + return NativeQueryEnhancer.valueOf(name.toUpperCase()); + } + + /** + * @param classLoader ClassLoader to look up available libraries. + * @return the current selection considering classpath avialability and user selection via + * {@link #NATIVE_PARSER_PROPERTY}. + */ + static NativeQueryEnhancer select(ClassLoader classLoader) { + + if (!ClassUtils.isPresent("net.sf.jsqlparser.parser.JSqlParser", classLoader)) { + return NativeQueryEnhancer.DEFAULT; + } + + NativeQueryEnhancer selected = NativeQueryEnhancer.from(SpringProperties.getProperty(NATIVE_PARSER_PROPERTY)); + if (selected.equals(NativeQueryEnhancer.AUTO) || selected.equals(NativeQueryEnhancer.JSQL)) { + LOG.info("JSqlParser is in classpath; If applicable, JSqlParser will be used."); + return NativeQueryEnhancer.JSQL; + } + + LOG.info("JSqlParser is in classpath but won't be used due to user choice."); + return selected; + } + } + } diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/QueryEnhancerFactoryUnitTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/QueryEnhancerFactoryUnitTests.java index 61fe6a2aa3..d650277bd6 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/QueryEnhancerFactoryUnitTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/QueryEnhancerFactoryUnitTests.java @@ -15,15 +15,24 @@ */ package org.springframework.data.jpa.repository.query; -import static org.assertj.core.api.Assertions.*; +import static org.assertj.core.api.Assertions.assertThat; + +import java.util.stream.Stream; import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.Arguments; +import org.junit.jupiter.params.provider.MethodSource; +import org.springframework.data.jpa.repository.query.QueryEnhancerFactory.NativeQueryEnhancer; +import org.springframework.data.jpa.util.ClassPathExclusions; +import org.springframework.lang.Nullable; /** * Unit tests for {@link QueryEnhancerFactory}. * * @author Diego Krupitza * @author Greg Turnquist + * @author Christoph Strobl */ class QueryEnhancerFactoryUnitTests { @@ -52,4 +61,56 @@ void createsJSqlImplementationForNativeQuery() { assertThat(queryEnhancer) // .isInstanceOf(JSqlParserQueryEnhancer.class); } + + @ParameterizedTest // GH-2989 + @MethodSource("nativeEnhancerSelectionArgs") + void createsNativeImplementationAccordingToUserChoice(@Nullable String selection, NativeQueryEnhancer enhancer) { + + withSystemProperty(NativeQueryEnhancer.NATIVE_PARSER_PROPERTY, selection, () -> { + assertThat(NativeQueryEnhancer.select(this.getClass().getClassLoader())).isEqualTo(enhancer); + }); + } + + @Test // GH-2989 + @ClassPathExclusions(packages = { "net.sf.jsqlparser.parser" }) + void selectedDefaultImplementationIfJsqlNotAvailable() { + + assertThat(assertThat(NativeQueryEnhancer.select(this.getClass().getClassLoader())) + .isEqualTo(NativeQueryEnhancer.DEFAULT)); + } + + @Test // GH-2989 + @ClassPathExclusions(packages = { "net.sf.jsqlparser.parser" }) + void selectedDefaultImplementationIfJsqlNotAvailableEvenIfExplicitlyStated/* or should we raise an error? */() { + + withSystemProperty(NativeQueryEnhancer.NATIVE_PARSER_PROPERTY, "jsql", () -> { + assertThat(NativeQueryEnhancer.select(this.getClass().getClassLoader())).isEqualTo(NativeQueryEnhancer.DEFAULT); + }); + } + + void withSystemProperty(String property, @Nullable String value, Runnable exeution) { + + String currentValue = System.getProperty(property); + if (value != null) { + System.setProperty(property, value); + } else { + System.clearProperty(property); + } + try { + exeution.run(); + } finally { + if (currentValue != null) { + System.setProperty(property, currentValue); + } else { + System.clearProperty(property); + } + } + + } + + static Stream nativeEnhancerSelectionArgs() { + return Stream.of(Arguments.of(null, NativeQueryEnhancer.JSQL), Arguments.of("", NativeQueryEnhancer.JSQL), + Arguments.of("auto", NativeQueryEnhancer.JSQL), Arguments.of("default", NativeQueryEnhancer.DEFAULT), + Arguments.of("jsql", NativeQueryEnhancer.JSQL)); + } } diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/util/ClassPathExclusions.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/util/ClassPathExclusions.java new file mode 100644 index 0000000000..aa25c22739 --- /dev/null +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/util/ClassPathExclusions.java @@ -0,0 +1,45 @@ +/* + * Copyright 2024 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.springframework.data.jpa.util; + +import java.lang.annotation.Documented; +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +import org.junit.jupiter.api.extension.ExtendWith; + +/** + * Annotation used to exclude entries from the classpath. Simplified version of ClassPathExclusions. + * + * @author Christoph Strobl + */ +@Retention(RetentionPolicy.RUNTIME) +@Target({ ElementType.TYPE, ElementType.METHOD }) +@Documented +@ExtendWith(ClassPathExclusionsExtension.class) +public @interface ClassPathExclusions { + + /** + * One or more packages that should be excluded from the classpath. + * + * @return the excluded packages + */ + String[] packages(); + +} diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/util/ClassPathExclusionsExtension.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/util/ClassPathExclusionsExtension.java new file mode 100644 index 0000000000..46dcd05fb5 --- /dev/null +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/util/ClassPathExclusionsExtension.java @@ -0,0 +1,130 @@ +/* + * Copyright 2024 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.springframework.data.jpa.util; + +import java.lang.reflect.Method; + +import org.junit.jupiter.api.extension.ExtensionContext; +import org.junit.jupiter.api.extension.InvocationInterceptor; +import org.junit.jupiter.api.extension.ReflectiveInvocationContext; +import org.junit.platform.engine.discovery.DiscoverySelectors; +import org.junit.platform.launcher.Launcher; +import org.junit.platform.launcher.LauncherDiscoveryRequest; +import org.junit.platform.launcher.TestPlan; +import org.junit.platform.launcher.core.LauncherDiscoveryRequestBuilder; +import org.junit.platform.launcher.core.LauncherFactory; +import org.junit.platform.launcher.listeners.SummaryGeneratingListener; +import org.junit.platform.launcher.listeners.TestExecutionSummary; +import org.springframework.util.CollectionUtils; + +/** + * Simplified version of ModifiedClassPathExtension. + * + * @author Christoph Strobl + */ +class ClassPathExclusionsExtension implements InvocationInterceptor { + + @Override + public void interceptBeforeAllMethod(Invocation invocation, + ReflectiveInvocationContext invocationContext, ExtensionContext extensionContext) throws Throwable { + intercept(invocation, extensionContext); + } + + @Override + public void interceptBeforeEachMethod(Invocation invocation, + ReflectiveInvocationContext invocationContext, ExtensionContext extensionContext) throws Throwable { + intercept(invocation, extensionContext); + } + + @Override + public void interceptAfterEachMethod(Invocation invocation, + ReflectiveInvocationContext invocationContext, ExtensionContext extensionContext) throws Throwable { + intercept(invocation, extensionContext); + } + + @Override + public void interceptAfterAllMethod(Invocation invocation, + ReflectiveInvocationContext invocationContext, ExtensionContext extensionContext) throws Throwable { + intercept(invocation, extensionContext); + } + + @Override + public void interceptTestMethod(Invocation invocation, ReflectiveInvocationContext invocationContext, + ExtensionContext extensionContext) throws Throwable { + interceptMethod(invocation, invocationContext, extensionContext); + } + + @Override + public void interceptTestTemplateMethod(Invocation invocation, + ReflectiveInvocationContext invocationContext, ExtensionContext extensionContext) throws Throwable { + interceptMethod(invocation, invocationContext, extensionContext); + } + + private void interceptMethod(Invocation invocation, ReflectiveInvocationContext invocationContext, + ExtensionContext extensionContext) throws Throwable { + + if (isModifiedClassPathClassLoader(extensionContext)) { + invocation.proceed(); + return; + } + + Class testClass = extensionContext.getRequiredTestClass(); + Method testMethod = invocationContext.getExecutable(); + PackageExcludingClassLoader modifiedClassLoader = PackageExcludingClassLoader.get(testClass, testMethod); + if (modifiedClassLoader == null) { + invocation.proceed(); + return; + } + invocation.skip(); + ClassLoader originalClassLoader = Thread.currentThread().getContextClassLoader(); + Thread.currentThread().setContextClassLoader(modifiedClassLoader); + try { + runTest(extensionContext.getUniqueId()); + } finally { + Thread.currentThread().setContextClassLoader(originalClassLoader); + } + } + + private void runTest(String testId) throws Throwable { + + LauncherDiscoveryRequest request = LauncherDiscoveryRequestBuilder.request() + .selectors(DiscoverySelectors.selectUniqueId(testId)).build(); + Launcher launcher = LauncherFactory.create(); + TestPlan testPlan = launcher.discover(request); + SummaryGeneratingListener listener = new SummaryGeneratingListener(); + launcher.registerTestExecutionListeners(listener); + launcher.execute(testPlan); + TestExecutionSummary summary = listener.getSummary(); + if (!CollectionUtils.isEmpty(summary.getFailures())) { + throw summary.getFailures().get(0).getException(); + } + } + + private void intercept(Invocation invocation, ExtensionContext extensionContext) throws Throwable { + if (isModifiedClassPathClassLoader(extensionContext)) { + invocation.proceed(); + return; + } + invocation.skip(); + } + + private boolean isModifiedClassPathClassLoader(ExtensionContext extensionContext) { + Class testClass = extensionContext.getRequiredTestClass(); + ClassLoader classLoader = testClass.getClassLoader(); + return classLoader.getClass().getName().equals(PackageExcludingClassLoader.class.getName()); + } +} diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/util/PackageExcludingClassLoader.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/util/PackageExcludingClassLoader.java new file mode 100644 index 0000000000..b768c90fd4 --- /dev/null +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/util/PackageExcludingClassLoader.java @@ -0,0 +1,143 @@ +/* + * Copyright 2024 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.springframework.data.jpa.util; + +import java.io.File; +import java.lang.management.ManagementFactory; +import java.lang.reflect.Method; +import java.net.URL; +import java.net.URLClassLoader; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collection; +import java.util.Collections; +import java.util.EnumSet; +import java.util.List; +import java.util.Objects; +import java.util.Set; +import java.util.function.BiConsumer; +import java.util.function.BinaryOperator; +import java.util.function.Function; +import java.util.function.Supplier; +import java.util.stream.Collector; +import java.util.stream.Stream; + +import org.springframework.core.annotation.AnnotatedElementUtils; +import org.springframework.util.ClassUtils; + +/** + * Simplified version of ModifiedClassPathClassLoader. + * + * @author Christoph Strobl + */ +class PackageExcludingClassLoader extends URLClassLoader { + + private final Set excludedPackages; + private final ClassLoader junitLoader; + + PackageExcludingClassLoader(URL[] urls, ClassLoader parent, Collection excludedPackages, + ClassLoader junitClassLoader) { + + super(urls, parent); + this.excludedPackages = Set.copyOf(excludedPackages); + this.junitLoader = junitClassLoader; + } + + @Override + public Class loadClass(String name) throws ClassNotFoundException { + + if (name.startsWith("org.junit") || name.startsWith("org.hamcrest")) { + return Class.forName(name, false, this.junitLoader); + } + + String packageName = ClassUtils.getPackageName(name); + if (this.excludedPackages.contains(packageName)) { + throw new ClassNotFoundException(name); + } + return super.loadClass(name); + } + + static PackageExcludingClassLoader get(Class testClass, Method testMethod) { + + List excludedPackages = readExcludedPackages(testClass, testMethod); + + if (excludedPackages.isEmpty()) { + return null; + } + + ClassLoader testClassClassLoader = testClass.getClassLoader(); + Stream urls = null; + if (testClassClassLoader instanceof URLClassLoader urlClassLoader) { + urls = Stream.of(urlClassLoader.getURLs()); + } else { + urls = Stream.of(ManagementFactory.getRuntimeMXBean().getClassPath().split(File.pathSeparator)) + .map(PackageExcludingClassLoader::toURL); + } + + return new PackageExcludingClassLoader(urls.toArray(URL[]::new), testClassClassLoader.getParent(), excludedPackages, + testClassClassLoader); + } + + private static List readExcludedPackages(Class testClass, Method testMethod) { + + return Stream.of( // + AnnotatedElementUtils.findMergedAnnotation(testClass, ClassPathExclusions.class), + AnnotatedElementUtils.findMergedAnnotation(testMethod, ClassPathExclusions.class) // + ).filter(Objects::nonNull) // + .map(ClassPathExclusions::packages) // + .collect(new CombingArrayCollector()); + } + + private static URL toURL(String entry) { + try { + return new File(entry).toURI().toURL(); + } catch (Exception ex) { + throw new IllegalArgumentException(ex); + } + } + + private static class CombingArrayCollector implements Collector, List> { + + @Override + public Supplier> supplier() { + return ArrayList::new; + } + + @Override + public BiConsumer, T[]> accumulator() { + return (target, values) -> target.addAll(Arrays.asList(values)); + } + + @Override + public BinaryOperator> combiner() { + return (r1, r2) -> { + r1.addAll(r2); + return r1; + }; + } + + @Override + public Function, List> finisher() { + return i -> (List) i; + } + + @Override + public Set characteristics() { + return Collections.unmodifiableSet(EnumSet.of(Characteristics.IDENTITY_FINISH)); + } + } +} diff --git a/src/main/antora/modules/ROOT/pages/jpa/query-methods.adoc b/src/main/antora/modules/ROOT/pages/jpa/query-methods.adoc index 9b86d9ee6d..1681d2b7d7 100644 --- a/src/main/antora/modules/ROOT/pages/jpa/query-methods.adoc +++ b/src/main/antora/modules/ROOT/pages/jpa/query-methods.adoc @@ -304,6 +304,11 @@ public interface UserRepository extends JpaRepository { ---- ==== +[TIP] +==== +It is possible to disable usage of `JSqlParser` for parsing natvie queries although it is available in classpath by setting `spring.data.jpa.query.native.parser=default` via the `spring.properties` file or a system property. +==== + A similar approach also works with named native queries, by adding the `.count` suffix to a copy of your query. You probably need to register a result set mapping for your count query, though. [[jpa.query-methods.sorting]] From 2a5fdc3b0de1110c80fe3f12d01501846b91ffa7 Mon Sep 17 00:00:00 2001 From: Mark Paluch Date: Tue, 1 Oct 2024 15:22:40 +0200 Subject: [PATCH 070/157] Polishing. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Use ObjectUtils instead of Enum.valueOf(…), move class presence check into field. Allow force-selection of JSQLParser. Add more tests. See #2989 Original pull request: #3623 --- .../query/DefaultQueryEnhancer.java | 2 +- .../query/QueryEnhancerFactory.java | 63 ++++++++++++------- .../query/QueryEnhancerFactoryUnitTests.java | 50 ++++++++++----- .../modules/ROOT/pages/jpa/query-methods.adoc | 8 ++- 4 files changed, 84 insertions(+), 39 deletions(-) diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/DefaultQueryEnhancer.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/DefaultQueryEnhancer.java index 3053bb95f5..3aff35357b 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/DefaultQueryEnhancer.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/DefaultQueryEnhancer.java @@ -21,7 +21,7 @@ import org.springframework.lang.Nullable; /** - * The implementation of {@link QueryEnhancer} using {@link QueryUtils}. + * The implementation of the Regex-based {@link QueryEnhancer} using {@link QueryUtils}. * * @author Diego Krupitza * @since 2.7.0 diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/QueryEnhancerFactory.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/QueryEnhancerFactory.java index 0ffcc6b660..c40ab11f66 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/QueryEnhancerFactory.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/QueryEnhancerFactory.java @@ -19,8 +19,8 @@ import org.apache.commons.logging.LogFactory; import org.springframework.core.SpringProperties; import org.springframework.data.jpa.provider.PersistenceProvider; -import org.springframework.lang.Nullable; import org.springframework.util.ClassUtils; +import org.springframework.util.ObjectUtils; import org.springframework.util.StringUtils; /** @@ -39,7 +39,7 @@ public final class QueryEnhancerFactory { static { - NATIVE_QUERY_ENHANCER = NativeQueryEnhancer.select(QueryEnhancerFactory.class.getClassLoader()); + NATIVE_QUERY_ENHANCER = NativeQueryEnhancer.select(); if (PersistenceProvider.ECLIPSELINK.isPresent()) { LOG.info("EclipseLink is in classpath; If applicable, EQL parser will be used."); @@ -81,47 +81,66 @@ public static QueryEnhancer forQuery(DeclaredQuery query) { */ private static QueryEnhancer getNativeQueryEnhancer(DeclaredQuery query) { - if (NATIVE_QUERY_ENHANCER.equals(NativeQueryEnhancer.JSQL)) { + if (NATIVE_QUERY_ENHANCER.equals(NativeQueryEnhancer.JSQLPARSER)) { return new JSqlParserQueryEnhancer(query); } + return new DefaultQueryEnhancer(query); } /** - * Possible choices for the {@link #NATIVE_PARSER_PROPERTY}. Read current selection via {@link #select(ClassLoader)}. + * Possible choices for the {@link #NATIVE_PARSER_PROPERTY}. Resolve the parser through {@link #select()}. + * + * @since 3.3.5 */ enum NativeQueryEnhancer { - AUTO, DEFAULT, JSQL; + AUTO, REGEX, JSQLPARSER; static final String NATIVE_PARSER_PROPERTY = "spring.data.jpa.query.native.parser"; - private static NativeQueryEnhancer from(@Nullable String name) { - if (!StringUtils.hasText(name)) { - return AUTO; - } - return NativeQueryEnhancer.valueOf(name.toUpperCase()); - } + static final boolean JSQLPARSER_PRESENT = ClassUtils.isPresent("net.sf.jsqlparser.parser.JSqlParser", null); /** - * @param classLoader ClassLoader to look up available libraries. - * @return the current selection considering classpath avialability and user selection via + * @return the current selection considering classpath availability and user selection via * {@link #NATIVE_PARSER_PROPERTY}. */ - static NativeQueryEnhancer select(ClassLoader classLoader) { + static NativeQueryEnhancer select() { - if (!ClassUtils.isPresent("net.sf.jsqlparser.parser.JSqlParser", classLoader)) { - return NativeQueryEnhancer.DEFAULT; + NativeQueryEnhancer selected = resolve(); + + if (selected.equals(NativeQueryEnhancer.JSQLPARSER)) { + LOG.info("User choice: Using JSqlParser"); + return NativeQueryEnhancer.JSQLPARSER; + } + + if (selected.equals(NativeQueryEnhancer.REGEX)) { + LOG.info("Using Regex QueryEnhancer"); + return NativeQueryEnhancer.REGEX; } - NativeQueryEnhancer selected = NativeQueryEnhancer.from(SpringProperties.getProperty(NATIVE_PARSER_PROPERTY)); - if (selected.equals(NativeQueryEnhancer.AUTO) || selected.equals(NativeQueryEnhancer.JSQL)) { - LOG.info("JSqlParser is in classpath; If applicable, JSqlParser will be used."); - return NativeQueryEnhancer.JSQL; + if (!JSQLPARSER_PRESENT) { + return NativeQueryEnhancer.REGEX; + } + + LOG.info("JSqlParser is in classpath; If applicable, JSqlParser will be used."); + return NativeQueryEnhancer.JSQLPARSER; + } + + /** + * Resolve {@link NativeQueryEnhancer} from {@link SpringProperties}. + * + * @return the {@link NativeQueryEnhancer} constant. + */ + private static NativeQueryEnhancer resolve() { + + String name = SpringProperties.getProperty(NATIVE_PARSER_PROPERTY); + + if (StringUtils.hasText(name)) { + return ObjectUtils.caseInsensitiveValueOf(NativeQueryEnhancer.values(), name); } - LOG.info("JSqlParser is in classpath but won't be used due to user choice."); - return selected; + return AUTO; } } diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/QueryEnhancerFactoryUnitTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/QueryEnhancerFactoryUnitTests.java index d650277bd6..568ea9b53d 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/QueryEnhancerFactoryUnitTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/QueryEnhancerFactoryUnitTests.java @@ -15,7 +15,7 @@ */ package org.springframework.data.jpa.repository.query; -import static org.assertj.core.api.Assertions.assertThat; +import static org.assertj.core.api.Assertions.*; import java.util.stream.Stream; @@ -23,6 +23,7 @@ import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.Arguments; import org.junit.jupiter.params.provider.MethodSource; + import org.springframework.data.jpa.repository.query.QueryEnhancerFactory.NativeQueryEnhancer; import org.springframework.data.jpa.util.ClassPathExclusions; import org.springframework.lang.Nullable; @@ -33,6 +34,7 @@ * @author Diego Krupitza * @author Greg Turnquist * @author Christoph Strobl + * @author Mark Paluch */ class QueryEnhancerFactoryUnitTests { @@ -66,26 +68,48 @@ void createsJSqlImplementationForNativeQuery() { @MethodSource("nativeEnhancerSelectionArgs") void createsNativeImplementationAccordingToUserChoice(@Nullable String selection, NativeQueryEnhancer enhancer) { + assertThat(NativeQueryEnhancer.JSQLPARSER_PRESENT).isTrue(); + withSystemProperty(NativeQueryEnhancer.NATIVE_PARSER_PROPERTY, selection, () -> { - assertThat(NativeQueryEnhancer.select(this.getClass().getClassLoader())).isEqualTo(enhancer); + assertThat(NativeQueryEnhancer.select()).isEqualTo(enhancer); }); } - @Test // GH-2989 + static Stream nativeEnhancerSelectionArgs() { + return Stream.of(Arguments.of(null, NativeQueryEnhancer.JSQLPARSER), // + Arguments.of("", NativeQueryEnhancer.JSQLPARSER), // + Arguments.of("auto", NativeQueryEnhancer.JSQLPARSER), // + Arguments.of("regex", NativeQueryEnhancer.REGEX), // + Arguments.of("jsqlparser", NativeQueryEnhancer.JSQLPARSER)); + } + + @ParameterizedTest // GH-2989 + @MethodSource("nativeEnhancerExclusionSelectionArgs") @ClassPathExclusions(packages = { "net.sf.jsqlparser.parser" }) - void selectedDefaultImplementationIfJsqlNotAvailable() { + void createsNativeImplementationAccordingWithoutJsqlParserToUserChoice(@Nullable String selection, + NativeQueryEnhancer enhancer) { + + assertThat(NativeQueryEnhancer.JSQLPARSER_PRESENT).isFalse(); - assertThat(assertThat(NativeQueryEnhancer.select(this.getClass().getClassLoader())) - .isEqualTo(NativeQueryEnhancer.DEFAULT)); + withSystemProperty(NativeQueryEnhancer.NATIVE_PARSER_PROPERTY, selection, () -> { + assertThat(NativeQueryEnhancer.select()).isEqualTo(enhancer); + }); + } + + static Stream nativeEnhancerExclusionSelectionArgs() { + return Stream.of(Arguments.of(null, NativeQueryEnhancer.REGEX), // + Arguments.of("", NativeQueryEnhancer.REGEX), // + Arguments.of("auto", NativeQueryEnhancer.REGEX), // + Arguments.of("regex", NativeQueryEnhancer.REGEX), // + Arguments.of("jsqlparser", NativeQueryEnhancer.JSQLPARSER)); } @Test // GH-2989 @ClassPathExclusions(packages = { "net.sf.jsqlparser.parser" }) - void selectedDefaultImplementationIfJsqlNotAvailableEvenIfExplicitlyStated/* or should we raise an error? */() { + void selectedDefaultImplementationIfJsqlNotAvailable() { - withSystemProperty(NativeQueryEnhancer.NATIVE_PARSER_PROPERTY, "jsql", () -> { - assertThat(NativeQueryEnhancer.select(this.getClass().getClassLoader())).isEqualTo(NativeQueryEnhancer.DEFAULT); - }); + assertThat(NativeQueryEnhancer.JSQLPARSER_PRESENT).isFalse(); + assertThat(NativeQueryEnhancer.select()).isEqualTo(NativeQueryEnhancer.REGEX); } void withSystemProperty(String property, @Nullable String value, Runnable exeution) { @@ -108,9 +132,5 @@ void withSystemProperty(String property, @Nullable String value, Runnable exeuti } - static Stream nativeEnhancerSelectionArgs() { - return Stream.of(Arguments.of(null, NativeQueryEnhancer.JSQL), Arguments.of("", NativeQueryEnhancer.JSQL), - Arguments.of("auto", NativeQueryEnhancer.JSQL), Arguments.of("default", NativeQueryEnhancer.DEFAULT), - Arguments.of("jsql", NativeQueryEnhancer.JSQL)); - } + } diff --git a/src/main/antora/modules/ROOT/pages/jpa/query-methods.adoc b/src/main/antora/modules/ROOT/pages/jpa/query-methods.adoc index 1681d2b7d7..980adac923 100644 --- a/src/main/antora/modules/ROOT/pages/jpa/query-methods.adoc +++ b/src/main/antora/modules/ROOT/pages/jpa/query-methods.adoc @@ -306,7 +306,13 @@ public interface UserRepository extends JpaRepository { [TIP] ==== -It is possible to disable usage of `JSqlParser` for parsing natvie queries although it is available in classpath by setting `spring.data.jpa.query.native.parser=default` via the `spring.properties` file or a system property. +It is possible to disable usage of `JSqlParser` for parsing native queries although it is available on the classpath by setting `spring.data.jpa.query.native.parser=regex` via the `spring.properties` file or a system property. + +Valid values are (case-insensitive): + +* `auto` (default, automatic selection) +* `regex` (Use the builtin regex-based Query Enhancer) +* `jsqlparser` (Use JSqlParser) ==== A similar approach also works with named native queries, by adding the `.count` suffix to a copy of your query. You probably need to register a result set mapping for your count query, though. From d6b928e92ebc84a4cccf4a54be27f6c076aff160 Mon Sep 17 00:00:00 2001 From: Mark Paluch Date: Tue, 8 Oct 2024 11:19:00 +0200 Subject: [PATCH 071/157] Consistently run all CI steps with the same user. See #3610 --- Jenkinsfile | 7 ++++--- ci/test.sh | 7 ++----- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 8a62b99f09..c9f171653f 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -168,17 +168,18 @@ pipeline { steps { script { docker.withRegistry(p['docker.proxy.registry'], p['docker.proxy.credentials']) { - docker.image(p['docker.java.main.image']).inside(p['docker.java.inside.basic']) { + docker.image(p['docker.java.main.image']).inside(p['docker.java.inside.docker']) { sh 'MAVEN_OPTS="-Duser.name=' + "${p['jenkins.user.name']}" + ' -Duser.home=/tmp/jenkins-home" ' + "./mvnw -s settings.xml -Pci,artifactory " + + "-Ddevelocity.storage.directory=/tmp/jenkins-home/.develocity-root " + "-Dartifactory.server=${p['artifactory.url']} " + "-Dartifactory.username=${ARTIFACTORY_USR} " + "-Dartifactory.password=${ARTIFACTORY_PSW} " + "-Dartifactory.staging-repository=${p['artifactory.repository.snapshot']} " + "-Dartifactory.build-name=spring-data-jpa " + "-Dartifactory.build-number=spring-data-jpa-${BRANCH_NAME}-build-${BUILD_NUMBER} " + - '-Dmaven.repo.local=/tmp/jenkins-home/.m2/spring-data-jpa-enterprise ' + - '-Dmaven.test.skip=true clean deploy -U -B ' + "-Dmaven.repo.local=/tmp/jenkins-home/.m2/spring-data-jpa " + + "-Dmaven.test.skip=true clean deploy -U -B " } } } diff --git a/ci/test.sh b/ci/test.sh index b22fbc56a5..7be7e11139 100755 --- a/ci/test.sh +++ b/ci/test.sh @@ -4,15 +4,12 @@ set -euo pipefail mkdir -p /tmp/jenkins-home/.m2/spring-data-jpa mkdir -p /tmp/jenkins-home/.m2/.develocity -chown -R 1001:1001 . export JENKINS_USER=${JENKINS_USER_NAME} MAVEN_OPTS="-Duser.name=${JENKINS_USER} -Duser.home=/tmp/jenkins-home" \ ./mvnw -s settings.xml \ - -P${PROFILE} clean dependency:list test -Dsort -U -B -Dmaven.repo.local=/tmp/jenkins-home/.m2/spring-data-jpa + -P${PROFILE} clean dependency:list test -Dsort -U -B -Dmaven.repo.local=/tmp/jenkins-home/.m2/spring-data-jpa -Ddevelocity.storage.directory=/tmp/jenkins-home/.develocity-root MAVEN_OPTS="-Duser.name=${JENKINS_USER} -Duser.home=/tmp/jenkins-home" \ - ./mvnw -s settings.xml clean -Dscan=false -Dmaven.repo.local=/tmp/jenkins-home/.m2/spring-data-jpa - -chown -R 1001:1001 /tmp/jenkins-home/.m2/.develocity + ./mvnw -s settings.xml clean -Dscan=false -Dmaven.repo.local=/tmp/jenkins-home/.m2/spring-data-jpa -Ddevelocity.storage.directory=/tmp/jenkins-home/.develocity-root From d74decc99a3db99b04dc58d82709f56442f27247 Mon Sep 17 00:00:00 2001 From: Christoph Strobl Date: Tue, 8 Oct 2024 13:12:09 +0200 Subject: [PATCH 072/157] Update native query documentation. Closes #3636 Original pull request: #3637 --- .../modules/ROOT/pages/jpa/query-methods.adoc | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/src/main/antora/modules/ROOT/pages/jpa/query-methods.adoc b/src/main/antora/modules/ROOT/pages/jpa/query-methods.adoc index 980adac923..6bc1e7c574 100644 --- a/src/main/antora/modules/ROOT/pages/jpa/query-methods.adoc +++ b/src/main/antora/modules/ROOT/pages/jpa/query-methods.adoc @@ -317,6 +317,26 @@ Valid values are (case-insensitive): A similar approach also works with named native queries, by adding the `.count` suffix to a copy of your query. You probably need to register a result set mapping for your count query, though. +Next to obtaining mapped results, native queries allow you to read the raw `Tuple` from the database by choosing a `Map` container as the method's return type. +The resulting map contains key/value pairs representing the actual database column name and the value. + +.Native query retuning raw column name/value pairs +==== +[source, java] +---- +public interface UserRepository extends JpaRepository { + + @NativeQuery("SELECT * FROM USERS WHERE EMAIL_ADDRESS = ?1") + Map findRawMapByEmail(String emailAddress); <1> + + @NativeQuery("SELECT * FROM USERS WHERE LASTNAME = ?1") + List> findRawMapByLastname(String lastname); <2> +} +---- +<1> Single `Map` result backed by a `Tuple`. +<2> Multiple `Map` results backed by ``Tuple``s. +==== + [[jpa.query-methods.sorting]] == Using Sort From 1b4a6330ee0327748cacf798814f32aa118b2b4a Mon Sep 17 00:00:00 2001 From: Mark Paluch Date: Thu, 17 Oct 2024 15:36:13 +0200 Subject: [PATCH 073/157] Polishing. Mention restrictions. See #3636 Original pull request: #3637 --- .../antora/modules/ROOT/pages/jpa/query-methods.adoc | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/main/antora/modules/ROOT/pages/jpa/query-methods.adoc b/src/main/antora/modules/ROOT/pages/jpa/query-methods.adoc index 6bc1e7c574..097ed6cae6 100644 --- a/src/main/antora/modules/ROOT/pages/jpa/query-methods.adoc +++ b/src/main/antora/modules/ROOT/pages/jpa/query-methods.adoc @@ -324,10 +324,10 @@ The resulting map contains key/value pairs representing the actual database colu ==== [source, java] ---- -public interface UserRepository extends JpaRepository { +interface UserRepository extends JpaRepository { @NativeQuery("SELECT * FROM USERS WHERE EMAIL_ADDRESS = ?1") - Map findRawMapByEmail(String emailAddress); <1> + Map findRawMapByEmail(String emailAddress); <1> @NativeQuery("SELECT * FROM USERS WHERE LASTNAME = ?1") List> findRawMapByLastname(String lastname); <2> @@ -337,6 +337,11 @@ public interface UserRepository extends JpaRepository { <2> Multiple `Map` results backed by ``Tuple``s. ==== +NOTE: String-based Tuple Queries are only supported by Hibernate. +Eclipselink supports only Criteria-based Tuple Queries. + +[[jpa.query-methods.at-query.projections]] + [[jpa.query-methods.sorting]] == Using Sort From d90b4ac754a86e8138e2f88589d002497ef66225 Mon Sep 17 00:00:00 2001 From: Mark Paluch Date: Fri, 18 Oct 2024 11:36:16 +0200 Subject: [PATCH 074/157] Prepare 3.3.5 (2024.0.5). See #3609 --- pom.xml | 20 ++++---------------- 1 file changed, 4 insertions(+), 16 deletions(-) diff --git a/pom.xml b/pom.xml index 8a83a8971a..0f52a25717 100755 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ org.springframework.data.build spring-data-parent - 3.3.5-SNAPSHOT + 3.3.5 @@ -42,7 +42,7 @@ 4.9 8.0.33 42.6.0 - 3.3.5-SNAPSHOT + 3.3.5 0.10.3 org.hibernate @@ -286,20 +286,8 @@ - - spring-snapshot - https://repo.spring.io/snapshot - - true - - - false - - - - spring-milestone - https://repo.spring.io/milestone - + + From 7ff86e1dfc13fbd97a6ef627277b63ca3a84ee7a Mon Sep 17 00:00:00 2001 From: Mark Paluch Date: Fri, 18 Oct 2024 11:36:33 +0200 Subject: [PATCH 075/157] Release version 3.3.5 (2024.0.5). See #3609 --- pom.xml | 2 +- spring-data-envers/pom.xml | 4 ++-- spring-data-jpa-distribution/pom.xml | 2 +- spring-data-jpa/pom.xml | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/pom.xml b/pom.xml index 0f52a25717..abd241be86 100755 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ org.springframework.data spring-data-jpa-parent - 3.3.5-SNAPSHOT + 3.3.5 pom Spring Data JPA Parent diff --git a/spring-data-envers/pom.xml b/spring-data-envers/pom.xml index 9c8cef7578..b8ed4a9854 100755 --- a/spring-data-envers/pom.xml +++ b/spring-data-envers/pom.xml @@ -5,12 +5,12 @@ org.springframework.data spring-data-envers - 3.3.5-SNAPSHOT + 3.3.5 org.springframework.data spring-data-jpa-parent - 3.3.5-SNAPSHOT + 3.3.5 ../pom.xml diff --git a/spring-data-jpa-distribution/pom.xml b/spring-data-jpa-distribution/pom.xml index ed291cbc99..b591b2d166 100644 --- a/spring-data-jpa-distribution/pom.xml +++ b/spring-data-jpa-distribution/pom.xml @@ -14,7 +14,7 @@ org.springframework.data spring-data-jpa-parent - 3.3.5-SNAPSHOT + 3.3.5 ../pom.xml diff --git a/spring-data-jpa/pom.xml b/spring-data-jpa/pom.xml index cc4bd54949..d6025ccb7f 100644 --- a/spring-data-jpa/pom.xml +++ b/spring-data-jpa/pom.xml @@ -6,7 +6,7 @@ org.springframework.data spring-data-jpa - 3.3.5-SNAPSHOT + 3.3.5 Spring Data JPA Spring Data module for JPA repositories. @@ -15,7 +15,7 @@ org.springframework.data spring-data-jpa-parent - 3.3.5-SNAPSHOT + 3.3.5 ../pom.xml From 40e380a5710ad51d528c41dbaf42cd1655782379 Mon Sep 17 00:00:00 2001 From: Mark Paluch Date: Fri, 18 Oct 2024 11:39:04 +0200 Subject: [PATCH 076/157] Prepare next development iteration. See #3609 --- pom.xml | 2 +- spring-data-envers/pom.xml | 4 ++-- spring-data-jpa-distribution/pom.xml | 2 +- spring-data-jpa/pom.xml | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/pom.xml b/pom.xml index abd241be86..a3c041b467 100755 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ org.springframework.data spring-data-jpa-parent - 3.3.5 + 3.3.6-SNAPSHOT pom Spring Data JPA Parent diff --git a/spring-data-envers/pom.xml b/spring-data-envers/pom.xml index b8ed4a9854..7b9b5ca6b1 100755 --- a/spring-data-envers/pom.xml +++ b/spring-data-envers/pom.xml @@ -5,12 +5,12 @@ org.springframework.data spring-data-envers - 3.3.5 + 3.3.6-SNAPSHOT org.springframework.data spring-data-jpa-parent - 3.3.5 + 3.3.6-SNAPSHOT ../pom.xml diff --git a/spring-data-jpa-distribution/pom.xml b/spring-data-jpa-distribution/pom.xml index b591b2d166..22289e68e0 100644 --- a/spring-data-jpa-distribution/pom.xml +++ b/spring-data-jpa-distribution/pom.xml @@ -14,7 +14,7 @@ org.springframework.data spring-data-jpa-parent - 3.3.5 + 3.3.6-SNAPSHOT ../pom.xml diff --git a/spring-data-jpa/pom.xml b/spring-data-jpa/pom.xml index d6025ccb7f..c9ba7c275b 100644 --- a/spring-data-jpa/pom.xml +++ b/spring-data-jpa/pom.xml @@ -6,7 +6,7 @@ org.springframework.data spring-data-jpa - 3.3.5 + 3.3.6-SNAPSHOT Spring Data JPA Spring Data module for JPA repositories. @@ -15,7 +15,7 @@ org.springframework.data spring-data-jpa-parent - 3.3.5 + 3.3.6-SNAPSHOT ../pom.xml From e27241e5aa614ba9c0bec06b743ace99d0079f4c Mon Sep 17 00:00:00 2001 From: Mark Paluch Date: Fri, 18 Oct 2024 11:39:05 +0200 Subject: [PATCH 077/157] After release cleanups. See #3609 --- pom.xml | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/pom.xml b/pom.xml index a3c041b467..0ea21523bb 100755 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ org.springframework.data.build spring-data-parent - 3.3.5 + 3.3.6-SNAPSHOT @@ -42,7 +42,7 @@ 4.9 8.0.33 42.6.0 - 3.3.5 + 3.3.6-SNAPSHOT 0.10.3 org.hibernate @@ -286,8 +286,20 @@ - - + + spring-snapshot + https://repo.spring.io/snapshot + + true + + + false + + + + spring-milestone + https://repo.spring.io/milestone + From 4a029245c905e7f0ce330830500d63f8ce848816 Mon Sep 17 00:00:00 2001 From: Jens Schauder Date: Mon, 21 Oct 2024 14:41:09 +0200 Subject: [PATCH 078/157] Sort revisions by timestamp and revision number. Sorting by revision number alone failed for distributed systems using batched sequences for revision numbers. Closes #3643 See #3579 --- .../envers/repository/support/EnversRevisionRepositoryImpl.java | 1 + 1 file changed, 1 insertion(+) diff --git a/spring-data-envers/src/main/java/org/springframework/data/envers/repository/support/EnversRevisionRepositoryImpl.java b/spring-data-envers/src/main/java/org/springframework/data/envers/repository/support/EnversRevisionRepositoryImpl.java index 4c87a24621..2f3e29861f 100755 --- a/spring-data-envers/src/main/java/org/springframework/data/envers/repository/support/EnversRevisionRepositoryImpl.java +++ b/spring-data-envers/src/main/java/org/springframework/data/envers/repository/support/EnversRevisionRepositoryImpl.java @@ -93,6 +93,7 @@ public EnversRevisionRepositoryImpl(JpaEntityInformation entityInformation public Optional> findLastChangeRevision(ID id) { List singleResult = createBaseQuery(id) // + .addOrder(AuditEntity.revisionProperty("timestamp").desc()) // .addOrder(AuditEntity.revisionNumber().desc()) // .setMaxResults(1) // .getResultList(); From 455d68d5a243e27238dc96e656ea063a2c486006 Mon Sep 17 00:00:00 2001 From: Mark Paluch Date: Mon, 21 Oct 2024 14:36:01 +0200 Subject: [PATCH 079/157] Polishing. Refine stored procedure documentation. See #1759 --- src/main/antora/modules/ROOT/pages/jpa/stored-procedures.adoc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/antora/modules/ROOT/pages/jpa/stored-procedures.adoc b/src/main/antora/modules/ROOT/pages/jpa/stored-procedures.adoc index 8985be4515..7eae20f798 100644 --- a/src/main/antora/modules/ROOT/pages/jpa/stored-procedures.adoc +++ b/src/main/antora/modules/ROOT/pages/jpa/stored-procedures.adoc @@ -69,7 +69,7 @@ Integer callPlus1InOut(Integer arg); ---- ==== -The following is again equivalent to the previous two but using the method name instead of an explicite annotation attribute. +The following is again equivalent to the previous two but using the method name instead of an explicit annotation attribute. .Referencing implicitly mapped named stored procedure "User.plus1" in `EntityManager` by using the method name. ==== @@ -94,4 +94,4 @@ Integer entityAnnotatedCustomNamedProcedurePlus1IO(@Param("arg") Integer arg); If the stored procedure getting called has a single out parameter that parameter may be returned as the return value of the method. If there are multiple out parameters specified in a `@NamedStoredProcedureQuery` annotation those can be returned as a `Map` with the key being the parameter name given in the `@NamedStoredProcedureQuery` annotation. - +NOTE: Note that if the stored procedure returns a `ResultSet` then any `OUT` parameters are omitted as Java can only return a single method return value. From b4b41eb1bfe39d9b7e46df755e8cf09af2fbdc64 Mon Sep 17 00:00:00 2001 From: Mark Paluch Date: Mon, 21 Oct 2024 14:50:12 +0200 Subject: [PATCH 080/157] Fix named procedure return value retrieval for named procedures. We assume that if a stored procedure is named (associated with the Persitence Context) that we can access its out values by name. Closes #1759 --- .../query/StoredProcedureJpaQuery.java | 20 ++++++++++++------- ...stgresStoredProcedureIntegrationTests.java | 9 ++++++++- 2 files changed, 21 insertions(+), 8 deletions(-) diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/StoredProcedureJpaQuery.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/StoredProcedureJpaQuery.java index e9353b83ed..54d6b0b24a 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/StoredProcedureJpaQuery.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/StoredProcedureJpaQuery.java @@ -15,16 +15,16 @@ */ package org.springframework.data.jpa.repository.query; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - import jakarta.persistence.EntityManager; import jakarta.persistence.NamedStoredProcedureQuery; import jakarta.persistence.ParameterMode; import jakarta.persistence.StoredProcedureQuery; import jakarta.persistence.TypedQuery; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + import org.springframework.data.jpa.repository.query.JpaParameters.JpaParameter; import org.springframework.data.repository.query.Parameter; import org.springframework.data.repository.query.QueryMethod; @@ -138,11 +138,17 @@ Object extractOutputValue(StoredProcedureQuery storedProcedureQuery) { * @return The value of an output parameter either by name or by index. */ private Object extractOutputParameterValue(ProcedureParameter outputParameter, - StoredProcedureQuery storedProcedureQuery) { + StoredProcedureQuery query) { + + if (procedureAttributes.isNamedStoredProcedure() && StringUtils.hasText(outputParameter.getName())) { + + return StringUtils.hasText(outputParameter.getName()) ? query.getOutputParameterValue(outputParameter.getName()) + : query.getOutputParameterValue(outputParameter.getPosition()); + } return useNamedParameters && StringUtils.hasText(outputParameter.getName()) - ? storedProcedureQuery.getOutputParameterValue(outputParameter.getName()) - : storedProcedureQuery.getOutputParameterValue(outputParameter.getPosition()); + ? query.getOutputParameterValue(outputParameter.getName()) + : query.getOutputParameterValue(outputParameter.getPosition()); } /** diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/procedures/PostgresStoredProcedureIntegrationTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/procedures/PostgresStoredProcedureIntegrationTests.java index 1be3894a9e..02e52f9d1b 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/procedures/PostgresStoredProcedureIntegrationTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/procedures/PostgresStoredProcedureIntegrationTests.java @@ -16,7 +16,7 @@ package org.springframework.data.jpa.repository.procedures; -import static org.assertj.core.api.Assertions.assertThat; +import static org.assertj.core.api.Assertions.*; import jakarta.persistence.Entity; import jakarta.persistence.EntityManagerFactory; @@ -38,6 +38,7 @@ import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; import org.postgresql.ds.PGSimpleDataSource; + import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.ComponentScan.Filter; @@ -58,6 +59,7 @@ import org.springframework.transaction.PlatformTransactionManager; import org.springframework.transaction.annotation.EnableTransactionManagement; import org.springframework.transaction.annotation.Transactional; + import org.testcontainers.containers.PostgreSQLContainer; /** @@ -165,6 +167,11 @@ void testPositionalInOutParameter() { procedureName = "get_employees", // parameters = { @StoredProcedureParameter(mode = ParameterMode.REF_CURSOR, type = void.class) }, // resultClasses = Employee.class) + + @NamedStoredProcedureQuery( // + name = "Employee.noResultSet", // + procedureName = "get_employees_count", // + parameters = { @StoredProcedureParameter(mode = ParameterMode.OUT, name = "results", type = Integer.class) }) @NamedStoredProcedureQuery( // name = "positional_inout", // procedureName = "positional_inout_parameter_issue3460", // From a7bbd125f38ef5d09bbc850acfb0de7b88bff2cb Mon Sep 17 00:00:00 2001 From: Mark Paluch Date: Mon, 21 Oct 2024 14:58:43 +0200 Subject: [PATCH 081/157] Polishing. Refactor Testcontainers config infrastructure. See #2381 --- .../MySqlStoredProcedureIntegrationTests.java | 67 ++----------- ...stgresStoredProcedureIntegrationTests.java | 64 +----------- ...ProcedureNullHandlingIntegrationTests.java | 71 ++------------ .../StoredProcedureConfigSupport.java | 98 +++++++++++++++++++ 4 files changed, 118 insertions(+), 182 deletions(-) create mode 100644 spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/procedures/StoredProcedureConfigSupport.java diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/procedures/MySqlStoredProcedureIntegrationTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/procedures/MySqlStoredProcedureIntegrationTests.java index ec37517f2a..b248e809f6 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/procedures/MySqlStoredProcedureIntegrationTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/procedures/MySqlStoredProcedureIntegrationTests.java @@ -19,20 +19,17 @@ import static org.assertj.core.api.Assertions.*; import jakarta.persistence.Entity; -import jakarta.persistence.EntityManagerFactory; import jakarta.persistence.GeneratedValue; import jakarta.persistence.Id; import jakarta.persistence.NamedStoredProcedureQuery; import java.util.List; import java.util.Objects; -import java.util.Properties; - -import javax.sql.DataSource; import org.hibernate.dialect.MySQLDialect; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; + import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.ComponentScan.Filter; @@ -41,20 +38,12 @@ import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.jpa.repository.config.EnableJpaRepositories; import org.springframework.data.jpa.repository.query.Procedure; -import org.springframework.jdbc.datasource.init.DataSourceInitializer; -import org.springframework.jdbc.datasource.init.ResourceDatabasePopulator; -import org.springframework.orm.jpa.AbstractEntityManagerFactoryBean; -import org.springframework.orm.jpa.JpaTransactionManager; -import org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean; -import org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit.jupiter.SpringExtension; -import org.springframework.transaction.PlatformTransactionManager; import org.springframework.transaction.annotation.EnableTransactionManagement; import org.springframework.transaction.annotation.Transactional; -import org.testcontainers.containers.MySQLContainer; -import com.mysql.cj.jdbc.MysqlDataSource; +import org.testcontainers.containers.MySQLContainer; /** * Testcase to verify {@link org.springframework.jdbc.object.StoredProcedure}s work with MySQL. @@ -234,7 +223,11 @@ public interface EmployeeRepositoryWithNoCursor extends JpaRepository container() { .withPassword("test") // .withConfigurationOverride(""); } - - @Bean - public DataSource dataSource(MySQLContainer container) { - - MysqlDataSource dataSource = new MysqlDataSource(); - dataSource.setUrl(container.getJdbcUrl()); - dataSource.setUser(container.getUsername()); - dataSource.setPassword(container.getPassword()); - return dataSource; - } - - @Bean - public AbstractEntityManagerFactoryBean entityManagerFactory(DataSource dataSource) { - - LocalContainerEntityManagerFactoryBean factoryBean = new LocalContainerEntityManagerFactoryBean(); - factoryBean.setDataSource(dataSource); - factoryBean.setPersistenceUnitRootLocation("simple-persistence"); - factoryBean.setJpaVendorAdapter(new HibernateJpaVendorAdapter()); - factoryBean.setPackagesToScan(this.getClass().getPackage().getName()); - - Properties properties = new Properties(); - properties.setProperty("hibernate.hbm2ddl.auto", "create"); - properties.setProperty("hibernate.dialect", MySQLDialect.class.getCanonicalName()); - factoryBean.setJpaProperties(properties); - - return factoryBean; - } - - @Bean - PlatformTransactionManager transactionManager(EntityManagerFactory entityManagerFactory) { - return new JpaTransactionManager(entityManagerFactory); - } - - @Bean - DataSourceInitializer initializer(DataSource dataSource) { - - DataSourceInitializer initializer = new DataSourceInitializer(); - initializer.setDataSource(dataSource); - - ClassPathResource script = new ClassPathResource("scripts/mysql-stored-procedures.sql"); - ResourceDatabasePopulator populator = new ResourceDatabasePopulator(script); - populator.setSeparator(";;"); - initializer.setDatabasePopulator(populator); - - return initializer; - } } } diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/procedures/PostgresStoredProcedureIntegrationTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/procedures/PostgresStoredProcedureIntegrationTests.java index 02e52f9d1b..47bcccd99d 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/procedures/PostgresStoredProcedureIntegrationTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/procedures/PostgresStoredProcedureIntegrationTests.java @@ -19,7 +19,6 @@ import static org.assertj.core.api.Assertions.*; import jakarta.persistence.Entity; -import jakarta.persistence.EntityManagerFactory; import jakarta.persistence.GeneratedValue; import jakarta.persistence.Id; import jakarta.persistence.NamedStoredProcedureQuery; @@ -30,14 +29,10 @@ import java.util.List; import java.util.Map; import java.util.Objects; -import java.util.Properties; - -import javax.sql.DataSource; import org.hibernate.dialect.PostgreSQLDialect; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; -import org.postgresql.ds.PGSimpleDataSource; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.annotation.Bean; @@ -48,15 +43,8 @@ import org.springframework.data.jpa.repository.config.EnableJpaRepositories; import org.springframework.data.jpa.repository.query.Procedure; import org.springframework.data.jpa.util.DisabledOnHibernate62; -import org.springframework.jdbc.datasource.init.DataSourceInitializer; -import org.springframework.jdbc.datasource.init.ResourceDatabasePopulator; -import org.springframework.orm.jpa.AbstractEntityManagerFactoryBean; -import org.springframework.orm.jpa.JpaTransactionManager; -import org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean; -import org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit.jupiter.SpringExtension; -import org.springframework.transaction.PlatformTransactionManager; import org.springframework.transaction.annotation.EnableTransactionManagement; import org.springframework.transaction.annotation.Transactional; @@ -265,7 +253,11 @@ public interface EmployeeRepositoryWithRefCursor extends JpaRepository container() { return new PostgreSQLContainer<>("postgres:15.3") // .withUsername("postgres"); } - - @Bean - public DataSource dataSource(PostgreSQLContainer container) { - - PGSimpleDataSource dataSource = new PGSimpleDataSource(); - dataSource.setUrl(container.getJdbcUrl()); - dataSource.setUser(container.getUsername()); - dataSource.setPassword(container.getPassword()); - return dataSource; - } - - @Bean - public AbstractEntityManagerFactoryBean entityManagerFactory(DataSource dataSource) { - - LocalContainerEntityManagerFactoryBean factoryBean = new LocalContainerEntityManagerFactoryBean(); - factoryBean.setDataSource(dataSource); - factoryBean.setPersistenceUnitRootLocation("simple-persistence"); - factoryBean.setJpaVendorAdapter(new HibernateJpaVendorAdapter()); - factoryBean.setPackagesToScan(this.getClass().getPackage().getName()); - - Properties properties = new Properties(); - properties.setProperty("hibernate.hbm2ddl.auto", "create"); - properties.setProperty("hibernate.dialect", PostgreSQLDialect.class.getCanonicalName()); - factoryBean.setJpaProperties(properties); - - return factoryBean; - } - - @Bean - PlatformTransactionManager transactionManager(EntityManagerFactory entityManagerFactory) { - return new JpaTransactionManager(entityManagerFactory); - } - - @Bean - DataSourceInitializer initializer(DataSource dataSource) { - - DataSourceInitializer initializer = new DataSourceInitializer(); - initializer.setDataSource(dataSource); - - ClassPathResource script = new ClassPathResource("scripts/postgres-stored-procedures.sql"); - ResourceDatabasePopulator populator = new ResourceDatabasePopulator(script); - populator.setSeparator(";;"); - initializer.setDatabasePopulator(populator); - - return initializer; - } } } diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/procedures/PostgresStoredProcedureNullHandlingIntegrationTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/procedures/PostgresStoredProcedureNullHandlingIntegrationTests.java index 565779574a..d6c7a1dab3 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/procedures/PostgresStoredProcedureNullHandlingIntegrationTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/procedures/PostgresStoredProcedureNullHandlingIntegrationTests.java @@ -16,21 +16,17 @@ package org.springframework.data.jpa.repository.procedures; import jakarta.persistence.Entity; -import jakarta.persistence.EntityManagerFactory; import jakarta.persistence.GeneratedValue; import jakarta.persistence.GenerationType; import jakarta.persistence.Id; import java.util.Date; -import java.util.Properties; import java.util.UUID; -import javax.sql.DataSource; - import org.hibernate.dialect.PostgreSQLDialect; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; -import org.postgresql.ds.PGSimpleDataSource; + import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.ComponentScan; @@ -41,17 +37,11 @@ import org.springframework.data.jpa.repository.config.EnableJpaRepositories; import org.springframework.data.jpa.repository.query.Procedure; import org.springframework.data.jpa.util.DisabledOnHibernate61; -import org.springframework.jdbc.datasource.init.DataSourceInitializer; -import org.springframework.jdbc.datasource.init.ResourceDatabasePopulator; -import org.springframework.orm.jpa.AbstractEntityManagerFactoryBean; -import org.springframework.orm.jpa.JpaTransactionManager; -import org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean; -import org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit.jupiter.SpringExtension; -import org.springframework.transaction.PlatformTransactionManager; import org.springframework.transaction.annotation.EnableTransactionManagement; import org.springframework.transaction.annotation.Transactional; + import org.testcontainers.containers.PostgreSQLContainer; /** @@ -138,63 +128,18 @@ public interface TestModelRepository extends JpaRepository { @EnableJpaRepositories(considerNestedRepositories = true, includeFilters = @ComponentScan.Filter(type = FilterType.ASSIGNABLE_TYPE, classes = TestModelRepository.class)) @EnableTransactionManagement - static class Config { + static class Config extends StoredProcedureConfigSupport { + public Config() { + super(PostgreSQLDialect.class, new ClassPathResource("scripts/postgres-nullable-stored-procedures.sql")); + } + + @SuppressWarnings("resource") @Bean(initMethod = "start", destroyMethod = "stop") public PostgreSQLContainer container() { return new PostgreSQLContainer<>("postgres:15.3") // .withUsername("postgres"); } - - @Bean - public DataSource dataSource(PostgreSQLContainer container) { - - PGSimpleDataSource dataSource = new PGSimpleDataSource(); - dataSource.setUrl(container.getJdbcUrl()); - dataSource.setUser(container.getUsername()); - dataSource.setPassword(container.getPassword()); - - return dataSource; - } - - @Bean - public AbstractEntityManagerFactoryBean entityManagerFactory(DataSource dataSource) { - - LocalContainerEntityManagerFactoryBean factoryBean = new LocalContainerEntityManagerFactoryBean(); - factoryBean.setDataSource(dataSource); - factoryBean.setPersistenceUnitRootLocation("simple-persistence"); - factoryBean.setJpaVendorAdapter(new HibernateJpaVendorAdapter()); - factoryBean.setPackagesToScan(this.getClass().getPackage().getName()); - - Properties properties = new Properties(); - properties.setProperty("hibernate.hbm2ddl.auto", "create"); - properties.setProperty("hibernate.dialect", PostgreSQLDialect.class.getCanonicalName()); - properties.setProperty("hibernate.proc.param_null_passing", "true"); - properties.setProperty("hibernate.globally_quoted_identifiers", "true"); - properties.setProperty("hibernate.globally_quoted_identifiers_skip_column_definitions", "true"); - factoryBean.setJpaProperties(properties); - - return factoryBean; - } - - @Bean - PlatformTransactionManager transactionManager(EntityManagerFactory entityManagerFactory) { - return new JpaTransactionManager(entityManagerFactory); - } - - @Bean - DataSourceInitializer initializer(DataSource dataSource) { - - DataSourceInitializer initializer = new DataSourceInitializer(); - initializer.setDataSource(dataSource); - - ClassPathResource script = new ClassPathResource("scripts/postgres-nullable-stored-procedures.sql"); - ResourceDatabasePopulator populator = new ResourceDatabasePopulator(script); - populator.setSeparator(";;"); - initializer.setDatabasePopulator(populator); - - return initializer; - } } } diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/procedures/StoredProcedureConfigSupport.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/procedures/StoredProcedureConfigSupport.java new file mode 100644 index 0000000000..0b8ef1f9cd --- /dev/null +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/procedures/StoredProcedureConfigSupport.java @@ -0,0 +1,98 @@ +/* + * Copyright 2024 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.springframework.data.jpa.repository.procedures; + +import jakarta.persistence.EntityManagerFactory; + +import java.util.Properties; + +import javax.sql.DataSource; + +import org.springframework.context.annotation.Bean; +import org.springframework.core.io.Resource; +import org.springframework.jdbc.datasource.DriverManagerDataSource; +import org.springframework.jdbc.datasource.init.DataSourceInitializer; +import org.springframework.jdbc.datasource.init.ResourceDatabasePopulator; +import org.springframework.orm.jpa.AbstractEntityManagerFactoryBean; +import org.springframework.orm.jpa.JpaTransactionManager; +import org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean; +import org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter; +import org.springframework.transaction.PlatformTransactionManager; + +import org.testcontainers.containers.JdbcDatabaseContainer; + +/** + * Support class for integration testing with Testcontainers + * + * @author Mark Paluch + */ +class StoredProcedureConfigSupport { + + private final Class dialect; + private final Resource initScript; + + StoredProcedureConfigSupport(Class dialect, Resource initScript) { + this.dialect = dialect; + this.initScript = initScript; + } + + @Bean + DataSource dataSource(JdbcDatabaseContainer container) { + + DriverManagerDataSource dataSource = new DriverManagerDataSource(); + dataSource.setUrl(container.getJdbcUrl()); + dataSource.setUsername(container.getUsername()); + dataSource.setPassword(container.getPassword()); + + return dataSource; + } + + @Bean + AbstractEntityManagerFactoryBean entityManagerFactory(DataSource dataSource) { + + LocalContainerEntityManagerFactoryBean factoryBean = new LocalContainerEntityManagerFactoryBean(); + factoryBean.setDataSource(dataSource); + factoryBean.setPersistenceUnitRootLocation("simple-persistence"); + factoryBean.setJpaVendorAdapter(new HibernateJpaVendorAdapter()); + factoryBean.setPackagesToScan(this.getClass().getPackage().getName()); + + Properties properties = new Properties(); + properties.setProperty("hibernate.hbm2ddl.auto", "create"); + properties.setProperty("hibernate.dialect", dialect.getCanonicalName()); + factoryBean.setJpaProperties(properties); + + return factoryBean; + } + + @Bean + PlatformTransactionManager transactionManager(EntityManagerFactory entityManagerFactory) { + return new JpaTransactionManager(entityManagerFactory); + } + + @Bean + DataSourceInitializer initializer(DataSource dataSource) { + + DataSourceInitializer initializer = new DataSourceInitializer(); + initializer.setDataSource(dataSource); + + ResourceDatabasePopulator populator = new ResourceDatabasePopulator(initScript); + populator.setSeparator(";;"); + initializer.setDatabasePopulator(populator); + + return initializer; + } + +} From cea33d5b421e9601f899290d7088d8557e2a87a8 Mon Sep 17 00:00:00 2001 From: Mark Paluch Date: Mon, 21 Oct 2024 15:27:49 +0200 Subject: [PATCH 082/157] Fix retrieval of multiple OUT parameters from a stored procedure returning also a `ResultSet`. Closes #2381 --- .../repository/query/JpaQueryExecution.java | 6 ++++- .../query/StoredProcedureAttributes.java | 14 +++++++--- ...stgresStoredProcedureIntegrationTests.java | 22 +++++++++++++++- .../scripts/postgres-stored-procedures.sql | 15 ++++++++++- .../ROOT/pages/jpa/stored-procedures.adoc | 26 ++++++++++++++++++- 5 files changed, 75 insertions(+), 8 deletions(-) diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/JpaQueryExecution.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/JpaQueryExecution.java index 59f161293d..82482cd99c 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/JpaQueryExecution.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/JpaQueryExecution.java @@ -23,6 +23,7 @@ import java.lang.reflect.Method; import java.util.Collection; import java.util.List; +import java.util.Map; import java.util.Optional; import org.springframework.core.convert.ConversionService; @@ -339,6 +340,7 @@ protected Object doExecute(AbstractJpaQuery jpaQuery, JpaParametersParameterAcce StoredProcedureJpaQuery query = (StoredProcedureJpaQuery) jpaQuery; StoredProcedureQuery procedure = query.createQuery(accessor); + Class returnType = query.getQueryMethod().getReturnType(); try { @@ -350,7 +352,9 @@ protected Object doExecute(AbstractJpaQuery jpaQuery, JpaParametersParameterAcce throw new InvalidDataAccessApiUsageException(NO_SURROUNDING_TRANSACTION); } - return collectionQuery ? procedure.getResultList() : procedure.getSingleResult(); + if (!Map.class.isAssignableFrom(returnType)) { + return collectionQuery ? procedure.getResultList() : procedure.getSingleResult(); + } } return query.extractOutputValue(procedure); diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/StoredProcedureAttributes.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/StoredProcedureAttributes.java index a489b490c2..2acc5f83c1 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/StoredProcedureAttributes.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/StoredProcedureAttributes.java @@ -15,14 +15,15 @@ */ package org.springframework.data.jpa.repository.query; +import jakarta.persistence.StoredProcedureQuery; + import java.util.Collections; import java.util.List; import java.util.stream.Collectors; import java.util.stream.IntStream; -import jakarta.persistence.StoredProcedureQuery; - import org.springframework.util.Assert; +import org.springframework.util.ClassUtils; import org.springframework.util.StringUtils; /** @@ -138,7 +139,12 @@ public boolean hasReturnValue() { if (getOutputProcedureParameters().isEmpty()) return false; - Class outputType = getOutputProcedureParameters().get(0).getType(); - return !(void.class.equals(outputType) || Void.class.equals(outputType)); + for (ProcedureParameter parameter : getOutputProcedureParameters()) { + if (!ClassUtils.isVoidType(parameter.getType())) { + return true; + } + } + + return false; } } diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/procedures/PostgresStoredProcedureIntegrationTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/procedures/PostgresStoredProcedureIntegrationTests.java index 47bcccd99d..d10a3b83d1 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/procedures/PostgresStoredProcedureIntegrationTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/procedures/PostgresStoredProcedureIntegrationTests.java @@ -57,6 +57,7 @@ * @author Greg Turnquist * @author Yanming Zhou * @author Thorben Janssen + * @author Mark Paluch */ @Transactional @ExtendWith(SpringExtension.class) @@ -140,7 +141,7 @@ void testEntityListFromNamedProcedure() { new Employee(4, "Gabriel")); } - @Test // 3460 + @Test // GH-3460 void testPositionalInOutParameter() { Map results = repository.positionalInOut(1, 2); @@ -149,6 +150,15 @@ void testPositionalInOutParameter() { assertThat(results.get("3")).isEqualTo(3); } + @Test // GH-3460 + void supportsMultipleOutParameters() { + + Map results = repository.multiple_out(5); + + assertThat(results).containsEntry("result1", 5).containsEntry("result2", 10); + assertThat(results).containsKey("some_cursor"); + } + @Entity @NamedStoredProcedureQuery( // name = "get_employees_postgres", // @@ -160,6 +170,13 @@ void testPositionalInOutParameter() { name = "Employee.noResultSet", // procedureName = "get_employees_count", // parameters = { @StoredProcedureParameter(mode = ParameterMode.OUT, name = "results", type = Integer.class) }) + @NamedStoredProcedureQuery( // + name = "Employee.multiple_out", // + procedureName = "multiple_out", // + parameters = { @StoredProcedureParameter(mode = ParameterMode.IN, name = "someNumber", type = Integer.class), + @StoredProcedureParameter(mode = ParameterMode.REF_CURSOR, name = "some_cursor", type = void.class), + @StoredProcedureParameter(mode = ParameterMode.OUT, name = "result1", type = Integer.class), + @StoredProcedureParameter(mode = ParameterMode.OUT, name = "result2", type = Integer.class) }) @NamedStoredProcedureQuery( // name = "positional_inout", // procedureName = "positional_inout_parameter_issue3460", // @@ -243,6 +260,9 @@ public interface EmployeeRepositoryWithRefCursor extends JpaRepository multiple_out(int someNumber); + @Procedure(name = "get_employees_postgres", refCursor = true) List entityListFromNamedProcedure(); diff --git a/spring-data-jpa/src/test/resources/scripts/postgres-stored-procedures.sql b/spring-data-jpa/src/test/resources/scripts/postgres-stored-procedures.sql index ceafa45f00..cb08f096ce 100644 --- a/spring-data-jpa/src/test/resources/scripts/postgres-stored-procedures.sql +++ b/spring-data-jpa/src/test/resources/scripts/postgres-stored-procedures.sql @@ -51,4 +51,17 @@ $BODY$ BEGIN outParam = 3; END; -$BODY$;; \ No newline at end of file +$BODY$;; + +CREATE OR REPLACE PROCEDURE multiple_out(IN someNumber integer, OUT some_cursor REFCURSOR, + OUT result1 integer, OUT result2 integer) + LANGUAGE 'plpgsql' +AS +$BODY$ +BEGIN + result1 = 1 * someNumber; + result2 = 2 * someNumber; + + OPEN some_cursor FOR SELECT COUNT(*) FROM employee; +END; +$BODY$;; diff --git a/src/main/antora/modules/ROOT/pages/jpa/stored-procedures.adoc b/src/main/antora/modules/ROOT/pages/jpa/stored-procedures.adoc index 7eae20f798..a285153d78 100644 --- a/src/main/antora/modules/ROOT/pages/jpa/stored-procedures.adoc +++ b/src/main/antora/modules/ROOT/pages/jpa/stored-procedures.adoc @@ -94,4 +94,28 @@ Integer entityAnnotatedCustomNamedProcedurePlus1IO(@Param("arg") Integer arg); If the stored procedure getting called has a single out parameter that parameter may be returned as the return value of the method. If there are multiple out parameters specified in a `@NamedStoredProcedureQuery` annotation those can be returned as a `Map` with the key being the parameter name given in the `@NamedStoredProcedureQuery` annotation. -NOTE: Note that if the stored procedure returns a `ResultSet` then any `OUT` parameters are omitted as Java can only return a single method return value. +NOTE: Note that if the stored procedure returns a `ResultSet` then any `OUT` parameters are omitted as Java can only return a single method return value unless the method declares a `Map` return type. + +The following example shows how to obtain multiple `OUT` parameters if the stored procedure has multiple `OUT` parameters and is registered as `@NamedStoredProcedureQuery`. `@NamedStoredProcedureQuery` registration is required to provide parameter metadata. + +.StoredProcedure metadata definitions on an entity. +==== +[source,java] +---- +@Entity +@NamedStoredProcedureQuery(name = "User.multiple_out_parameters", procedureName = "multiple_out_parameters", parameters = { + @StoredProcedureParameter(mode = ParameterMode.IN, name = "arg", type = Integer.class), + @StoredProcedureParameter(mode = ParameterMode.REF_CURSOR, name = "some_cursor", type = void.class), + @StoredProcedureParameter(mode = ParameterMode.OUT, name = "res", type = Integer.class) }) +public class User {} +---- +==== + +.Returning multiple OUT parameters +==== +[source,java] +---- +@Procedure(name = "User.multiple_out_parameters") +Map returnsMultipleOutParameters(@Param("arg") Integer arg); +---- +==== From eacdff8f6be15cfae2166f582f86013d7ca1b486 Mon Sep 17 00:00:00 2001 From: Mark Paluch Date: Tue, 22 Oct 2024 08:50:15 +0200 Subject: [PATCH 083/157] Add test for stored procedures accepting array types. Closes #3081 --- .../PostgresStoredProcedureIntegrationTests.java | 16 ++++++++++++++++ .../scripts/postgres-stored-procedures.sql | 10 ++++++++++ 2 files changed, 26 insertions(+) diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/procedures/PostgresStoredProcedureIntegrationTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/procedures/PostgresStoredProcedureIntegrationTests.java index d10a3b83d1..eaf489fdc6 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/procedures/PostgresStoredProcedureIntegrationTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/procedures/PostgresStoredProcedureIntegrationTests.java @@ -159,6 +159,14 @@ void supportsMultipleOutParameters() { assertThat(results).containsKey("some_cursor"); } + @Test // GH-3081 + void supportsArrayTypes() { + + String result = repository.accept_array(new String[] { "one", "two" }); + + assertThat(result).isEqualTo("[1:2]"); + } + @Entity @NamedStoredProcedureQuery( // name = "get_employees_postgres", // @@ -177,6 +185,11 @@ void supportsMultipleOutParameters() { @StoredProcedureParameter(mode = ParameterMode.REF_CURSOR, name = "some_cursor", type = void.class), @StoredProcedureParameter(mode = ParameterMode.OUT, name = "result1", type = Integer.class), @StoredProcedureParameter(mode = ParameterMode.OUT, name = "result2", type = Integer.class) }) + @NamedStoredProcedureQuery( // + name = "Employee.accept_array", // + procedureName = "accept_array", // + parameters = { @StoredProcedureParameter(mode = ParameterMode.IN, name = "some_chars", type = String[].class), + @StoredProcedureParameter(mode = ParameterMode.OUT, name = "dims", type = String.class) }) @NamedStoredProcedureQuery( // name = "positional_inout", // procedureName = "positional_inout_parameter_issue3460", // @@ -260,6 +273,9 @@ public interface EmployeeRepositoryWithRefCursor extends JpaRepository multiple_out(int someNumber); diff --git a/spring-data-jpa/src/test/resources/scripts/postgres-stored-procedures.sql b/spring-data-jpa/src/test/resources/scripts/postgres-stored-procedures.sql index cb08f096ce..2f5d9a7fe7 100644 --- a/spring-data-jpa/src/test/resources/scripts/postgres-stored-procedures.sql +++ b/spring-data-jpa/src/test/resources/scripts/postgres-stored-procedures.sql @@ -65,3 +65,13 @@ BEGIN OPEN some_cursor FOR SELECT COUNT(*) FROM employee; END; $BODY$;; + +CREATE OR REPLACE PROCEDURE accept_array(IN some_chars VARCHAR(255)[], + OUT dims VARCHAR(255)) + LANGUAGE 'plpgsql' +AS +$BODY$ +BEGIN + dims = array_dims(some_chars); +END; +$BODY$;; From 3ad78aba4fa82ae49107922ab83c91c112a9f6d1 Mon Sep 17 00:00:00 2001 From: Mark Paluch Date: Tue, 22 Oct 2024 10:25:49 +0200 Subject: [PATCH 084/157] Polishing. Refactor DisabledOnHibernate61/62 annotation to DisabledOnHibernate with a version string. --- .../data/jpa/AntlrVersionTests.java | 5 +- ...stgresStoredProcedureIntegrationTests.java | 6 +- ...ProcedureNullHandlingIntegrationTests.java | 4 +- ...odelEntityInformationIntegrationTests.java | 9 +- .../jpa/util/BooleanExecutionCondition.java | 58 ++++++++++ ...ernate61.java => DisabledOnHibernate.java} | 25 ++++- .../data/jpa/util/DisabledOnHibernate62.java | 36 ------- .../util/DisabledOnHibernateCondition.java | 100 ++++++++++++++++++ .../DisabledOnHibernateConditionTests.java | 56 ++++++++++ .../data/jpa/util/HibernateSupport.java | 62 ----------- 10 files changed, 249 insertions(+), 112 deletions(-) create mode 100644 spring-data-jpa/src/test/java/org/springframework/data/jpa/util/BooleanExecutionCondition.java rename spring-data-jpa/src/test/java/org/springframework/data/jpa/util/{DisabledOnHibernate61.java => DisabledOnHibernate.java} (50%) delete mode 100644 spring-data-jpa/src/test/java/org/springframework/data/jpa/util/DisabledOnHibernate62.java create mode 100644 spring-data-jpa/src/test/java/org/springframework/data/jpa/util/DisabledOnHibernateCondition.java create mode 100644 spring-data-jpa/src/test/java/org/springframework/data/jpa/util/DisabledOnHibernateConditionTests.java delete mode 100644 spring-data-jpa/src/test/java/org/springframework/data/jpa/util/HibernateSupport.java diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/AntlrVersionTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/AntlrVersionTests.java index bc3c34dd34..c694587167 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/AntlrVersionTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/AntlrVersionTests.java @@ -23,11 +23,12 @@ import org.antlr.v4.runtime.RuntimeMetaData; import org.hibernate.grammars.hql.HqlParser; import org.junit.jupiter.api.Test; + import org.springframework.asm.ClassReader; import org.springframework.asm.ClassVisitor; import org.springframework.asm.MethodVisitor; import org.springframework.asm.Opcodes; -import org.springframework.data.jpa.util.DisabledOnHibernate62; +import org.springframework.data.jpa.util.DisabledOnHibernate; import org.springframework.lang.Nullable; /** @@ -41,7 +42,7 @@ class AntlrVersionTests { @Test - @DisabledOnHibernate62 + @DisabledOnHibernate("6.2") void antlrVersionConvergence() throws Exception { ClassReader reader = new ClassReader(HqlParser.class.getName()); diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/procedures/PostgresStoredProcedureIntegrationTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/procedures/PostgresStoredProcedureIntegrationTests.java index eaf489fdc6..b3c76d25b1 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/procedures/PostgresStoredProcedureIntegrationTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/procedures/PostgresStoredProcedureIntegrationTests.java @@ -42,7 +42,7 @@ import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.jpa.repository.config.EnableJpaRepositories; import org.springframework.data.jpa.repository.query.Procedure; -import org.springframework.data.jpa.util.DisabledOnHibernate62; +import org.springframework.data.jpa.util.DisabledOnHibernate; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit.jupiter.SpringExtension; import org.springframework.transaction.annotation.EnableTransactionManagement; @@ -106,7 +106,7 @@ void testNamedOutputParameter() { new Employee(4, "Gabriel")); } - @DisabledOnHibernate62 + @DisabledOnHibernate("6") @Test // 2256 void testSingleEntityFromResultSet() { @@ -160,6 +160,8 @@ void supportsMultipleOutParameters() { } @Test // GH-3081 + @DisabledOnHibernate(value = "6.2", + disabledReason = "Hibernate 6.2 does not support stored procedures with array types") void supportsArrayTypes() { String result = repository.accept_array(new String[] { "one", "two" }); diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/procedures/PostgresStoredProcedureNullHandlingIntegrationTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/procedures/PostgresStoredProcedureNullHandlingIntegrationTests.java index d6c7a1dab3..98783a9c28 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/procedures/PostgresStoredProcedureNullHandlingIntegrationTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/procedures/PostgresStoredProcedureNullHandlingIntegrationTests.java @@ -36,7 +36,7 @@ import org.springframework.data.jpa.repository.Temporal; import org.springframework.data.jpa.repository.config.EnableJpaRepositories; import org.springframework.data.jpa.repository.query.Procedure; -import org.springframework.data.jpa.util.DisabledOnHibernate61; +import org.springframework.data.jpa.util.DisabledOnHibernate; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit.jupiter.SpringExtension; import org.springframework.transaction.annotation.EnableTransactionManagement; @@ -49,7 +49,7 @@ * * @author Greg Turnquist */ -@DisabledOnHibernate61 // GH-2903 +@DisabledOnHibernate("6.1") // GH-2903 @Transactional @ExtendWith(SpringExtension.class) @ContextConfiguration(classes = PostgresStoredProcedureNullHandlingIntegrationTests.Config.class) diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/HibernateJpaMetamodelEntityInformationIntegrationTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/HibernateJpaMetamodelEntityInformationIntegrationTests.java index c305e9b4bc..82824c084b 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/HibernateJpaMetamodelEntityInformationIntegrationTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/HibernateJpaMetamodelEntityInformationIntegrationTests.java @@ -17,7 +17,8 @@ import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; -import org.springframework.data.jpa.util.DisabledOnHibernate61; + +import org.springframework.data.jpa.util.DisabledOnHibernate; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit.jupiter.SpringExtension; @@ -35,21 +36,21 @@ String getMetadadataPersistenceUnitName() { return "metadata-id-handling"; } - @DisabledOnHibernate61 + @DisabledOnHibernate("6.1") @Test @Override void correctlyDeterminesIdValueForNestedIdClassesWithNonPrimitiveNonManagedType() { super.correctlyDeterminesIdValueForNestedIdClassesWithNonPrimitiveNonManagedType(); } - @DisabledOnHibernate61 + @DisabledOnHibernate("6.1") @Test @Override void prefersPrivateGetterOverFieldAccess() { super.prefersPrivateGetterOverFieldAccess(); } - @DisabledOnHibernate61 + @DisabledOnHibernate("6.1") @Test @Override void findsIdClassOnMappedSuperclass() { diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/util/BooleanExecutionCondition.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/util/BooleanExecutionCondition.java new file mode 100644 index 0000000000..bd617cb557 --- /dev/null +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/util/BooleanExecutionCondition.java @@ -0,0 +1,58 @@ +/* + * Copyright 2024 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.springframework.data.jpa.util; + +import static org.junit.jupiter.api.extension.ConditionEvaluationResult.*; +import static org.junit.platform.commons.util.AnnotationUtils.*; + +import java.lang.annotation.Annotation; +import java.util.function.Function; + +import org.junit.jupiter.api.extension.ConditionEvaluationResult; +import org.junit.jupiter.api.extension.ExecutionCondition; +import org.junit.jupiter.api.extension.ExtensionContext; + +abstract class BooleanExecutionCondition implements ExecutionCondition { + + private final Class annotationType; + private final String enabledReason; + private final String disabledReason; + private final Function customDisabledReason; + + BooleanExecutionCondition(Class annotationType, String enabledReason, String disabledReason, + Function customDisabledReason) { + this.annotationType = annotationType; + this.enabledReason = enabledReason; + this.disabledReason = disabledReason; + this.customDisabledReason = customDisabledReason; + } + + abstract boolean isEnabled(A annotation); + + @Override + public ConditionEvaluationResult evaluateExecutionCondition(ExtensionContext context) { + return findAnnotation(context.getElement(), annotationType) // + .map(annotation -> isEnabled(annotation) ? enabled(enabledReason) + : disabled(disabledReason, customDisabledReason.apply(annotation))) // + .orElseGet(this::enabledByDefault); + } + + private ConditionEvaluationResult enabledByDefault() { + String reason = String.format("@%s is not present", annotationType.getSimpleName()); + return enabled(reason); + } + +} diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/util/DisabledOnHibernate61.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/util/DisabledOnHibernate.java similarity index 50% rename from spring-data-jpa/src/test/java/org/springframework/data/jpa/util/DisabledOnHibernate61.java rename to spring-data-jpa/src/test/java/org/springframework/data/jpa/util/DisabledOnHibernate.java index 451eb8866a..0ee4e25989 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/util/DisabledOnHibernate61.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/util/DisabledOnHibernate.java @@ -23,14 +23,31 @@ import org.junit.jupiter.api.extension.ExtendWith; /** - * Annotation to flag JUnit 5 test cases to ONLY activate when Hibernate 6.2 is on the classpath. + * {@code @DisabledOnHibernate} is used to signal that the annotated test class or test method is only disabled + * if the given Hibernate {@linkplain #value version} is being used. * * @author Greg Turnquist - * @since 3.1 + * @author Mark Paluch + * @since 3.2 */ @Target({ ElementType.TYPE, ElementType.METHOD, ElementType.ANNOTATION_TYPE }) @Retention(RetentionPolicy.RUNTIME) -@ExtendWith(HibernateSupport.DisabledWhenHibernate61OnClasspath.class) -public @interface DisabledOnHibernate61 { +@ExtendWith(DisabledOnHibernateCondition.class) +public @interface DisabledOnHibernate { + /** + * The version of Hibernate to disable the test or container case on. The version specifier can hold individual + * version components matching effectively the version in a prefix-manner. The more specific you want to match, the + * more version components you can specify, such as {@code 6.2.1} to match a specific service release or {@code 6} to + * match a full major version. + */ + String value(); + + /** + * Custom reason to provide if the test or container is disabled. + *

+ * If a custom reason is supplied, it will be combined with the default reason for this annotation. If a custom reason + * is not supplied, the default reason will be used. + */ + String disabledReason() default ""; } diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/util/DisabledOnHibernate62.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/util/DisabledOnHibernate62.java deleted file mode 100644 index b39f7000de..0000000000 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/util/DisabledOnHibernate62.java +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright 2015-2024 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.springframework.data.jpa.util; - -import java.lang.annotation.ElementType; -import java.lang.annotation.Retention; -import java.lang.annotation.RetentionPolicy; -import java.lang.annotation.Target; - -import org.junit.jupiter.api.extension.ExtendWith; - -/** - * Annotation to flag JUnit 5 test cases to ONLY activate when Hibernate 6.1 is on the classpath. - * - * @author Greg Turnquist - * @since 3.1 - */ -@Target({ ElementType.TYPE, ElementType.METHOD, ElementType.ANNOTATION_TYPE }) -@Retention(RetentionPolicy.RUNTIME) -@ExtendWith(HibernateSupport.DisabledWhenHibernate62OnClasspath.class) -public @interface DisabledOnHibernate62 { - -} diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/util/DisabledOnHibernateCondition.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/util/DisabledOnHibernateCondition.java new file mode 100644 index 0000000000..804309544f --- /dev/null +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/util/DisabledOnHibernateCondition.java @@ -0,0 +1,100 @@ +/* + * Copyright 2024 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.springframework.data.jpa.util; + +import java.util.ArrayList; +import java.util.List; +import java.util.regex.Matcher; +import java.util.regex.Pattern; + +import org.junit.jupiter.api.extension.ExecutionCondition; + +/** + * {@link ExecutionCondition} for {@link DisabledOnHibernate @DisabledOnHibernate}. + * + * @see DisabledOnHibernate + */ +class DisabledOnHibernateCondition extends BooleanExecutionCondition { + + static final String ENABLED_ON_CURRENT_HIBERNATE = // + "Enabled on Hibernate version: " + org.hibernate.Version.getVersionString(); + + static final String DISABLED_ON_CURRENT_HIBERNATE = // + "Disabled on Hibernate version: " + org.hibernate.Version.getVersionString(); + + DisabledOnHibernateCondition() { + super(DisabledOnHibernate.class, ENABLED_ON_CURRENT_HIBERNATE, DISABLED_ON_CURRENT_HIBERNATE, + DisabledOnHibernate::disabledReason); + } + + @Override + boolean isEnabled(DisabledOnHibernate annotation) { + + VersionMatcher disabled = VersionMatcher.parse(annotation.value()); + VersionMatcher hibernate = VersionMatcher.parse(org.hibernate.Version.getVersionString()); + + return !disabled.matches(hibernate); + } + + static class VersionMatcher { + + private static final Pattern PATTERN = Pattern.compile("(\\d+)+"); + private final int[] components; + + private VersionMatcher(int[] components) { + this.components = components; + } + + /** + * Parse the given version string into a {@link VersionMatcher}. + * + * @param version + * @return + */ + public static VersionMatcher parse(String version) { + + Matcher matcher = PATTERN.matcher(version); + List ints = new ArrayList<>(); + while (matcher.find()) { + ints.add(Integer.parseInt(matcher.group())); + } + + return new VersionMatcher(ints.stream().mapToInt(value -> value).toArray()); + } + + /** + * Match the given version against another VersionMatcher. This matcher's version spec controls the expected length. + * If the other version is shorter, then the match returns {@code false}. + * + * @param version + * @return + */ + public boolean matches(VersionMatcher version) { + + for (int i = 0; i < components.length; i++) { + if (version.components.length <= i) { + return false; + } + if (components[i] != version.components[i]) { + return false; + } + } + + return true; + } + } + +} diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/util/DisabledOnHibernateConditionTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/util/DisabledOnHibernateConditionTests.java new file mode 100644 index 0000000000..15a977cb5f --- /dev/null +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/util/DisabledOnHibernateConditionTests.java @@ -0,0 +1,56 @@ +/* + * Copyright 2024 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.springframework.data.jpa.util; + +import static org.assertj.core.api.Assertions.*; +import static org.springframework.data.jpa.util.DisabledOnHibernateCondition.*; + +import org.junit.jupiter.api.Test; + +/** + * Unit tests for {@link DisabledOnHibernate}. + * + * @author Mark Paluch + */ +class DisabledOnHibernateConditionTests { + + @Test // GH-3081 + void shouldMatchVersions() { + + VersionMatcher spec = VersionMatcher.parse("1.2"); + VersionMatcher lib = VersionMatcher.parse("v1.2.3.4.Final"); + + assertThat(spec.matches(lib)).isTrue(); + } + + @Test // GH-3081 + void shouldNotMatchVersions() { + + VersionMatcher spec = VersionMatcher.parse("1.2"); + VersionMatcher lib = VersionMatcher.parse("2.2.3.4"); + + assertThat(spec.matches(lib)).isFalse(); + } + + @Test // GH-3081 + void shouldNotMatchVersionsWithExceedingLength() { + + VersionMatcher spec = VersionMatcher.parse("1.2.3.4"); + VersionMatcher lib = VersionMatcher.parse("1.2"); + + assertThat(spec.matches(lib)).isFalse(); + } +} diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/util/HibernateSupport.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/util/HibernateSupport.java deleted file mode 100644 index d2b3253540..0000000000 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/util/HibernateSupport.java +++ /dev/null @@ -1,62 +0,0 @@ -/* - * Copyright 2015-2024 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.springframework.data.jpa.util; - -import org.junit.jupiter.api.extension.ConditionEvaluationResult; -import org.junit.jupiter.api.extension.ExecutionCondition; -import org.junit.jupiter.api.extension.ExtensionContext; -import org.springframework.util.ClassUtils; - -/** - * JUnit 5 utilities to support conditional test cases based upon Hibernate classpath settings. - * - * @author Greg Turnquist - * @since 3.1 - */ -abstract class HibernateSupport { - - /** - * {@literal org.hibernate.dialect.PostgreSQL91Dialect} is deprecated in Hibernate 6.1 and fully removed in Hibernate - * 6.2, making it a perfect detector between the two. - */ - private static final boolean HIBERNATE_61_ON_CLASSPATH = ClassUtils - .isPresent("org.hibernate.dialect.PostgreSQL91Dialect", HibernateSupport.class.getClassLoader()); - - private static final boolean HIBERNATE_62_ON_CLASSPATH = !HIBERNATE_61_ON_CLASSPATH; - - static class DisabledWhenHibernate61OnClasspath implements ExecutionCondition { - - @Override - public ConditionEvaluationResult evaluateExecutionCondition(ExtensionContext extensionContext) { - - return HibernateSupport.HIBERNATE_61_ON_CLASSPATH - ? ConditionEvaluationResult.disabled("Disabled because Hibernate 6.1 is on the classpath") - : ConditionEvaluationResult.enabled("NOT disabled because Hibernate 6.2 is on the classpath"); - } - } - - static class DisabledWhenHibernate62OnClasspath implements ExecutionCondition { - - @Override - public ConditionEvaluationResult evaluateExecutionCondition(ExtensionContext extensionContext) { - - return HibernateSupport.HIBERNATE_62_ON_CLASSPATH - ? ConditionEvaluationResult.disabled("Disabled because Hibernate 6.2 is on the classpath") - : ConditionEvaluationResult.enabled("NOT disabled because Hibernate 6.1 is on the classpath"); - } - - } -} From 84e0e323f7796dbcc1e6d77dd101d22b3130eba9 Mon Sep 17 00:00:00 2001 From: Christoph Strobl Date: Fri, 25 Oct 2024 13:35:13 +0200 Subject: [PATCH 085/157] Fix NPE when parsing modifying HQL. Closes #3649 Original pull request: #3650 --- .../repository/query/HqlQueryTransformer.java | 6 ++++- .../query/HqlQueryTransformerTests.java | 27 ++++++++++++------- 2 files changed, 22 insertions(+), 11 deletions(-) diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/HqlQueryTransformer.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/HqlQueryTransformer.java index dc0445263d..4c7a7e359e 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/HqlQueryTransformer.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/HqlQueryTransformer.java @@ -101,8 +101,12 @@ private static boolean isSubquery(ParserRuleContext ctx) { return false; } else if (ctx instanceof HqlParser.InsertStatementContext) { return false; + } else if (ctx instanceof HqlParser.DeleteStatementContext) { + return false; + } else if (ctx instanceof HqlParser.UpdateStatementContext) { + return false; } else { - return isSubquery(ctx.getParent()); + return ctx.getParent() != null ? isSubquery(ctx.getParent()) : false; } } diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/HqlQueryTransformerTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/HqlQueryTransformerTests.java index 648c03e055..5dab8c1cfe 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/HqlQueryTransformerTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/HqlQueryTransformerTests.java @@ -995,16 +995,23 @@ void fromWithoutAPrimaryAliasShouldWork() { .isEqualTo("FROM Story WHERE enabled = true order by created desc"); } - @Test // GH-2977 - void isSubqueryThrowsException() { - - String query = """ - insert into MyEntity (id, col) - select max(id), col - from MyEntityStaging - group by col - """; - + @ParameterizedTest + @ValueSource(strings = { """ + insert into MyEntity (id, col) + select max(id), col + from MyEntityStaging + group by col + """, """ + update MyEntity AS mes + set mes.col = 'test' + where mes.id = 1 + """, """ + delete MyEntity AS mes + where mes.col = 'test' + """ + + }) // GH-2977, GH-3649 + void isSubqueryThrowsException(String query) { assertThat(createQueryFor(query, Sort.unsorted())).isEqualToIgnoringWhitespace(query); } From d955b789d12e6bbcba2afa2022c8074fcdec9790 Mon Sep 17 00:00:00 2001 From: Mark Paluch Date: Fri, 25 Oct 2024 15:25:34 +0200 Subject: [PATCH 086/157] Polishing. Simplify code. See #3649 Original pull request: #3650 --- .../data/jpa/repository/query/HqlQueryTransformer.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/HqlQueryTransformer.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/HqlQueryTransformer.java index 4c7a7e359e..670ecd2c84 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/HqlQueryTransformer.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/HqlQueryTransformer.java @@ -106,7 +106,7 @@ private static boolean isSubquery(ParserRuleContext ctx) { } else if (ctx instanceof HqlParser.UpdateStatementContext) { return false; } else { - return ctx.getParent() != null ? isSubquery(ctx.getParent()) : false; + return ctx.getParent() != null && isSubquery(ctx.getParent()); } } From 993ffe7c50aa142be49d904754392a2bd17a0a07 Mon Sep 17 00:00:00 2001 From: Mark Paluch Date: Tue, 29 Oct 2024 09:46:52 +0100 Subject: [PATCH 087/157] Move Benchmarks from `performance` module into `spring-data-jpa`. Closes #3655 --- spring-data-jpa/pom.xml | 10 + .../benchmark/RepositoryFinderBenchmarks.java | 205 ++++++++++++++++++ .../benchmark/model/IPersonProjection.java | 25 +++ .../data/jpa/benchmark/model/Person.java | 119 ++++++++++ .../data/jpa/benchmark/model/Profile.java | 53 +++++ .../repository/PersonRepository.java | 48 ++++ .../repository/query/HqlParserBenchmarks.java | 68 ++++++ .../JSqlParserQueryEnhancerBenchmarks.java | 68 ++++++ .../resources/META-INF/persistence-jmh.xml | 28 +++ 9 files changed, 624 insertions(+) create mode 100644 spring-data-jpa/src/jmh/java/org/springframework/data/jpa/benchmark/RepositoryFinderBenchmarks.java create mode 100644 spring-data-jpa/src/jmh/java/org/springframework/data/jpa/benchmark/model/IPersonProjection.java create mode 100644 spring-data-jpa/src/jmh/java/org/springframework/data/jpa/benchmark/model/Person.java create mode 100644 spring-data-jpa/src/jmh/java/org/springframework/data/jpa/benchmark/model/Profile.java create mode 100644 spring-data-jpa/src/jmh/java/org/springframework/data/jpa/benchmark/repository/PersonRepository.java create mode 100644 spring-data-jpa/src/jmh/java/org/springframework/data/jpa/repository/query/HqlParserBenchmarks.java create mode 100644 spring-data-jpa/src/jmh/java/org/springframework/data/jpa/repository/query/JSqlParserQueryEnhancerBenchmarks.java create mode 100644 spring-data-jpa/src/test/resources/META-INF/persistence-jmh.xml diff --git a/spring-data-jpa/pom.xml b/spring-data-jpa/pom.xml index c9ba7c275b..c9dacfcc88 100644 --- a/spring-data-jpa/pom.xml +++ b/spring-data-jpa/pom.xml @@ -351,6 +351,16 @@ hibernate-jpamodelgen ${hibernate} + + org.hibernate.orm + hibernate-core + ${hibernate} + + + org.openjdk.jmh + jmh-generator-annprocess + ${jmh} + jakarta.persistence jakarta.persistence-api diff --git a/spring-data-jpa/src/jmh/java/org/springframework/data/jpa/benchmark/RepositoryFinderBenchmarks.java b/spring-data-jpa/src/jmh/java/org/springframework/data/jpa/benchmark/RepositoryFinderBenchmarks.java new file mode 100644 index 0000000000..05f66f1203 --- /dev/null +++ b/spring-data-jpa/src/jmh/java/org/springframework/data/jpa/benchmark/RepositoryFinderBenchmarks.java @@ -0,0 +1,205 @@ +/* + * Copyright 2024 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.springframework.data.jpa.benchmark; + +import jakarta.persistence.EntityManager; +import jakarta.persistence.EntityManagerFactory; +import jakarta.persistence.Query; +import jakarta.persistence.TypedQuery; +import jakarta.persistence.criteria.CriteriaBuilder; +import jakarta.persistence.criteria.CriteriaQuery; +import jakarta.persistence.criteria.Root; + +import java.util.List; +import java.util.Properties; +import java.util.Set; + +import org.hibernate.jpa.HibernatePersistenceProvider; +import org.junit.platform.commons.annotation.Testable; +import org.openjdk.jmh.annotations.Benchmark; +import org.openjdk.jmh.annotations.Fork; +import org.openjdk.jmh.annotations.Level; +import org.openjdk.jmh.annotations.Measurement; +import org.openjdk.jmh.annotations.Scope; +import org.openjdk.jmh.annotations.Setup; +import org.openjdk.jmh.annotations.State; +import org.openjdk.jmh.annotations.TearDown; +import org.openjdk.jmh.annotations.Timeout; +import org.openjdk.jmh.annotations.Warmup; + +import org.springframework.data.domain.Sort; +import org.springframework.data.jpa.benchmark.model.IPersonProjection; +import org.springframework.data.jpa.benchmark.model.Person; +import org.springframework.data.jpa.benchmark.model.Profile; +import org.springframework.data.jpa.benchmark.repository.PersonRepository; +import org.springframework.data.jpa.repository.support.JpaRepositoryFactory; +import org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean; +import org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter; +import org.springframework.util.ObjectUtils; + +/** + * @author Christoph Strobl + */ +@Testable +@Fork(1) +@Warmup(time = 2, iterations = 3) +@Measurement(time = 2) +@Timeout(time = 2) +public class RepositoryFinderBenchmarks { + + private static final String PERSON_FIRSTNAME = "first"; + private static final String COLUMN_PERSON_FIRSTNAME = "firstname"; + + @State(Scope.Benchmark) + public static class BenchmarkParameters { + + EntityManager entityManager; + PersonRepository repositoryProxy; + + @Setup(Level.Iteration) + public void doSetup() { + + createEntityManager(); + + if (!entityManager.getTransaction().isActive()) { + + if (ObjectUtils.nullSafeEquals( + entityManager.createNativeQuery("SELECT COUNT(*) FROM person", Integer.class).getSingleResult(), + Integer.valueOf(0))) { + + entityManager.getTransaction().begin(); + + Profile generalProfile = new Profile("general"); + Profile sdUserProfile = new Profile("sd-user"); + + entityManager.persist(generalProfile); + entityManager.persist(sdUserProfile); + + Person person = new Person(PERSON_FIRSTNAME, "last"); + person.setProfiles(Set.of(generalProfile, sdUserProfile)); + entityManager.persist(person); + entityManager.getTransaction().commit(); + } + } + + this.repositoryProxy = createRepository(); + } + + @TearDown(Level.Iteration) + public void doTearDown() { + entityManager.close(); + } + + private void createEntityManager() { + + LocalContainerEntityManagerFactoryBean factoryBean = new LocalContainerEntityManagerFactoryBean(); + factoryBean.setPersistenceUnitName("benchmark"); + factoryBean.setJpaVendorAdapter(new HibernateJpaVendorAdapter()); + factoryBean.setPersistenceProviderClass(HibernatePersistenceProvider.class); + factoryBean.setPersistenceXmlLocation("classpath*:META-INF/persistence-jmh.xml"); + factoryBean.setMappingResources("classpath*:META-INF/orm-jmh.xml"); + + Properties properties = new Properties(); + properties.put("jakarta.persistence.jdbc.url", "jdbc:h2:mem:test"); + properties.put("hibernate.dialect", "org.hibernate.dialect.H2Dialect"); + properties.put("hibernate.hbm2ddl.auto", "update"); + properties.put("hibernate.xml_mapping_enabled", "false"); + + factoryBean.setJpaProperties(properties); + factoryBean.afterPropertiesSet(); + + EntityManagerFactory entityManagerFactory = factoryBean.getObject(); + entityManager = entityManagerFactory.createEntityManager(); + } + + PersonRepository createRepository() { + JpaRepositoryFactory repositoryFactory = new JpaRepositoryFactory(entityManager); + return repositoryFactory.getRepository(PersonRepository.class); + } + } + + @Benchmark + public PersonRepository repositoryBootstrap(BenchmarkParameters parameters) { + return parameters.createRepository(); + } + + @Benchmark + public List baselineEntityManagerCriteriaQuery(BenchmarkParameters parameters) { + + CriteriaBuilder criteriaBuilder = parameters.entityManager.getCriteriaBuilder(); + CriteriaQuery query = criteriaBuilder.createQuery(Person.class); + Root root = query.from(Person.class); + TypedQuery typedQuery = parameters.entityManager + .createQuery(query.where(criteriaBuilder.equal(root.get(COLUMN_PERSON_FIRSTNAME), PERSON_FIRSTNAME))); + + return typedQuery.getResultList(); + } + + @Benchmark + public List baselineEntityManagerHQLQuery(BenchmarkParameters parameters) { + + Query query = parameters.entityManager + .createQuery("SELECT p FROM org.springframework.data.jpa.benchmark.model.Person p WHERE p.firstname = ?1"); + query.setParameter(1, PERSON_FIRSTNAME); + + return query.getResultList(); + } + + @Benchmark + public Long baselineEntityManagerCount(BenchmarkParameters parameters) { + + Query query = parameters.entityManager.createQuery( + "SELECT COUNT(*) FROM org.springframework.data.jpa.benchmark.model.Person p WHERE p.firstname = ?1"); + query.setParameter(1, PERSON_FIRSTNAME); + + return (Long) query.getSingleResult(); + } + + @Benchmark + public List derivedFinderMethod(BenchmarkParameters parameters) { + return parameters.repositoryProxy.findAllByFirstname(PERSON_FIRSTNAME); + } + + @Benchmark + public List derivedFinderMethodWithInterfaceProjection(BenchmarkParameters parameters) { + return parameters.repositoryProxy.findAllAndProjectToInterfaceByFirstname(PERSON_FIRSTNAME); + } + + @Benchmark + public List stringBasedQuery(BenchmarkParameters parameters) { + return parameters.repositoryProxy.findAllWithAnnotatedQueryByFirstname(PERSON_FIRSTNAME); + } + + @Benchmark + public List stringBasedQueryDynamicSort(BenchmarkParameters parameters) { + return parameters.repositoryProxy.findAllWithAnnotatedQueryByFirstname(PERSON_FIRSTNAME, Sort.by(COLUMN_PERSON_FIRSTNAME)); + } + + @Benchmark + public List stringBasedNativeQuery(BenchmarkParameters parameters) { + return parameters.repositoryProxy.findAllWithNativeQueryByFirstname(PERSON_FIRSTNAME); + } + + @Benchmark + public Long derivedCount(BenchmarkParameters parameters) { + return parameters.repositoryProxy.countByFirstname(PERSON_FIRSTNAME); + } + + @Benchmark + public Long stringBasedCount(BenchmarkParameters parameters) { + return parameters.repositoryProxy.countWithAnnotatedQueryByFirstname(PERSON_FIRSTNAME); + } +} diff --git a/spring-data-jpa/src/jmh/java/org/springframework/data/jpa/benchmark/model/IPersonProjection.java b/spring-data-jpa/src/jmh/java/org/springframework/data/jpa/benchmark/model/IPersonProjection.java new file mode 100644 index 0000000000..6934c0ae67 --- /dev/null +++ b/spring-data-jpa/src/jmh/java/org/springframework/data/jpa/benchmark/model/IPersonProjection.java @@ -0,0 +1,25 @@ +/* + * Copyright 2024 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.springframework.data.jpa.benchmark.model; + +/** + * @author Christoph Strobl + */ +public interface IPersonProjection { + + String getFirstname(); + String getLastname(); +} diff --git a/spring-data-jpa/src/jmh/java/org/springframework/data/jpa/benchmark/model/Person.java b/spring-data-jpa/src/jmh/java/org/springframework/data/jpa/benchmark/model/Person.java new file mode 100644 index 0000000000..3996c0b611 --- /dev/null +++ b/spring-data-jpa/src/jmh/java/org/springframework/data/jpa/benchmark/model/Person.java @@ -0,0 +1,119 @@ +/* + * Copyright 2024 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.springframework.data.jpa.benchmark.model; + +import jakarta.persistence.Column; +import jakarta.persistence.Entity; +import jakarta.persistence.GeneratedValue; +import jakarta.persistence.GenerationType; +import jakarta.persistence.Id; +import jakarta.persistence.ManyToMany; +import jakarta.persistence.Table; + +import java.util.Set; + +/** + * @author Christoph Strobl + */ +@Entity +@Table(name = "person") +public class Person { + + @Id + @GeneratedValue(strategy = GenerationType.AUTO) // + private Integer id; + + private String firstname; + private String lastname; + + private int age; + private boolean decased; + + @Column(nullable = false, unique = true) // + private String emailAddress; + + @ManyToMany // + private Set profiles; + + public Person() {} + + public Person(String firstname, String lastname) { + this(firstname, lastname, "%s.%s@benchmark.com"); + } + + public Person(String firstname, String lastname, String emailAddress) { + + this.firstname = firstname; + this.lastname = lastname; + this.emailAddress = emailAddress; + } + + public Integer getId() { + return id; + } + + public void setId(Integer id) { + this.id = id; + } + + public String getEmailAddress() { + return emailAddress; + } + + public void setEmailAddress(String emailAddress) { + this.emailAddress = emailAddress; + } + + public String getFirstname() { + return firstname; + } + + public void setFirstname(String firstname) { + this.firstname = firstname; + } + + public String getLastname() { + return lastname; + } + + public void setLastname(String lastname) { + this.lastname = lastname; + } + + public int getAge() { + return age; + } + + public void setAge(int age) { + this.age = age; + } + + public boolean isDecased() { + return decased; + } + + public void setDecased(boolean decased) { + this.decased = decased; + } + + public Set getProfiles() { + return profiles; + } + + public void setProfiles(Set profiles) { + this.profiles = profiles; + } +} diff --git a/spring-data-jpa/src/jmh/java/org/springframework/data/jpa/benchmark/model/Profile.java b/spring-data-jpa/src/jmh/java/org/springframework/data/jpa/benchmark/model/Profile.java new file mode 100644 index 0000000000..816554553e --- /dev/null +++ b/spring-data-jpa/src/jmh/java/org/springframework/data/jpa/benchmark/model/Profile.java @@ -0,0 +1,53 @@ +/* + * Copyright 2024 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.springframework.data.jpa.benchmark.model; + +import jakarta.persistence.Entity; +import jakarta.persistence.GeneratedValue; +import jakarta.persistence.Id; + +/** + * @author Christoph Strobl + */ +@Entity +public class Profile { + + @Id + @GeneratedValue private Integer id; + private String name; + + public Profile() {} + + public Profile(String name) { + this.name = name; + } + + public Integer getId() { + return id; + } + + public void setId(Integer id) { + this.id = id; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } +} diff --git a/spring-data-jpa/src/jmh/java/org/springframework/data/jpa/benchmark/repository/PersonRepository.java b/spring-data-jpa/src/jmh/java/org/springframework/data/jpa/benchmark/repository/PersonRepository.java new file mode 100644 index 0000000000..3ba5fc00c9 --- /dev/null +++ b/spring-data-jpa/src/jmh/java/org/springframework/data/jpa/benchmark/repository/PersonRepository.java @@ -0,0 +1,48 @@ +/* + * Copyright 2024 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.springframework.data.jpa.benchmark.repository; + +import java.util.List; + +import org.springframework.data.domain.Sort; +import org.springframework.data.jpa.benchmark.model.IPersonProjection; +import org.springframework.data.jpa.benchmark.model.Person; +import org.springframework.data.jpa.repository.Query; +import org.springframework.data.repository.ListCrudRepository; + +/** + * @author Christoph Strobl + */ +public interface PersonRepository extends ListCrudRepository { + + List findAllByFirstname(String firstname); + + List findAllAndProjectToInterfaceByFirstname(String firstname); + + @Query("SELECT p FROM org.springframework.data.jpa.benchmark.model.Person p WHERE p.firstname = ?1") + List findAllWithAnnotatedQueryByFirstname(String firstname); + + @Query("SELECT p FROM org.springframework.data.jpa.benchmark.model.Person p WHERE p.firstname = ?1") + List findAllWithAnnotatedQueryByFirstname(String firstname, Sort sort); + + @Query(value = "SELECT * FROM person WHERE firstname = ?1", nativeQuery = true) + List findAllWithNativeQueryByFirstname(String firstname); + + Long countByFirstname(String firstname); + + @Query("SELECT COUNT(*) FROM org.springframework.data.jpa.benchmark.model.Person p WHERE p.firstname = ?1") + Long countWithAnnotatedQueryByFirstname(String firstname); +} diff --git a/spring-data-jpa/src/jmh/java/org/springframework/data/jpa/repository/query/HqlParserBenchmarks.java b/spring-data-jpa/src/jmh/java/org/springframework/data/jpa/repository/query/HqlParserBenchmarks.java new file mode 100644 index 0000000000..482c4454fa --- /dev/null +++ b/spring-data-jpa/src/jmh/java/org/springframework/data/jpa/repository/query/HqlParserBenchmarks.java @@ -0,0 +1,68 @@ +/* + * Copyright 2024 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.springframework.data.jpa.repository.query; + +import org.junit.platform.commons.annotation.Testable; +import org.openjdk.jmh.annotations.Benchmark; +import org.openjdk.jmh.annotations.Fork; +import org.openjdk.jmh.annotations.Level; +import org.openjdk.jmh.annotations.Measurement; +import org.openjdk.jmh.annotations.Scope; +import org.openjdk.jmh.annotations.Setup; +import org.openjdk.jmh.annotations.State; +import org.openjdk.jmh.annotations.Timeout; +import org.openjdk.jmh.annotations.Warmup; + +import org.springframework.data.domain.Sort; + +/** + * @author Mark Paluch + */ +@Testable +@Fork(1) +@Warmup(time = 2, iterations = 3) +@Measurement(time = 2) +@Timeout(time = 2) +public class HqlParserBenchmarks { + + @State(Scope.Benchmark) + public static class BenchmarkParameters { + + DeclaredQuery query; + Sort sort = Sort.by("foo"); + QueryEnhancer enhancer; + + @Setup(Level.Iteration) + public void doSetup() { + + String s = """ + SELECT e FROM Employee e JOIN e.projects p + WHERE TREAT(p AS LargeProject).budget > 1000 + OR TREAT(p AS SmallProject).name LIKE 'Persist%' + OR p.description LIKE "cost overrun" + """; + + query = DeclaredQuery.of(s, false); + enhancer = QueryEnhancerFactory.forQuery(query); + } + } + + @Benchmark + public Object measure(BenchmarkParameters parameters) { + return parameters.enhancer.applySorting(parameters.sort); + } + +} diff --git a/spring-data-jpa/src/jmh/java/org/springframework/data/jpa/repository/query/JSqlParserQueryEnhancerBenchmarks.java b/spring-data-jpa/src/jmh/java/org/springframework/data/jpa/repository/query/JSqlParserQueryEnhancerBenchmarks.java new file mode 100644 index 0000000000..724a417353 --- /dev/null +++ b/spring-data-jpa/src/jmh/java/org/springframework/data/jpa/repository/query/JSqlParserQueryEnhancerBenchmarks.java @@ -0,0 +1,68 @@ +/* + * Copyright 2024 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.springframework.data.jpa.repository.query; + +import java.io.IOException; + +import org.junit.platform.commons.annotation.Testable; +import org.openjdk.jmh.annotations.Benchmark; +import org.openjdk.jmh.annotations.Fork; +import org.openjdk.jmh.annotations.Level; +import org.openjdk.jmh.annotations.Measurement; +import org.openjdk.jmh.annotations.Scope; +import org.openjdk.jmh.annotations.Setup; +import org.openjdk.jmh.annotations.State; +import org.openjdk.jmh.annotations.Timeout; +import org.openjdk.jmh.annotations.Warmup; + +import org.springframework.data.domain.Sort; + +/** + * @author Mark Paluch + */ +@Testable +@Fork(1) +@Warmup(time = 2, iterations = 3) +@Measurement(time = 2) +@Timeout(time = 2) +public class JSqlParserQueryEnhancerBenchmarks { + + @State(Scope.Benchmark) + public static class BenchmarkParameters { + + JSqlParserQueryEnhancer enhancer; + Sort sort = Sort.by("foo"); + private byte[] serialized; + + @Setup(Level.Iteration) + public void doSetup() throws IOException { + + String s = """ + select SOME_COLUMN from SOME_TABLE where REPORTING_DATE = :REPORTING_DATE + except + select SOME_COLUMN from SOME_OTHER_TABLE where REPORTING_DATE = :REPORTING_DATE + union select SOME_COLUMN from SOME_OTHER_OTHER_TABLE"""; + + enhancer = new JSqlParserQueryEnhancer(DeclaredQuery.of(s, true)); + } + } + + @Benchmark + public Object applySortWithParsing(BenchmarkParameters p) { + return p.enhancer.applySorting(p.sort); + } + +} diff --git a/spring-data-jpa/src/test/resources/META-INF/persistence-jmh.xml b/spring-data-jpa/src/test/resources/META-INF/persistence-jmh.xml new file mode 100644 index 0000000000..60c6b5c97a --- /dev/null +++ b/spring-data-jpa/src/test/resources/META-INF/persistence-jmh.xml @@ -0,0 +1,28 @@ + + + + + org.hibernate.jpa.HibernatePersistenceProvider + org.springframework.data.jpa.domain.AbstractPersistable + org.springframework.data.jpa.domain.AbstractAuditable + org.springframework.data.jpa.benchmark.model.Person + org.springframework.data.jpa.benchmark.model.Profile + true + + From 8ac6c02a1c3eaacc47d9f449f45d2aa3984c9e72 Mon Sep 17 00:00:00 2001 From: jeonghyeon00 Date: Tue, 22 Oct 2024 22:27:16 +0900 Subject: [PATCH 088/157] Replace `!Optional.isPresent()` with `isEmpty()` for readability. Closes #3648 --- .../data/jpa/convert/QueryByExamplePredicateBuilder.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/convert/QueryByExamplePredicateBuilder.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/convert/QueryByExamplePredicateBuilder.java index fc47f221ce..e24aeded0e 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/convert/QueryByExamplePredicateBuilder.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/convert/QueryByExamplePredicateBuilder.java @@ -139,7 +139,7 @@ static List getPredicates(String path, CriteriaBuilder cb, Path fr Optional optionalValue = transformer .apply(Optional.ofNullable(beanWrapper.getPropertyValue(attribute.getName()))); - if (!optionalValue.isPresent()) { + if (optionalValue.isEmpty()) { if (exampleAccessor.getNullHandler().equals(ExampleMatcher.NullHandler.INCLUDE)) { predicates.add(cb.isNull(from.get(attribute))); From bc9ebb79270b98c793a3b3615c6ce3e8bf86e27e Mon Sep 17 00:00:00 2001 From: arefbehboudi Date: Tue, 29 Oct 2024 10:14:18 +0100 Subject: [PATCH 089/157] Cleanup code. Closes #3592 --- .../support/EnversRevisionRepositoryImpl.java | 2 +- .../data/jpa/mapping/JpaMetamodelMappingContext.java | 1 - .../data/jpa/mapping/JpaPersistentEntityImpl.java | 1 - .../data/jpa/provider/JpaClassUtils.java | 2 +- .../data/jpa/provider/PersistenceProvider.java | 2 +- .../jpa/repository/query/JSqlParserQueryEnhancer.java | 10 +++++----- .../repository/query/QueryParameterSetterFactory.java | 4 ++-- .../data/jpa/util/JpaMetamodelCacheCleanup.java | 2 +- .../jpa/provider/PersistenceProviderUnitTests.java | 5 ++++- 9 files changed, 15 insertions(+), 14 deletions(-) diff --git a/spring-data-envers/src/main/java/org/springframework/data/envers/repository/support/EnversRevisionRepositoryImpl.java b/spring-data-envers/src/main/java/org/springframework/data/envers/repository/support/EnversRevisionRepositoryImpl.java index 2f3e29861f..25abac67e3 100755 --- a/spring-data-envers/src/main/java/org/springframework/data/envers/repository/support/EnversRevisionRepositoryImpl.java +++ b/spring-data-envers/src/main/java/org/springframework/data/envers/repository/support/EnversRevisionRepositoryImpl.java @@ -172,7 +172,7 @@ public Page> findRevisions(ID id, Pageable pageable) { AuditQuery baseQuery = createBaseQuery(id); - List orderMapped = (pageable.getSort()instanceof RevisionSort revisionSort) + List orderMapped = (pageable.getSort() instanceof RevisionSort revisionSort) ? List.of(mapRevisionSort(revisionSort)) : mapPropertySort(pageable.getSort()); diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/mapping/JpaMetamodelMappingContext.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/mapping/JpaMetamodelMappingContext.java index 6335aec76d..ee663c687a 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/mapping/JpaMetamodelMappingContext.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/mapping/JpaMetamodelMappingContext.java @@ -54,7 +54,6 @@ public class JpaMetamodelMappingContext */ public JpaMetamodelMappingContext(Set models) { - Assert.notNull(models, "JPA metamodel must not be null"); Assert.notEmpty(models, "JPA metamodel must not be empty"); this.models = new Metamodels(models); diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/mapping/JpaPersistentEntityImpl.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/mapping/JpaPersistentEntityImpl.java index cd6c1a00fd..fa8eebd38d 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/mapping/JpaPersistentEntityImpl.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/mapping/JpaPersistentEntityImpl.java @@ -58,7 +58,6 @@ public JpaPersistentEntityImpl(TypeInformation information, ProxyIdAccessor p super(information, null); - Assert.notNull(proxyIdAccessor, "ProxyIdAccessor must not be null"); this.proxyIdAccessor = proxyIdAccessor; this.metamodel = metamodel; } diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/provider/JpaClassUtils.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/provider/JpaClassUtils.java index 8f472d814f..c0e3324659 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/provider/JpaClassUtils.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/provider/JpaClassUtils.java @@ -47,7 +47,7 @@ private JpaClassUtils() {} */ public static boolean isEntityManagerOfType(EntityManager em, String type) { - EntityManager entityManagerToUse = em.getDelegate()instanceof EntityManager delegate // + EntityManager entityManagerToUse = em.getDelegate() instanceof EntityManager delegate // ? delegate // : em; diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/provider/PersistenceProvider.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/provider/PersistenceProvider.java index 915ad42af5..84ca80baeb 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/provider/PersistenceProvider.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/provider/PersistenceProvider.java @@ -198,7 +198,7 @@ public String getCommentHintKey() { private static final Collection ALL = List.of(HIBERNATE, ECLIPSELINK, GENERIC_JPA); - static ConcurrentReferenceHashMap, PersistenceProvider> CACHE = new ConcurrentReferenceHashMap<>(); + private static final ConcurrentReferenceHashMap, PersistenceProvider> CACHE = new ConcurrentReferenceHashMap<>(); private final Iterable entityManagerClassNames; private final Iterable metamodelClassNames; diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/JSqlParserQueryEnhancer.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/JSqlParserQueryEnhancer.java index 4ea5c2f5bc..a76e04d5e7 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/JSqlParserQueryEnhancer.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/JSqlParserQueryEnhancer.java @@ -119,7 +119,7 @@ public String applySorting(Sort sort, @Nullable String alias) { Select selectStatement = parseSelectStatement(queryString); - if (selectStatement instanceof SetOperationList setOperationList) { + if (selectStatement instanceof SetOperationList setOperationList) { return applySortingToSetOperationList(setOperationList, sort); } @@ -217,7 +217,7 @@ private Set getJoinAliases(String query) { } Select selectStatement = (Select) statement; - if (selectStatement instanceof PlainSelect selectBody) { + if (selectStatement instanceof PlainSelect selectBody) { return getJoinAliases(selectBody); } @@ -315,7 +315,7 @@ private String detectAlias(String query) { * ValuesStatement has no alias * SetOperation can have multiple alias for each operation item */ - if (!(selectStatement instanceof PlainSelect selectBody)) { + if (!(selectStatement instanceof PlainSelect selectBody)) { return null; } @@ -370,7 +370,7 @@ public String createCountQueryFor(@Nullable String countProjection) { /* We only support count queries for {@link PlainSelect}. */ - if (!(selectStatement instanceof PlainSelect selectBody)) { + if (!(selectStatement instanceof PlainSelect selectBody)) { return this.query.getQueryString(); } @@ -413,7 +413,7 @@ public String getProjection() { Select selectBody = selectStatement; - if (selectStatement instanceof SetOperationList setOperationList) { + if (selectStatement instanceof SetOperationList setOperationList) { // using the first one since for setoperations the projection has to be the same selectBody = setOperationList.getSelects().get(0); diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/QueryParameterSetterFactory.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/QueryParameterSetterFactory.java index 9e27184582..696ac66535 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/QueryParameterSetterFactory.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/QueryParameterSetterFactory.java @@ -186,7 +186,7 @@ private static class ExpressionBasedQueryParameterSetterFactory extends QueryPar @Override public QueryParameterSetter create(ParameterBinding binding, DeclaredQuery declaredQuery) { - if (!(binding.getOrigin()instanceof ParameterBinding.Expression e)) { + if (!(binding.getOrigin() instanceof ParameterBinding.Expression e)) { return null; } @@ -239,7 +239,7 @@ public QueryParameterSetter create(ParameterBinding binding, DeclaredQuery decla Assert.notNull(binding, "Binding must not be null"); JpaParameter parameter; - if (!(binding.getOrigin()instanceof MethodInvocationArgument mia)) { + if (!(binding.getOrigin() instanceof MethodInvocationArgument mia)) { return QueryParameterSetter.NOOP; } diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/util/JpaMetamodelCacheCleanup.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/util/JpaMetamodelCacheCleanup.java index ed83f5d185..df17d56ade 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/util/JpaMetamodelCacheCleanup.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/util/JpaMetamodelCacheCleanup.java @@ -30,7 +30,7 @@ class JpaMetamodelCacheCleanup implements DisposableBean { @Override - public void destroy() throws Exception { + public void destroy() { JpaMetamodel.clear(); } } diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/provider/PersistenceProviderUnitTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/provider/PersistenceProviderUnitTests.java index 2e4ce22cae..bcb9582bc6 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/provider/PersistenceProviderUnitTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/provider/PersistenceProviderUnitTests.java @@ -22,6 +22,7 @@ import jakarta.persistence.EntityManager; import java.util.Arrays; +import java.util.Map; import org.assertj.core.api.Assumptions; import org.hibernate.Version; @@ -32,6 +33,7 @@ import org.springframework.asm.ClassWriter; import org.springframework.asm.Opcodes; import org.springframework.instrument.classloading.ShadowingClassLoader; +import org.springframework.test.util.ReflectionTestUtils; import org.springframework.util.ClassUtils; /** @@ -48,7 +50,8 @@ class PersistenceProviderUnitTests { @BeforeEach void setup() { - PersistenceProvider.CACHE.clear(); + Map cache = (Map) ReflectionTestUtils.getField(PersistenceProvider.class, "CACHE"); + cache.clear(); this.shadowingClassLoader = new ShadowingClassLoader(getClass().getClassLoader()); } From e414b0924a8644c35ba3d69cba37239ab3f9a9a1 Mon Sep 17 00:00:00 2001 From: Mark Paluch Date: Tue, 29 Oct 2024 10:22:04 +0100 Subject: [PATCH 090/157] Polishing. Remove warnings. See #3592 --- .../test/java/org/springframework/data/envers/Config.java | 1 - spring-data-jpa/pom.xml | 7 +++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/spring-data-envers/src/test/java/org/springframework/data/envers/Config.java b/spring-data-envers/src/test/java/org/springframework/data/envers/Config.java index e6fb10fc29..5f636e65e5 100755 --- a/spring-data-envers/src/test/java/org/springframework/data/envers/Config.java +++ b/spring-data-envers/src/test/java/org/springframework/data/envers/Config.java @@ -58,7 +58,6 @@ public PlatformTransactionManager transactionManager() throws SQLException { public AbstractEntityManagerFactoryBean entityManagerFactory() throws SQLException { HibernateJpaVendorAdapter jpaVendorAdapter = new HibernateJpaVendorAdapter(); - jpaVendorAdapter.setDatabase(Database.H2); jpaVendorAdapter.setGenerateDdl(true); LocalContainerEntityManagerFactoryBean bean = new LocalContainerEntityManagerFactoryBean(); diff --git a/spring-data-jpa/pom.xml b/spring-data-jpa/pom.xml index c9dacfcc88..f5bd318688 100644 --- a/spring-data-jpa/pom.xml +++ b/spring-data-jpa/pom.xml @@ -46,6 +46,13 @@ spring-aop + + org.aspectj + aspectjrt + ${aspectj} + true + + org.springframework spring-tx From 6c73c2ee25a86ac99e5bcdf42ff39b2db7de9a55 Mon Sep 17 00:00:00 2001 From: Mark Paluch Date: Thu, 7 Nov 2024 09:49:34 +0100 Subject: [PATCH 091/157] Upgrade to Maven Wrapper 3.9.9. See #3664 --- .mvn/wrapper/maven-wrapper.properties | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.mvn/wrapper/maven-wrapper.properties b/.mvn/wrapper/maven-wrapper.properties index 6977100838..634b055082 100755 --- a/.mvn/wrapper/maven-wrapper.properties +++ b/.mvn/wrapper/maven-wrapper.properties @@ -1,2 +1,2 @@ -#Thu Aug 08 10:18:11 CEST 2024 -distributionUrl=https\://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.8/apache-maven-3.9.8-bin.zip +#Thu Nov 07 09:49:34 CET 2024 +distributionUrl=https\://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.9/apache-maven-3.9.9-bin.zip From c5eb13e5d7bdf9523d5061736628666e8fc5c659 Mon Sep 17 00:00:00 2001 From: Mark Paluch Date: Thu, 7 Nov 2024 09:59:10 +0100 Subject: [PATCH 092/157] Update CI Properties. See #3645 --- ci/pipeline.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/pipeline.properties b/ci/pipeline.properties index 40bb349196..6dff72206e 100644 --- a/ci/pipeline.properties +++ b/ci/pipeline.properties @@ -1,5 +1,5 @@ # Java versions -java.main.tag=17.0.12_7-jdk-focal +java.main.tag=17.0.13_11-jdk-focal java.next.tag=22.0.2_9-jdk-jammy # Docker container images - standard From 186af9cb4df1ed45412bb54f6d07677dd205bf58 Mon Sep 17 00:00:00 2001 From: Mark Paluch Date: Mon, 11 Nov 2024 09:54:42 +0100 Subject: [PATCH 093/157] Upgrade test dependency versions. See #3645 --- pom.xml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pom.xml b/pom.xml index 0ea21523bb..fb4b6670d0 100755 --- a/pom.xml +++ b/pom.xml @@ -36,12 +36,12 @@ 6.6.2-SNAPSHOT 7.0.0.Beta1 7.0.0-SNAPSHOT - 2.7.1 -

2.2.220

+ 2.7.4 +

2.3.232

3.1.0 4.9 - 8.0.33 - 42.6.0 + 9.1.0 + 42.7.4 3.3.6-SNAPSHOT 0.10.3 From c9aa45e95f22254e75ba30d45b9de8a7ad321a3e Mon Sep 17 00:00:00 2001 From: PgmJun <84304802+PgmJun@users.noreply.github.com> Date: Sat, 9 Nov 2024 02:20:11 +0900 Subject: [PATCH 094/157] Polishing. Remove unnecessary semicolons DefaultRevisionMetadataUnitTests class. Original pull request: #3670 Closes #3669 --- .../repository/support/DefaultRevisionMetadataUnitTests.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spring-data-envers/src/test/java/org/springframework/data/envers/repository/support/DefaultRevisionMetadataUnitTests.java b/spring-data-envers/src/test/java/org/springframework/data/envers/repository/support/DefaultRevisionMetadataUnitTests.java index fe99891683..930b20be20 100644 --- a/spring-data-envers/src/test/java/org/springframework/data/envers/repository/support/DefaultRevisionMetadataUnitTests.java +++ b/spring-data-envers/src/test/java/org/springframework/data/envers/repository/support/DefaultRevisionMetadataUnitTests.java @@ -34,7 +34,7 @@ */ class DefaultRevisionMetadataUnitTests { - private static final Instant NOW = Instant.now();; + private static final Instant NOW = Instant.now(); @Test // #112 void createsLocalDateTimeFromTimestamp() { From ae52d70d4a0eb44fc356e16c8954870e34039a26 Mon Sep 17 00:00:00 2001 From: Mark Paluch Date: Thu, 14 Nov 2024 10:31:37 +0100 Subject: [PATCH 095/157] Reflect `IS NULL`/`IS NOT NULL` usage for derived queries using `null` as argument. Closes #3674 --- src/main/antora/modules/ROOT/pages/jpa/query-methods.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/antora/modules/ROOT/pages/jpa/query-methods.adoc b/src/main/antora/modules/ROOT/pages/jpa/query-methods.adoc index 097ed6cae6..81eee4ecb1 100644 --- a/src/main/antora/modules/ROOT/pages/jpa/query-methods.adoc +++ b/src/main/antora/modules/ROOT/pages/jpa/query-methods.adoc @@ -44,7 +44,7 @@ The following table describes the keywords supported for JPA and what a method c |`Distinct`|`findDistinctByLastnameAndFirstname`|`select distinct ... where x.lastname = ?1 and x.firstname = ?2` |`And`|`findByLastnameAndFirstname`|`… where x.lastname = ?1 and x.firstname = ?2` |`Or`|`findByLastnameOrFirstname`|`… where x.lastname = ?1 or x.firstname = ?2` -|`Is`, `Equals`|`findByFirstname`,`findByFirstnameIs`,`findByFirstnameEquals`|`… where x.firstname = ?1` +|`Is`, `Equals`|`findByFirstname`,`findByFirstnameIs`,`findByFirstnameEquals`|`… where x.firstname = ?1` (or `… where x.firstname IS NULL` if the argument is `null`) |`Between`|`findByStartDateBetween`|`… where x.startDate between ?1 and ?2` |`LessThan`|`findByAgeLessThan`|`… where x.age < ?1` |`LessThanEqual`|`findByAgeLessThanEqual`|`… where x.age \<= ?1` From 4eff643fd10b2ff5ab99ee4851dd495cf3f4897e Mon Sep 17 00:00:00 2001 From: Mark Paluch Date: Fri, 15 Nov 2024 11:45:22 +0100 Subject: [PATCH 096/157] Prepare 3.3.6 (2024.0.6). See #3645 --- pom.xml | 20 ++++---------------- 1 file changed, 4 insertions(+), 16 deletions(-) diff --git a/pom.xml b/pom.xml index fb4b6670d0..888f2e1e93 100755 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ org.springframework.data.build spring-data-parent - 3.3.6-SNAPSHOT + 3.3.6 @@ -42,7 +42,7 @@ 4.9 9.1.0 42.7.4 - 3.3.6-SNAPSHOT + 3.3.6 0.10.3 org.hibernate @@ -286,20 +286,8 @@ - - spring-snapshot - https://repo.spring.io/snapshot - - true - - - false - - - - spring-milestone - https://repo.spring.io/milestone - + + From 243a93bf7c2c15ff9ad95278d4cd3be49a3703d4 Mon Sep 17 00:00:00 2001 From: Mark Paluch Date: Fri, 15 Nov 2024 11:45:37 +0100 Subject: [PATCH 097/157] Release version 3.3.6 (2024.0.6). See #3645 --- pom.xml | 2 +- spring-data-envers/pom.xml | 4 ++-- spring-data-jpa-distribution/pom.xml | 2 +- spring-data-jpa/pom.xml | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/pom.xml b/pom.xml index 888f2e1e93..923fdbe49d 100755 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ org.springframework.data spring-data-jpa-parent - 3.3.6-SNAPSHOT + 3.3.6 pom Spring Data JPA Parent diff --git a/spring-data-envers/pom.xml b/spring-data-envers/pom.xml index 7b9b5ca6b1..1b44900d75 100755 --- a/spring-data-envers/pom.xml +++ b/spring-data-envers/pom.xml @@ -5,12 +5,12 @@ org.springframework.data spring-data-envers - 3.3.6-SNAPSHOT + 3.3.6 org.springframework.data spring-data-jpa-parent - 3.3.6-SNAPSHOT + 3.3.6 ../pom.xml diff --git a/spring-data-jpa-distribution/pom.xml b/spring-data-jpa-distribution/pom.xml index 22289e68e0..52f137c5ff 100644 --- a/spring-data-jpa-distribution/pom.xml +++ b/spring-data-jpa-distribution/pom.xml @@ -14,7 +14,7 @@ org.springframework.data spring-data-jpa-parent - 3.3.6-SNAPSHOT + 3.3.6 ../pom.xml diff --git a/spring-data-jpa/pom.xml b/spring-data-jpa/pom.xml index f5bd318688..f08ce35951 100644 --- a/spring-data-jpa/pom.xml +++ b/spring-data-jpa/pom.xml @@ -6,7 +6,7 @@ org.springframework.data spring-data-jpa - 3.3.6-SNAPSHOT + 3.3.6 Spring Data JPA Spring Data module for JPA repositories. @@ -15,7 +15,7 @@ org.springframework.data spring-data-jpa-parent - 3.3.6-SNAPSHOT + 3.3.6 ../pom.xml From 5796eb88cf50f0f86eb1035486c8159a4239f5ab Mon Sep 17 00:00:00 2001 From: Mark Paluch Date: Fri, 15 Nov 2024 11:47:56 +0100 Subject: [PATCH 098/157] Prepare next development iteration. See #3645 --- pom.xml | 2 +- spring-data-envers/pom.xml | 4 ++-- spring-data-jpa-distribution/pom.xml | 2 +- spring-data-jpa/pom.xml | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/pom.xml b/pom.xml index 923fdbe49d..6ccf9e9e9f 100755 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ org.springframework.data spring-data-jpa-parent - 3.3.6 + 3.3.7-SNAPSHOT pom Spring Data JPA Parent diff --git a/spring-data-envers/pom.xml b/spring-data-envers/pom.xml index 1b44900d75..fe9f951e3c 100755 --- a/spring-data-envers/pom.xml +++ b/spring-data-envers/pom.xml @@ -5,12 +5,12 @@ org.springframework.data spring-data-envers - 3.3.6 + 3.3.7-SNAPSHOT org.springframework.data spring-data-jpa-parent - 3.3.6 + 3.3.7-SNAPSHOT ../pom.xml diff --git a/spring-data-jpa-distribution/pom.xml b/spring-data-jpa-distribution/pom.xml index 52f137c5ff..90cab99a17 100644 --- a/spring-data-jpa-distribution/pom.xml +++ b/spring-data-jpa-distribution/pom.xml @@ -14,7 +14,7 @@ org.springframework.data spring-data-jpa-parent - 3.3.6 + 3.3.7-SNAPSHOT ../pom.xml diff --git a/spring-data-jpa/pom.xml b/spring-data-jpa/pom.xml index f08ce35951..787331416a 100644 --- a/spring-data-jpa/pom.xml +++ b/spring-data-jpa/pom.xml @@ -6,7 +6,7 @@ org.springframework.data spring-data-jpa - 3.3.6 + 3.3.7-SNAPSHOT Spring Data JPA Spring Data module for JPA repositories. @@ -15,7 +15,7 @@ org.springframework.data spring-data-jpa-parent - 3.3.6 + 3.3.7-SNAPSHOT ../pom.xml From becdf40b17de685211b4a370370faa511ab54bf8 Mon Sep 17 00:00:00 2001 From: Mark Paluch Date: Fri, 15 Nov 2024 11:47:58 +0100 Subject: [PATCH 099/157] After release cleanups. See #3645 --- pom.xml | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/pom.xml b/pom.xml index 6ccf9e9e9f..cc8a316ec6 100755 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ org.springframework.data.build spring-data-parent - 3.3.6 + 3.3.7-SNAPSHOT @@ -42,7 +42,7 @@ 4.9 9.1.0 42.7.4 - 3.3.6 + 3.3.7-SNAPSHOT 0.10.3 org.hibernate @@ -286,8 +286,20 @@ - - + + spring-snapshot + https://repo.spring.io/snapshot + + true + + + false + + + + spring-milestone + https://repo.spring.io/milestone + From 7bcc96d84be802872052acc1b7b141d2fd1657e8 Mon Sep 17 00:00:00 2001 From: Christoph Strobl Date: Fri, 26 Apr 2024 15:58:28 +0200 Subject: [PATCH 100/157] Update Projection section in reference documentation. For the time being we at least now document the current behaviour and how to cope with it. Closes: #3286 Original pull request: #3449 --- .../ROOT/pages/repositories/projections.adoc | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/src/main/antora/modules/ROOT/pages/repositories/projections.adoc b/src/main/antora/modules/ROOT/pages/repositories/projections.adoc index 556eebe91f..04ad285e4e 100644 --- a/src/main/antora/modules/ROOT/pages/repositories/projections.adoc +++ b/src/main/antora/modules/ROOT/pages/repositories/projections.adoc @@ -15,3 +15,28 @@ include::{commons}@data-commons::page$repositories/projections-interface.adoc[le include::{commons}@data-commons::page$repositories/projections-class.adoc[leveloffset=1] + +[NOTE] +==== +Some JPA providers may require additional hints when working with <> especially when using those directly with method derived queries. +If you are facing errors like `JpaSystemException: Specified result type did not match Query selection type` make sure to provide a constructor hint via `@PersistenceCreator` to be passed on, as outlined below: + +[source,java] +---- +public class NamesOnly { + + private final String firstname; + private final String lastname; + + protected NamesOnly() { } + + @PersistenceCreator + public NamesOnly(String firstname, String lastname) { + this.firstname = firstname; + this.lastname = lastname; + } + + // ... +} +---- +==== From df04b0253f380a031a82a949777890a13e0717c3 Mon Sep 17 00:00:00 2001 From: Mark Paluch Date: Tue, 3 Dec 2024 10:29:29 +0100 Subject: [PATCH 101/157] Polishing. Tweak wording. See: #3286 Original pull request: #3449 --- .../antora/modules/ROOT/pages/repositories/projections.adoc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main/antora/modules/ROOT/pages/repositories/projections.adoc b/src/main/antora/modules/ROOT/pages/repositories/projections.adoc index 04ad285e4e..3c6bca8320 100644 --- a/src/main/antora/modules/ROOT/pages/repositories/projections.adoc +++ b/src/main/antora/modules/ROOT/pages/repositories/projections.adoc @@ -18,8 +18,9 @@ include::{commons}@data-commons::page$repositories/projections-class.adoc[levelo [NOTE] ==== -Some JPA providers may require additional hints when working with <> especially when using those directly with method derived queries. -If you are facing errors like `JpaSystemException: Specified result type did not match Query selection type` make sure to provide a constructor hint via `@PersistenceCreator` to be passed on, as outlined below: +<> types must declare a single constructor so that Spring Data can determine its input properties. +If your class defines more than one constructor, then you cannot use the type without further hints for DTO projections. +In such a case annotate the desired constructor with `@PersistenceCreator` as outlined below so that Spring Data can determine which properties to select: [source,java] ---- From 29f16ab09f12c24d4e6ef1ce53ef91d6473d0772 Mon Sep 17 00:00:00 2001 From: Hyeon Sung Date: Mon, 2 Dec 2024 16:50:11 +0900 Subject: [PATCH 102/157] Extract repeated string literals in `SimpleJpaRepository` to constants. Closes #3698 --- .../support/SimpleJpaRepository.java | 22 +++++++++++-------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/SimpleJpaRepository.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/SimpleJpaRepository.java index d170a8acfc..f40821ab30 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/SimpleJpaRepository.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/SimpleJpaRepository.java @@ -100,7 +100,11 @@ public class SimpleJpaRepository implements JpaRepositoryImplementation entityInformation; private final EntityManager entityManager; @@ -190,7 +194,7 @@ public void deleteById(ID id) { @SuppressWarnings("unchecked") public void delete(T entity) { - Assert.notNull(entity, "Entity must not be null"); + Assert.notNull(entity, ENTITY_MUST_NOT_BE_NULL); if (entityInformation.isNew(entity)) { return; @@ -495,8 +499,8 @@ public long delete(@Nullable Specification spec) { @Override public R findBy(Specification spec, Function, R> queryFunction) { - Assert.notNull(spec, "Specification must not be null"); - Assert.notNull(queryFunction, "Query function must not be null"); + Assert.notNull(spec, SPECIFICATION_MUST_NOT_BE_NULL); + Assert.notNull(queryFunction, QUERY_FUNCTION_MUST_NOT_BE_NULL); return doFindBy(spec, getDomainClass(), queryFunction); } @@ -504,8 +508,8 @@ public R findBy(Specification spec, Function R doFindBy(Specification spec, Class domainClass, Function, R> queryFunction) { - Assert.notNull(spec, "Specification must not be null"); - Assert.notNull(queryFunction, "Query function must not be null"); + Assert.notNull(spec, SPECIFICATION_MUST_NOT_BE_NULL); + Assert.notNull(queryFunction, QUERY_FUNCTION_MUST_NOT_BE_NULL); ScrollQueryFactory scrollFunction = (sort, scrollPosition) -> { @@ -594,8 +598,8 @@ public Page findAll(Example example, Pageable pageable) { @Override public R findBy(Example example, Function, R> queryFunction) { - Assert.notNull(example, "Example must not be null"); - Assert.notNull(queryFunction, "Query function must not be null"); + Assert.notNull(example, EXAMPLE_MUST_NOT_BE_NULL); + Assert.notNull(queryFunction, QUERY_FUNCTION_MUST_NOT_BE_NULL); ExampleSpecification spec = new ExampleSpecification<>(example, escapeCharacter); Class probeType = example.getProbeType(); @@ -622,7 +626,7 @@ public long count(@Nullable Specification spec) { @Transactional public S save(S entity) { - Assert.notNull(entity, "Entity must not be null"); + Assert.notNull(entity, ENTITY_MUST_NOT_BE_NULL); if (entityInformation.isNew(entity)) { entityManager.persist(entity); @@ -997,7 +1001,7 @@ private static class ExampleSpecification implements Specification { */ ExampleSpecification(Example example, EscapeCharacter escapeCharacter) { - Assert.notNull(example, "Example must not be null"); + Assert.notNull(example, EXAMPLE_MUST_NOT_BE_NULL); Assert.notNull(escapeCharacter, "EscapeCharacter must not be null"); this.example = example; From 3cc84e85f05c54f48d948d9546ed9eec933d12d9 Mon Sep 17 00:00:00 2001 From: Mark Paluch Date: Tue, 10 Dec 2024 10:15:19 +0100 Subject: [PATCH 103/157] Polishing. Extract assertion message constants from QuerydslJpaPredicateExecutor. See #3698 --- .../support/QuerydslJpaPredicateExecutor.java | 30 +++++++++++-------- 1 file changed, 18 insertions(+), 12 deletions(-) diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/QuerydslJpaPredicateExecutor.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/QuerydslJpaPredicateExecutor.java index c16f95c0a1..08f3b7ab07 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/QuerydslJpaPredicateExecutor.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/QuerydslJpaPredicateExecutor.java @@ -75,6 +75,12 @@ */ public class QuerydslJpaPredicateExecutor implements QuerydslPredicateExecutor, JpaRepositoryConfigurationAware { + private static final String PREDICATE_MUST_NOT_BE_NULL = "Predicate must not be null"; + private static final String ORDER_SPECIFIERS_MUST_NOT_BE_NULL = "Order specifiers must not be null"; + private static final String SORT_MUST_NOT_BE_NULL = "Sort must not be null"; + private static final String PAGEABLE_MUST_NOT_BE_NULL = "Pageable must not be null"; + private static final String QUERY_FUNCTION_MUST_NOT_BE_NULL = "Query function must not be null"; + private final JpaEntityInformation entityInformation; private final EntityPath path; private final Querydsl querydsl; @@ -116,7 +122,7 @@ public void setProjectionFactory(ProjectionFactory projectionFactory) { @Override public Optional findOne(Predicate predicate) { - Assert.notNull(predicate, "Predicate must not be null"); + Assert.notNull(predicate, PREDICATE_MUST_NOT_BE_NULL); try { return Optional.ofNullable(createQuery(predicate).select(path).limit(2).fetchOne()); @@ -128,7 +134,7 @@ public Optional findOne(Predicate predicate) { @Override public List findAll(Predicate predicate) { - Assert.notNull(predicate, "Predicate must not be null"); + Assert.notNull(predicate, PREDICATE_MUST_NOT_BE_NULL); return createQuery(predicate).select(path).fetch(); } @@ -136,8 +142,8 @@ public List findAll(Predicate predicate) { @Override public List findAll(Predicate predicate, OrderSpecifier... orders) { - Assert.notNull(predicate, "Predicate must not be null"); - Assert.notNull(orders, "Order specifiers must not be null"); + Assert.notNull(predicate, PREDICATE_MUST_NOT_BE_NULL); + Assert.notNull(orders, ORDER_SPECIFIERS_MUST_NOT_BE_NULL); return executeSorted(createQuery(predicate).select(path), orders); } @@ -145,8 +151,8 @@ public List findAll(Predicate predicate, OrderSpecifier... orders) { @Override public List findAll(Predicate predicate, Sort sort) { - Assert.notNull(predicate, "Predicate must not be null"); - Assert.notNull(sort, "Sort must not be null"); + Assert.notNull(predicate, PREDICATE_MUST_NOT_BE_NULL); + Assert.notNull(sort, SORT_MUST_NOT_BE_NULL); return executeSorted(createQuery(predicate).select(path), sort); } @@ -154,7 +160,7 @@ public List findAll(Predicate predicate, Sort sort) { @Override public List findAll(OrderSpecifier... orders) { - Assert.notNull(orders, "Order specifiers must not be null"); + Assert.notNull(orders, ORDER_SPECIFIERS_MUST_NOT_BE_NULL); return executeSorted(createQuery(new Predicate[0]).select(path), orders); } @@ -162,8 +168,8 @@ public List findAll(OrderSpecifier... orders) { @Override public Page findAll(Predicate predicate, Pageable pageable) { - Assert.notNull(predicate, "Predicate must not be null"); - Assert.notNull(pageable, "Pageable must not be null"); + Assert.notNull(predicate, PREDICATE_MUST_NOT_BE_NULL); + Assert.notNull(pageable, PAGEABLE_MUST_NOT_BE_NULL); final JPQLQuery countQuery = createCountQuery(predicate); JPQLQuery query = querydsl.applyPagination(pageable, createQuery(predicate).select(path)); @@ -175,8 +181,8 @@ public Page findAll(Predicate predicate, Pageable pageable) { @Override public R findBy(Predicate predicate, Function, R> queryFunction) { - Assert.notNull(predicate, "Predicate must not be null"); - Assert.notNull(queryFunction, "Query function must not be null"); + Assert.notNull(predicate, PREDICATE_MUST_NOT_BE_NULL); + Assert.notNull(queryFunction, QUERY_FUNCTION_MUST_NOT_BE_NULL); Function> finder = sort -> { AbstractJPAQuery select = (AbstractJPAQuery) createQuery(predicate).select(path); @@ -260,7 +266,7 @@ public boolean exists(Predicate predicate) { */ protected AbstractJPAQuery createQuery(Predicate... predicate) { - Assert.notNull(predicate, "Predicate must not be null"); + Assert.notNull(predicate, PREDICATE_MUST_NOT_BE_NULL); AbstractJPAQuery query = doCreateQuery(getQueryHints().withFetchGraphs(entityManager), predicate); CrudMethodMetadata metadata = getRepositoryMethodMetadata(); From 9f7c591963d6570138cf8cd329406fe5fc6a78f6 Mon Sep 17 00:00:00 2001 From: Mark Paluch Date: Tue, 10 Dec 2024 15:17:37 +0100 Subject: [PATCH 104/157] Use primary table alias for SQL count query derivation with DISTINCT queries. We now use render COUNT(DISTINCT a.*) where 'a' is the primary table alias instead of COUNT(DISTINCT *). Closes #3707 --- .../query/JSqlParserQueryEnhancer.java | 18 ++++++++++++------ .../JSqlParserQueryEnhancerUnitTests.java | 16 ++++++++++++++++ 2 files changed, 28 insertions(+), 6 deletions(-) diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/JSqlParserQueryEnhancer.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/JSqlParserQueryEnhancer.java index a76e04d5e7..1fbc87d17a 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/JSqlParserQueryEnhancer.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/JSqlParserQueryEnhancer.java @@ -58,6 +58,7 @@ * @author Geoffrey Deremetz * @author Yanming Zhou * @author Christoph Strobl + * @author Mark Paluch * @since 2.7.0 */ public class JSqlParserQueryEnhancer implements QueryEnhancer { @@ -119,7 +120,7 @@ public String applySorting(Sort sort, @Nullable String alias) { Select selectStatement = parseSelectStatement(queryString); - if (selectStatement instanceof SetOperationList setOperationList) { + if (selectStatement instanceof SetOperationList setOperationList) { return applySortingToSetOperationList(setOperationList, sort); } @@ -217,7 +218,7 @@ private Set getJoinAliases(String query) { } Select selectStatement = (Select) statement; - if (selectStatement instanceof PlainSelect selectBody) { + if (selectStatement instanceof PlainSelect selectBody) { return getJoinAliases(selectBody); } @@ -315,7 +316,7 @@ private String detectAlias(String query) { * ValuesStatement has no alias * SetOperation can have multiple alias for each operation item */ - if (!(selectStatement instanceof PlainSelect selectBody)) { + if (!(selectStatement instanceof PlainSelect selectBody)) { return null; } @@ -370,7 +371,7 @@ public String createCountQueryFor(@Nullable String countProjection) { /* We only support count queries for {@link PlainSelect}. */ - if (!(selectStatement instanceof PlainSelect selectBody)) { + if (!(selectStatement instanceof PlainSelect selectBody)) { return this.query.getQueryString(); } @@ -413,7 +414,7 @@ public String getProjection() { Select selectBody = selectStatement; - if (selectStatement instanceof SetOperationList setOperationList) { + if (selectStatement instanceof SetOperationList setOperationList) { // using the first one since for setoperations the projection has to be the same selectBody = setOperationList.getSelects().get(0); @@ -491,7 +492,12 @@ private String countPropertyNameForSelection(List> selectItems, bo return column.getFullyQualifiedName(); } - return query.isNativeQuery() ? (distinct ? "*" : "1") : tableAlias == null ? "*" : tableAlias; + // TODO: We should not handle JPQL here... + if (!query.isNativeQuery()) { + return tableAlias == null ? "*" : tableAlias; + } + + return distinct ? ((tableAlias != null ? tableAlias + "." : "") + "*") : "1"; } @Override diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/JSqlParserQueryEnhancerUnitTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/JSqlParserQueryEnhancerUnitTests.java index a1f3015b59..1269fe23f0 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/JSqlParserQueryEnhancerUnitTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/JSqlParserQueryEnhancerUnitTests.java @@ -51,6 +51,22 @@ void shouldApplySorting() { assertThat(sql).isEqualTo("SELECT e FROM Employee e ORDER BY e.foo ASC, e.bar ASC"); } + @Test // GH-3707 + void countQueriesShouldConsiderPrimaryTableAlias() { + + QueryEnhancer enhancer = createQueryEnhancer(DeclaredQuery.of(""" + SELECT DISTINCT a.*, b.b1 + FROM TableA a + JOIN TableB b ON a.b = b.b + LEFT JOIN TableC c ON b.c = c.c + ORDER BY b.b1, a.a1, a.a2 + """, true)); + + String sql = enhancer.createCountQueryFor(); + + assertThat(sql).startsWith("SELECT count(DISTINCT a.*) FROM TableA a"); + } + @Override @ParameterizedTest // GH-2773 @MethodSource("jpqlCountQueries") From a6ec51ffb0835fd54f9291f1222c6a8d2af86c07 Mon Sep 17 00:00:00 2001 From: Christoph Strobl Date: Fri, 13 Dec 2024 10:50:50 +0100 Subject: [PATCH 105/157] Prepare 3.3.7 (2024.0.7). See #3677 --- pom.xml | 20 ++++---------------- 1 file changed, 4 insertions(+), 16 deletions(-) diff --git a/pom.xml b/pom.xml index cc8a316ec6..daf1c96a04 100755 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ org.springframework.data.build spring-data-parent - 3.3.7-SNAPSHOT + 3.3.7 @@ -42,7 +42,7 @@ 4.9 9.1.0 42.7.4 - 3.3.7-SNAPSHOT + 3.3.7 0.10.3 org.hibernate @@ -286,20 +286,8 @@ - - spring-snapshot - https://repo.spring.io/snapshot - - true - - - false - - - - spring-milestone - https://repo.spring.io/milestone - + + From ea4ddbde517d7b38051d9c813718696934b15858 Mon Sep 17 00:00:00 2001 From: Christoph Strobl Date: Fri, 13 Dec 2024 10:51:12 +0100 Subject: [PATCH 106/157] Release version 3.3.7 (2024.0.7). See #3677 --- pom.xml | 2 +- spring-data-envers/pom.xml | 4 ++-- spring-data-jpa-distribution/pom.xml | 2 +- spring-data-jpa/pom.xml | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/pom.xml b/pom.xml index daf1c96a04..596ebbd55e 100755 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ org.springframework.data spring-data-jpa-parent - 3.3.7-SNAPSHOT + 3.3.7 pom Spring Data JPA Parent diff --git a/spring-data-envers/pom.xml b/spring-data-envers/pom.xml index fe9f951e3c..bd82e28ec8 100755 --- a/spring-data-envers/pom.xml +++ b/spring-data-envers/pom.xml @@ -5,12 +5,12 @@ org.springframework.data spring-data-envers - 3.3.7-SNAPSHOT + 3.3.7 org.springframework.data spring-data-jpa-parent - 3.3.7-SNAPSHOT + 3.3.7 ../pom.xml diff --git a/spring-data-jpa-distribution/pom.xml b/spring-data-jpa-distribution/pom.xml index 90cab99a17..8ae45876f1 100644 --- a/spring-data-jpa-distribution/pom.xml +++ b/spring-data-jpa-distribution/pom.xml @@ -14,7 +14,7 @@ org.springframework.data spring-data-jpa-parent - 3.3.7-SNAPSHOT + 3.3.7 ../pom.xml diff --git a/spring-data-jpa/pom.xml b/spring-data-jpa/pom.xml index 787331416a..c94f7b8dcd 100644 --- a/spring-data-jpa/pom.xml +++ b/spring-data-jpa/pom.xml @@ -6,7 +6,7 @@ org.springframework.data spring-data-jpa - 3.3.7-SNAPSHOT + 3.3.7 Spring Data JPA Spring Data module for JPA repositories. @@ -15,7 +15,7 @@ org.springframework.data spring-data-jpa-parent - 3.3.7-SNAPSHOT + 3.3.7 ../pom.xml From ad50795fb1d5eff4541eb9db83d72544510b8266 Mon Sep 17 00:00:00 2001 From: Christoph Strobl Date: Fri, 13 Dec 2024 10:54:20 +0100 Subject: [PATCH 107/157] Prepare next development iteration. See #3677 --- pom.xml | 2 +- spring-data-envers/pom.xml | 4 ++-- spring-data-jpa-distribution/pom.xml | 2 +- spring-data-jpa/pom.xml | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/pom.xml b/pom.xml index 596ebbd55e..6434196478 100755 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ org.springframework.data spring-data-jpa-parent - 3.3.7 + 3.3.8-SNAPSHOT pom Spring Data JPA Parent diff --git a/spring-data-envers/pom.xml b/spring-data-envers/pom.xml index bd82e28ec8..f8455967c2 100755 --- a/spring-data-envers/pom.xml +++ b/spring-data-envers/pom.xml @@ -5,12 +5,12 @@ org.springframework.data spring-data-envers - 3.3.7 + 3.3.8-SNAPSHOT org.springframework.data spring-data-jpa-parent - 3.3.7 + 3.3.8-SNAPSHOT ../pom.xml diff --git a/spring-data-jpa-distribution/pom.xml b/spring-data-jpa-distribution/pom.xml index 8ae45876f1..fa59854c2d 100644 --- a/spring-data-jpa-distribution/pom.xml +++ b/spring-data-jpa-distribution/pom.xml @@ -14,7 +14,7 @@ org.springframework.data spring-data-jpa-parent - 3.3.7 + 3.3.8-SNAPSHOT ../pom.xml diff --git a/spring-data-jpa/pom.xml b/spring-data-jpa/pom.xml index c94f7b8dcd..6dadcddbf4 100644 --- a/spring-data-jpa/pom.xml +++ b/spring-data-jpa/pom.xml @@ -6,7 +6,7 @@ org.springframework.data spring-data-jpa - 3.3.7 + 3.3.8-SNAPSHOT Spring Data JPA Spring Data module for JPA repositories. @@ -15,7 +15,7 @@ org.springframework.data spring-data-jpa-parent - 3.3.7 + 3.3.8-SNAPSHOT ../pom.xml From 191939b0c869744f04f431c1b5f877d992e6f83e Mon Sep 17 00:00:00 2001 From: Christoph Strobl Date: Fri, 13 Dec 2024 10:54:22 +0100 Subject: [PATCH 108/157] After release cleanups. See #3677 --- pom.xml | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/pom.xml b/pom.xml index 6434196478..9e79992d88 100755 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ org.springframework.data.build spring-data-parent - 3.3.7 + 3.3.8-SNAPSHOT @@ -42,7 +42,7 @@ 4.9 9.1.0 42.7.4 - 3.3.7 + 3.3.8-SNAPSHOT 0.10.3 org.hibernate @@ -286,8 +286,20 @@ - - + + spring-snapshot + https://repo.spring.io/snapshot + + true + + + false + + + + spring-milestone + https://repo.spring.io/milestone + From 31173825c3edc6ffdaf8fe20e55545cd591a0a11 Mon Sep 17 00:00:00 2001 From: Mark Paluch Date: Wed, 8 Jan 2025 09:55:57 +0100 Subject: [PATCH 109/157] Extend license header copyright years to 2025. See #3731 --- .../data/envers/repository/config/EnableEnversRepositories.java | 2 +- .../repository/support/DefaultRevisionEntityInformation.java | 2 +- .../data/envers/repository/support/DefaultRevisionMetadata.java | 2 +- .../envers/repository/support/EnversRevisionRepository.java | 2 +- .../repository/support/EnversRevisionRepositoryFactoryBean.java | 2 +- .../envers/repository/support/EnversRevisionRepositoryImpl.java | 2 +- .../repository/support/ReflectionRevisionEntityInformation.java | 2 +- .../src/test/java/org/springframework/data/envers/Config.java | 2 +- .../repository/support/DefaultRevisionMetadataUnitTests.java | 2 +- .../support/EnversRevisionRepositoryImplUnitTests.java | 2 +- .../repository/support/QueryDslRepositoryIntegrationTests.java | 2 +- .../envers/repository/support/RepositoryIntegrationTests.java | 2 +- .../org/springframework/data/envers/sample/AbstractEntity.java | 2 +- .../java/org/springframework/data/envers/sample/Country.java | 2 +- .../data/envers/sample/CountryQueryDslRepository.java | 2 +- .../springframework/data/envers/sample/CountryRepository.java | 2 +- .../data/envers/sample/CustomRevisionEntity.java | 2 +- .../data/envers/sample/CustomRevisionListener.java | 2 +- .../java/org/springframework/data/envers/sample/License.java | 2 +- .../springframework/data/envers/sample/LicenseRepository.java | 2 +- .../java/org/springframework/data/envers/sample/QCountry.java | 2 +- .../data/jpa/benchmark/RepositoryFinderBenchmarks.java | 2 +- .../data/jpa/benchmark/model/IPersonProjection.java | 2 +- .../org/springframework/data/jpa/benchmark/model/Person.java | 2 +- .../org/springframework/data/jpa/benchmark/model/Profile.java | 2 +- .../data/jpa/benchmark/repository/PersonRepository.java | 2 +- .../data/jpa/repository/query/HqlParserBenchmarks.java | 2 +- .../jpa/repository/query/JSqlParserQueryEnhancerBenchmarks.java | 2 +- .../data/jpa/convert/QueryByExamplePredicateBuilder.java | 2 +- .../data/jpa/convert/threeten/Jsr310JpaConverters.java | 2 +- .../org/springframework/data/jpa/domain/AbstractAuditable.java | 2 +- .../springframework/data/jpa/domain/AbstractPersistable.java | 2 +- .../main/java/org/springframework/data/jpa/domain/JpaSort.java | 2 +- .../java/org/springframework/data/jpa/domain/Specification.java | 2 +- .../data/jpa/domain/SpecificationComposition.java | 2 +- .../jpa/domain/support/AuditingBeanFactoryPostProcessor.java | 2 +- .../data/jpa/domain/support/AuditingEntityListener.java | 2 +- .../data/jpa/mapping/JpaMetamodelMappingContext.java | 2 +- .../springframework/data/jpa/mapping/JpaPersistentEntity.java | 2 +- .../data/jpa/mapping/JpaPersistentEntityImpl.java | 2 +- .../springframework/data/jpa/mapping/JpaPersistentProperty.java | 2 +- .../data/jpa/mapping/JpaPersistentPropertyImpl.java | 2 +- .../data/jpa/projection/CollectionAwareProjectionFactory.java | 2 +- .../org/springframework/data/jpa/provider/HibernateUtils.java | 2 +- .../org/springframework/data/jpa/provider/JpaClassUtils.java | 2 +- .../springframework/data/jpa/provider/PersistenceProvider.java | 2 +- .../org/springframework/data/jpa/provider/ProxyIdAccessor.java | 2 +- .../org/springframework/data/jpa/provider/QueryComment.java | 2 +- .../org/springframework/data/jpa/provider/QueryExtractor.java | 2 +- .../org/springframework/data/jpa/repository/EntityGraph.java | 2 +- .../org/springframework/data/jpa/repository/JpaContext.java | 2 +- .../org/springframework/data/jpa/repository/JpaRepository.java | 2 +- .../data/jpa/repository/JpaSpecificationExecutor.java | 2 +- .../main/java/org/springframework/data/jpa/repository/Lock.java | 2 +- .../main/java/org/springframework/data/jpa/repository/Meta.java | 2 +- .../java/org/springframework/data/jpa/repository/Modifying.java | 2 +- .../java/org/springframework/data/jpa/repository/Query.java | 2 +- .../org/springframework/data/jpa/repository/QueryHints.java | 2 +- .../org/springframework/data/jpa/repository/QueryRewriter.java | 2 +- .../java/org/springframework/data/jpa/repository/Temporal.java | 2 +- .../data/jpa/repository/aot/JpaRuntimeHints.java | 2 +- .../jpa/repository/cdi/BeanManagerQueryRewriterProvider.java | 2 +- .../data/jpa/repository/cdi/JpaRepositoryBean.java | 2 +- .../data/jpa/repository/cdi/JpaRepositoryExtension.java | 2 +- .../jpa/repository/config/AuditingBeanDefinitionParser.java | 2 +- .../data/jpa/repository/config/BeanDefinitionNames.java | 2 +- .../data/jpa/repository/config/EnableJpaAuditing.java | 2 +- .../data/jpa/repository/config/EnableJpaRepositories.java | 2 +- .../data/jpa/repository/config/InspectionClassLoader.java | 2 +- .../data/jpa/repository/config/JpaAuditingRegistrar.java | 2 +- .../config/JpaMetamodelMappingContextFactoryBean.java | 2 +- .../data/jpa/repository/config/JpaRepositoriesRegistrar.java | 2 +- .../jpa/repository/config/JpaRepositoryConfigExtension.java | 2 +- .../jpa/repository/config/JpaRepositoryNameSpaceHandler.java | 2 +- .../data/jpa/repository/query/AbstractJpaQuery.java | 2 +- .../data/jpa/repository/query/AbstractStringBasedJpaQuery.java | 2 +- .../data/jpa/repository/query/BadJpqlGrammarErrorListener.java | 2 +- .../data/jpa/repository/query/BadJpqlGrammarException.java | 2 +- .../jpa/repository/query/BeanFactoryQueryRewriterProvider.java | 2 +- .../data/jpa/repository/query/CollectionUtils.java | 2 +- .../data/jpa/repository/query/DeclaredQuery.java | 2 +- .../data/jpa/repository/query/DefaultJpaEntityMetadata.java | 2 +- .../data/jpa/repository/query/DefaultJpaQueryMethodFactory.java | 2 +- .../data/jpa/repository/query/DefaultQueryEnhancer.java | 2 +- .../data/jpa/repository/query/DelegatingQueryRewriter.java | 2 +- .../data/jpa/repository/query/EmptyDeclaredQuery.java | 2 +- .../data/jpa/repository/query/EqlQueryParser.java | 2 +- .../data/jpa/repository/query/EqlQueryRenderer.java | 2 +- .../data/jpa/repository/query/EqlQueryTransformer.java | 2 +- .../data/jpa/repository/query/EscapeCharacter.java | 2 +- .../data/jpa/repository/query/ExpressionBasedStringQuery.java | 2 +- .../query/HibernateJpaParametersParameterAccessor.java | 2 +- .../data/jpa/repository/query/HqlQueryParser.java | 2 +- .../data/jpa/repository/query/HqlQueryRenderer.java | 2 +- .../data/jpa/repository/query/HqlQueryTransformer.java | 2 +- .../jpa/repository/query/InvalidJpaQueryMethodException.java | 2 +- .../data/jpa/repository/query/JSqlParserQueryEnhancer.java | 2 +- .../data/jpa/repository/query/JSqlParserUtils.java | 2 +- .../springframework/data/jpa/repository/query/Jpa21Utils.java | 2 +- .../data/jpa/repository/query/JpaCountQueryCreator.java | 2 +- .../data/jpa/repository/query/JpaEntityGraph.java | 2 +- .../data/jpa/repository/query/JpaEntityMetadata.java | 2 +- .../data/jpa/repository/query/JpaKeysetScrollQueryCreator.java | 2 +- .../data/jpa/repository/query/JpaParameters.java | 2 +- .../jpa/repository/query/JpaParametersParameterAccessor.java | 2 +- .../data/jpa/repository/query/JpaQueryCreator.java | 2 +- .../data/jpa/repository/query/JpaQueryEnhancer.java | 2 +- .../data/jpa/repository/query/JpaQueryExecution.java | 2 +- .../data/jpa/repository/query/JpaQueryFactory.java | 2 +- .../data/jpa/repository/query/JpaQueryLookupStrategy.java | 2 +- .../data/jpa/repository/query/JpaQueryMethod.java | 2 +- .../data/jpa/repository/query/JpaQueryMethodFactory.java | 2 +- .../data/jpa/repository/query/JpaQueryParserSupport.java | 2 +- .../data/jpa/repository/query/JpaQueryParsingToken.java | 2 +- .../data/jpa/repository/query/JpaResultConverters.java | 2 +- .../data/jpa/repository/query/JpqlQueryParser.java | 2 +- .../data/jpa/repository/query/JpqlQueryRenderer.java | 2 +- .../data/jpa/repository/query/JpqlQueryTransformer.java | 2 +- .../data/jpa/repository/query/KeysetScrollDelegate.java | 2 +- .../data/jpa/repository/query/KeysetScrollSpecification.java | 2 +- .../org/springframework/data/jpa/repository/query/Meta.java | 2 +- .../springframework/data/jpa/repository/query/NamedQuery.java | 2 +- .../data/jpa/repository/query/NativeJpaQuery.java | 2 +- .../data/jpa/repository/query/ParameterBinder.java | 2 +- .../data/jpa/repository/query/ParameterBinderFactory.java | 2 +- .../data/jpa/repository/query/ParameterBinding.java | 2 +- .../data/jpa/repository/query/ParameterMetadataProvider.java | 2 +- .../data/jpa/repository/query/PartTreeJpaQuery.java | 2 +- .../springframework/data/jpa/repository/query/Procedure.java | 2 +- .../data/jpa/repository/query/ProcedureParameter.java | 2 +- .../data/jpa/repository/query/QueryEnhancer.java | 2 +- .../data/jpa/repository/query/QueryEnhancerFactory.java | 2 +- .../data/jpa/repository/query/QueryParameterSetter.java | 2 +- .../data/jpa/repository/query/QueryParameterSetterFactory.java | 2 +- .../data/jpa/repository/query/QueryRewriterProvider.java | 2 +- .../data/jpa/repository/query/QueryTransformers.java | 2 +- .../springframework/data/jpa/repository/query/QueryUtils.java | 2 +- .../data/jpa/repository/query/ScrollDelegate.java | 2 +- .../data/jpa/repository/query/SimpleJpaQuery.java | 2 +- .../jpa/repository/query/StoredProcedureAttributeSource.java | 2 +- .../data/jpa/repository/query/StoredProcedureAttributes.java | 2 +- .../data/jpa/repository/query/StoredProcedureJpaQuery.java | 2 +- .../springframework/data/jpa/repository/query/StringQuery.java | 2 +- .../data/jpa/repository/support/CrudMethodMetadata.java | 2 +- .../jpa/repository/support/CrudMethodMetadataPostProcessor.java | 2 +- .../data/jpa/repository/support/DefaultJpaContext.java | 2 +- .../data/jpa/repository/support/DefaultQueryHints.java | 2 +- .../data/jpa/repository/support/EntityGraphFactory.java | 2 +- .../EntityManagerBeanDefinitionRegistrarPostProcessor.java | 2 +- .../jpa/repository/support/FetchableFluentQueryByPredicate.java | 2 +- .../repository/support/FetchableFluentQueryBySpecification.java | 2 +- .../data/jpa/repository/support/FluentQuerySupport.java | 2 +- .../data/jpa/repository/support/JpaEntityInformation.java | 2 +- .../jpa/repository/support/JpaEntityInformationSupport.java | 2 +- .../jpa/repository/support/JpaEvaluationContextExtension.java | 2 +- .../jpa/repository/support/JpaMetamodelEntityInformation.java | 2 +- .../jpa/repository/support/JpaPersistableEntityInformation.java | 2 +- .../jpa/repository/support/JpaRepositoryConfigurationAware.java | 2 +- .../data/jpa/repository/support/JpaRepositoryFactory.java | 2 +- .../data/jpa/repository/support/JpaRepositoryFactoryBean.java | 2 +- .../jpa/repository/support/JpaRepositoryImplementation.java | 2 +- .../data/jpa/repository/support/MutableQueryHints.java | 2 +- .../data/jpa/repository/support/QueryHintValue.java | 2 +- .../springframework/data/jpa/repository/support/QueryHints.java | 2 +- .../springframework/data/jpa/repository/support/Querydsl.java | 2 +- .../jpa/repository/support/QuerydslJpaPredicateExecutor.java | 2 +- .../data/jpa/repository/support/QuerydslJpaRepository.java | 2 +- .../data/jpa/repository/support/QuerydslRepositorySupport.java | 2 +- .../data/jpa/repository/support/SimpleJpaRepository.java | 2 +- .../support/ClasspathScanningPersistenceUnitPostProcessor.java | 2 +- .../data/jpa/support/MergingPersistenceUnitManager.java | 2 +- .../org/springframework/data/jpa/support/PageableUtils.java | 2 +- .../org/springframework/data/jpa/util/BeanDefinitionUtils.java | 2 +- .../springframework/data/jpa/util/HibernateProxyDetector.java | 2 +- .../java/org/springframework/data/jpa/util/JpaMetamodel.java | 2 +- .../springframework/data/jpa/util/JpaMetamodelCacheCleanup.java | 2 +- .../java/org/springframework/data/jpa/AntlrVersionTests.java | 2 +- .../jpa/convert/QueryByExamplePredicateBuilderUnitTests.java | 2 +- .../data/jpa/convert/threeten/DateTimeSample.java | 2 +- .../convert/threeten/Jsr310JpaConvertersIntegrationTests.java | 2 +- .../data/jpa/convert/threeten/Jsr310JpaConvertersUnitTests.java | 2 +- .../java/org/springframework/data/jpa/domain/JpaSortTests.java | 2 +- .../springframework/data/jpa/domain/SpecificationUnitTests.java | 2 +- .../data/jpa/domain/sample/AbstractAnnotatedAuditable.java | 2 +- .../data/jpa/domain/sample/AbstractMappedType.java | 2 +- .../org/springframework/data/jpa/domain/sample/Account.java | 2 +- .../org/springframework/data/jpa/domain/sample/Address.java | 2 +- .../data/jpa/domain/sample/AnnotatedAuditableUser.java | 2 +- .../data/jpa/domain/sample/AuditableEmbeddable.java | 2 +- .../springframework/data/jpa/domain/sample/AuditableEntity.java | 2 +- .../springframework/data/jpa/domain/sample/AuditableRole.java | 2 +- .../springframework/data/jpa/domain/sample/AuditableUser.java | 2 +- .../data/jpa/domain/sample/AuditorAwareStub.java | 2 +- .../java/org/springframework/data/jpa/domain/sample/Book.java | 2 +- .../java/org/springframework/data/jpa/domain/sample/Child.java | 2 +- .../springframework/data/jpa/domain/sample/ConcreteType1.java | 2 +- .../springframework/data/jpa/domain/sample/ConcreteType2.java | 2 +- .../data/jpa/domain/sample/CustomAbstractPersistable.java | 2 +- .../org/springframework/data/jpa/domain/sample/Customer.java | 2 +- .../java/org/springframework/data/jpa/domain/sample/Dummy.java | 2 +- .../data/jpa/domain/sample/EmbeddedIdExampleDepartment.java | 2 +- .../data/jpa/domain/sample/EmbeddedIdExampleEmployee.java | 2 +- .../data/jpa/domain/sample/EmbeddedIdExampleEmployeePK.java | 2 +- .../data/jpa/domain/sample/EmployeeWithName.java | 2 +- .../data/jpa/domain/sample/EntityWithAssignedId.java | 2 +- .../data/jpa/domain/sample/IdClassExampleDepartment.java | 2 +- .../data/jpa/domain/sample/IdClassExampleEmployee.java | 2 +- .../data/jpa/domain/sample/IdClassExampleEmployeePK.java | 2 +- .../org/springframework/data/jpa/domain/sample/Invoice.java | 2 +- .../org/springframework/data/jpa/domain/sample/InvoiceItem.java | 2 +- .../java/org/springframework/data/jpa/domain/sample/Item.java | 2 +- .../java/org/springframework/data/jpa/domain/sample/ItemId.java | 2 +- .../org/springframework/data/jpa/domain/sample/ItemSite.java | 2 +- .../org/springframework/data/jpa/domain/sample/ItemSiteId.java | 2 +- .../org/springframework/data/jpa/domain/sample/MailMessage.java | 2 +- .../org/springframework/data/jpa/domain/sample/MailSender.java | 2 +- .../org/springframework/data/jpa/domain/sample/MailUser.java | 2 +- .../java/org/springframework/data/jpa/domain/sample/Order.java | 2 +- .../springframework/data/jpa/domain/sample/OrmXmlEntity.java | 2 +- .../java/org/springframework/data/jpa/domain/sample/Owner.java | 2 +- .../springframework/data/jpa/domain/sample/OwnerContainer.java | 2 +- .../java/org/springframework/data/jpa/domain/sample/Parent.java | 2 +- .../data/jpa/domain/sample/PersistableWithIdClass.java | 2 +- .../data/jpa/domain/sample/PersistableWithIdClassPK.java | 2 +- .../data/jpa/domain/sample/PersistableWithSingleIdClass.java | 2 +- .../data/jpa/domain/sample/PersistableWithSingleIdClassPK.java | 2 +- .../data/jpa/domain/sample/PrimitiveVersionProperty.java | 2 +- .../java/org/springframework/data/jpa/domain/sample/Role.java | 2 +- .../springframework/data/jpa/domain/sample/SampleEntity.java | 2 +- .../springframework/data/jpa/domain/sample/SampleEntityPK.java | 2 +- .../data/jpa/domain/sample/SampleWithPrimitiveId.java | 2 +- .../data/jpa/domain/sample/SampleWithTimestampVersion.java | 2 +- .../java/org/springframework/data/jpa/domain/sample/Site.java | 2 +- .../java/org/springframework/data/jpa/domain/sample/User.java | 2 +- .../data/jpa/domain/sample/UserSpecifications.java | 2 +- .../data/jpa/domain/sample/UserWithOptionalField.java | 2 +- .../data/jpa/domain/sample/UserWithOptionalFieldRepository.java | 2 +- .../springframework/data/jpa/domain/sample/VersionedUser.java | 2 +- .../support/AbstractAttributeConverterIntegrationTests.java | 2 +- .../AnnotationAuditingBeanFactoryPostProcessorUnitTests.java | 2 +- .../support/AuditingBeanFactoryPostProcessorUnitTests.java | 2 +- .../data/jpa/domain/support/AuditingEntityListenerTests.java | 2 +- .../support/AuditingEntityWithEmbeddableListenerTests.java | 2 +- .../data/jpa/domain/support/AuditingNamespaceUnitTests.java | 2 +- .../domain/support/QueryByExampleWithOptionalEmptyTests.java | 2 +- .../infrastructure/EclipseLinkMetamodelIntegrationTests.java | 2 +- .../jpa/infrastructure/HibernateMetamodelIntegrationTests.java | 2 +- .../data/jpa/infrastructure/HibernateTestUtils.java | 2 +- .../data/jpa/infrastructure/MetamodelIntegrationTests.java | 2 +- .../jpa/infrastructure/OpenJpaMetamodelIntegrationTests.java | 2 +- .../jpa/mapping/JpaMetamodelMappingContextIntegrationTests.java | 2 +- .../data/jpa/mapping/JpaMetamodelMappingContextUnitTests.java | 2 +- .../data/jpa/mapping/JpaPersistentPropertyImplUnitTests.java | 2 +- .../data/jpa/provider/PersistenceProviderIntegrationTests.java | 2 +- .../data/jpa/provider/PersistenceProviderUnitTests.java | 2 +- .../jpa/repository/AbstractPersistableIntegrationTests.java | 2 +- .../data/jpa/repository/CrudMethodMetadataUnitTests.java | 2 +- .../repository/CustomAbstractPersistableIntegrationTests.java | 2 +- .../data/jpa/repository/CustomEclipseLinkJpaVendorAdapter.java | 2 +- .../jpa/repository/CustomHsqlHibernateJpaVendorAdaptor.java | 2 +- ...EclipseLinkEntityGraphRepositoryMethodsIntegrationTests.java | 2 +- .../jpa/repository/EclipseLinkNamespaceUserRepositoryTests.java | 2 +- .../repository/EclipseLinkParentRepositoryIntegrationTests.java | 2 +- .../repository/EclipseLinkQueryByExampleIntegrationTests.java | 2 +- .../EclipseLinkRepositoryWithCompositeKeyIntegrationTests.java | 2 +- .../repository/EclipseLinkStoredProcedureIntegrationTests.java | 2 +- .../jpa/repository/EclipseLinkUserRepositoryFinderTests.java | 2 +- .../EntityGraphRepositoryMethodsIntegrationTests.java | 2 +- .../jpa/repository/EntityWithAssignedIdIntegrationTests.java | 2 +- .../org/springframework/data/jpa/repository/GreetingsFrom.java | 2 +- .../data/jpa/repository/JavaConfigUserRepositoryTests.java | 2 +- .../jpa/repository/MappedTypeRepositoryIntegrationTests.java | 2 +- .../data/jpa/repository/NamespaceUserRepositoryTests.java | 2 +- .../data/jpa/repository/ORMInfrastructureTests.java | 2 +- .../OpenJpaEntityGraphRepositoryMethodsIntegrationTests.java | 2 +- .../jpa/repository/OpenJpaNamespaceUserRepositoryTests.java | 2 +- .../jpa/repository/OpenJpaParentRepositoryIntegrationTests.java | 2 +- .../OpenJpaRepositoryWithCompositeKeyIntegrationTests.java | 2 +- .../jpa/repository/OpenJpaStoredProcedureIntegrationTests.java | 2 +- .../data/jpa/repository/OpenJpaUserRepositoryFinderTests.java | 2 +- .../data/jpa/repository/ParentRepositoryIntegrationTests.java | 2 +- .../data/jpa/repository/QueryByExampleIntegrationTests.java | 2 +- .../data/jpa/repository/RedeclaringRepositoryMethodsTests.java | 2 +- .../data/jpa/repository/RepositoryWithCompositeKeyTests.java | 2 +- .../data/jpa/repository/RepositoryWithIdClassKeyTests.java | 2 +- .../data/jpa/repository/RoleRepositoryIntegrationTests.java | 2 +- .../org/springframework/data/jpa/repository/SPR8954Tests.java | 2 +- .../data/jpa/repository/SimpleJpaParameterBindingTests.java | 2 +- .../data/jpa/repository/StoredProcedureIntegrationTests.java | 2 +- .../data/jpa/repository/UserRepositoryFinderTests.java | 2 +- .../UserRepositoryStoredProcedureIntegrationTests.java | 2 +- .../data/jpa/repository/UserRepositoryTests.java | 2 +- .../data/jpa/repository/aot/JpaRuntimeHintsUnitTests.java | 2 +- .../data/jpa/repository/cdi/CdiExtensionIntegrationTests.java | 2 +- .../data/jpa/repository/cdi/EntityManagerFactoryProducer.java | 2 +- .../repository/cdi/JpaQueryRewriterWithCdiIntegrationTests.java | 2 +- .../jpa/repository/cdi/JpaRepositoryExtensionUnitTests.java | 2 +- .../org/springframework/data/jpa/repository/cdi/Person.java | 2 +- .../org/springframework/data/jpa/repository/cdi/PersonDB.java | 2 +- .../data/jpa/repository/cdi/PersonRepository.java | 2 +- .../jpa/repository/cdi/QualifiedCustomizedCdiConfiguration.java | 2 +- .../jpa/repository/cdi/QualifiedCustomizedUserRepository.java | 2 +- .../repository/cdi/QualifiedCustomizedUserRepositoryBean.java | 2 +- .../repository/cdi/QualifiedCustomizedUserRepositoryCustom.java | 2 +- .../data/jpa/repository/cdi/QualifiedEntityManagerProducer.java | 2 +- .../data/jpa/repository/cdi/QualifiedFragment.java | 2 +- .../data/jpa/repository/cdi/QualifiedFragmentBean.java | 2 +- .../data/jpa/repository/cdi/QualifiedPersonRepository.java | 2 +- .../data/jpa/repository/cdi/RepositoryConsumer.java | 2 +- .../data/jpa/repository/cdi/SamplePersonRepository.java | 2 +- .../data/jpa/repository/cdi/SamplePersonRepositoryCustom.java | 2 +- .../data/jpa/repository/cdi/SamplePersonRepositoryImpl.java | 2 +- .../springframework/data/jpa/repository/cdi/Transactional.java | 2 +- .../data/jpa/repository/cdi/TransactionalInterceptor.java | 2 +- .../jpa/repository/cdi/UnqualifiedEntityManagerProducer.java | 2 +- .../data/jpa/repository/cdi/UnqualifiedPersonRepository.java | 2 +- .../org/springframework/data/jpa/repository/cdi/UserDB.java | 2 +- .../config/AbstractAuditingViaJavaConfigRepositoriesTests.java | 2 +- .../jpa/repository/config/AbstractRepositoryConfigTests.java | 2 +- .../config/AllowNestedRepositoriesRepositoryConfigTests.java | 2 +- .../repository/config/AuditingBeanDefinitionParserTests.java | 2 +- .../repository/config/CustomRepositoryFactoryConfigTests.java | 2 +- .../config/DefaultAuditingViaJavaConfigRepositoriesTests.java | 2 +- .../config/ExplicitAuditingViaJavaConfigRepositoriesTests.java | 2 +- .../data/jpa/repository/config/InfrastructureConfig.java | 2 +- .../jpa/repository/config/InspectionClassLoaderUnitTests.java | 2 +- .../jpa/repository/config/JpaAuditingRegistrarUnitTests.java | 2 +- .../config/JpaRepositoriesRegistrarIntegrationTests.java | 2 +- .../repository/config/JpaRepositoriesRegistrarUnitTests.java | 2 +- .../config/JpaRepositoryConfigDefinitionParserTests.java | 2 +- .../config/JpaRepositoryConfigExtensionUnitTests.java | 2 +- .../config/JpaRepositoryRegistrationAotProcessorUnitTests.java | 2 +- .../repository/config/NestedRepositoriesJavaConfigTests.java | 2 +- .../data/jpa/repository/config/QueryLookupStrategyTests.java | 2 +- .../data/jpa/repository/config/RepositoriesJavaConfigTests.java | 2 +- .../data/jpa/repository/config/RepositoryAutoConfigTests.java | 2 +- .../data/jpa/repository/config/RepositoryConfigTests.java | 2 +- .../data/jpa/repository/config/TypeFilterConfigTests.java | 2 +- .../data/jpa/repository/custom/CustomGenericJpaRepository.java | 2 +- .../repository/custom/CustomGenericJpaRepositoryFactory.java | 2 +- .../custom/CustomGenericJpaRepositoryFactoryBean.java | 2 +- .../data/jpa/repository/custom/CustomGenericRepository.java | 2 +- .../jpa/repository/custom/UserCustomExtendedRepository.java | 2 +- .../generics/EclipseLinkGenericsIntegrationTests.java | 2 +- .../data/jpa/repository/generics/GenericsIntegrationTests.java | 2 +- .../procedures/MySqlStoredProcedureIntegrationTests.java | 2 +- .../procedures/PostgresStoredProcedureIntegrationTests.java | 2 +- .../PostgresStoredProcedureNullHandlingIntegrationTests.java | 2 +- .../jpa/repository/procedures/StoredProcedureConfigSupport.java | 2 +- .../repository/projections/ProjectionJoinIntegrationTests.java | 2 +- .../jpa/repository/projections/ProjectionsIntegrationTests.java | 2 +- .../data/jpa/repository/query/AbstractJpaQueryTests.java | 2 +- .../query/AbstractStringBasedJpaQueryIntegrationTests.java | 2 +- .../repository/query/AbstractStringBasedJpaQueryUnitTests.java | 2 +- .../data/jpa/repository/query/CollectionUtilsUnitTests.java | 2 +- .../query/CustomNonBindableJpaParametersIntegrationTests.java | 2 +- .../jpa/repository/query/DefaultQueryEnhancerUnitTests.java | 2 +- .../data/jpa/repository/query/DefaultQueryUtilsUnitTests.java | 2 +- .../data/jpa/repository/query/EclipseLinkJpa21UtilsTests.java | 2 +- .../EclipseLinkMetaAnnotatedQueryMethodIntegrationTests.java | 2 +- .../EclipseLinkParameterMetadataProviderIntegrationTests.java | 2 +- .../repository/query/EclipseLinkQueryUtilsIntegrationTests.java | 2 +- .../data/jpa/repository/query/EqlComplianceTests.java | 2 +- .../jpa/repository/query/EqlParserQueryEnhancerUnitTests.java | 2 +- .../data/jpa/repository/query/EqlQueryRendererTests.java | 2 +- .../data/jpa/repository/query/EqlQueryTransformerTests.java | 2 +- .../data/jpa/repository/query/EqlSpecificationTests.java | 2 +- .../data/jpa/repository/query/EscapeCharacterUnitTests.java | 2 +- .../repository/query/ExpressionBasedStringQueryUnitTests.java | 2 +- .../jpa/repository/query/HqlParserQueryEnhancerUnitTests.java | 2 +- .../data/jpa/repository/query/HqlParserUnitTests.java | 2 +- .../data/jpa/repository/query/HqlQueryRendererTests.java | 2 +- .../data/jpa/repository/query/HqlQueryTransformerTests.java | 2 +- .../data/jpa/repository/query/HqlSpecificationTests.java | 2 +- .../jpa/repository/query/JSqlParserQueryEnhancerUnitTests.java | 2 +- .../data/jpa/repository/query/Jpa21UtilsTests.java | 2 +- .../data/jpa/repository/query/Jpa21UtilsUnitTests.java | 2 +- .../repository/query/JpaCountQueryCreatorIntegrationTests.java | 2 +- .../data/jpa/repository/query/JpaParametersUnitTests.java | 2 +- .../data/jpa/repository/query/JpaQueryExecutionUnitTests.java | 2 +- .../jpa/repository/query/JpaQueryLookupStrategyUnitTests.java | 2 +- .../data/jpa/repository/query/JpaQueryMethodUnitTests.java | 2 +- .../jpa/repository/query/JpaQueryRewriteIntegrationTests.java | 2 +- .../data/jpa/repository/query/JpqlComplianceTests.java | 2 +- .../jpa/repository/query/JpqlParserQueryEnhancerUnitTests.java | 2 +- .../data/jpa/repository/query/JpqlQueryRendererTests.java | 2 +- .../data/jpa/repository/query/JpqlQueryTransformerTests.java | 2 +- .../data/jpa/repository/query/JpqlSpecificationTests.java | 2 +- .../repository/query/KeysetScrollSpecificationUnitTests.java | 2 +- .../data/jpa/repository/query/LikeBindingUnitTests.java | 2 +- .../query/MetaAnnotatedQueryMethodIntegrationTests.java | 2 +- .../jpa/repository/query/MetaAnnotatedQueryMethodUnitTests.java | 2 +- .../query/NamedOrIndexedQueryParameterSetterUnitTests.java | 2 +- .../data/jpa/repository/query/NamedQueryUnitTests.java | 2 +- .../data/jpa/repository/query/NativeJpaQueryUnitTests.java | 2 +- .../data/jpa/repository/query/OpenJpaJpa21UtilsTests.java | 2 +- .../query/OpenJpaParameterMetadataProviderIntegrationTests.java | 2 +- .../jpa/repository/query/OpenJpaQueryUtilsIntegrationTests.java | 2 +- .../data/jpa/repository/query/ParameterBinderUnitTests.java | 2 +- .../jpa/repository/query/ParameterBindingParserUnitTests.java | 2 +- .../jpa/repository/query/ParameterExpressionProviderTests.java | 2 +- .../query/ParameterMetadataProviderIntegrationTests.java | 2 +- .../repository/query/ParameterMetadataProviderUnitTests.java | 2 +- .../jpa/repository/query/PartTreeJpaQueryIntegrationTests.java | 2 +- .../jpa/repository/query/QueryEnhancerFactoryUnitTests.java | 2 +- .../data/jpa/repository/query/QueryEnhancerTckTests.java | 2 +- .../data/jpa/repository/query/QueryEnhancerUnitTests.java | 2 +- .../repository/query/QueryParameterSetterFactoryUnitTests.java | 2 +- .../data/jpa/repository/query/QueryUtilsIntegrationTests.java | 2 +- .../data/jpa/repository/query/QueryUtilsUnitTests.java | 2 +- .../jpa/repository/query/QueryWithNullLikeIntegrationTests.java | 2 +- .../data/jpa/repository/query/SimpleJpaQueryUnitTests.java | 2 +- .../query/StoredProcedureAttributeSourceUnitTests.java | 2 +- .../repository/query/StoredProcedureAttributesUnitTests.java | 2 +- .../data/jpa/repository/query/StringQueryUnitTests.java | 2 +- .../data/jpa/repository/query/TupleConverterUnitTests.java | 2 +- .../jpa/repository/sample/AnnotatedAuditableUserRepository.java | 2 +- .../data/jpa/repository/sample/AuditableEntityRepository.java | 2 +- .../data/jpa/repository/sample/AuditableUserRepository.java | 2 +- .../data/jpa/repository/sample/BookRepository.java | 2 +- .../data/jpa/repository/sample/CategoryRepository.java | 2 +- .../data/jpa/repository/sample/ClassWithNestedRepository.java | 2 +- .../data/jpa/repository/sample/ConcreteRepository1.java | 2 +- .../data/jpa/repository/sample/ConcreteRepository2.java | 2 +- .../repository/sample/CustomAbstractPersistableRepository.java | 2 +- .../data/jpa/repository/sample/DummyRepository.java | 2 +- .../jpa/repository/sample/EmployeeRepositoryWithEmbeddedId.java | 2 +- .../jpa/repository/sample/EmployeeRepositoryWithIdClass.java | 2 +- .../jpa/repository/sample/EntityWithAssignedIdRepository.java | 2 +- .../data/jpa/repository/sample/ItemRepository.java | 2 +- .../data/jpa/repository/sample/ItemSiteRepository.java | 2 +- .../data/jpa/repository/sample/MailMessageRepository.java | 2 +- .../data/jpa/repository/sample/MappedTypeRepository.java | 2 +- .../springframework/data/jpa/repository/sample/NameOnlyDto.java | 2 +- .../data/jpa/repository/sample/ParentRepository.java | 2 +- .../data/jpa/repository/sample/ProductRepository.java | 2 +- .../sample/RedeclaringRepositoryMethodsRepository.java | 2 +- .../RepositoryMethodsWithEntityGraphConfigRepository.java | 2 +- .../data/jpa/repository/sample/RoleRepository.java | 2 +- .../data/jpa/repository/sample/RoleRepositoryWithMeta.java | 2 +- .../data/jpa/repository/sample/SampleConfig.java | 2 +- .../jpa/repository/sample/SampleEvaluationContextExtension.java | 2 +- .../data/jpa/repository/sample/SiteRepository.java | 2 +- .../data/jpa/repository/sample/UserRepository.java | 2 +- .../data/jpa/repository/sample/UserRepositoryCustom.java | 2 +- .../data/jpa/repository/sample/UserRepositoryImpl.java | 2 +- .../CrudMethodMetadataPopulatingMethodInterceptorUnitTests.java | 2 +- .../repository/support/DefaultJpaContextIntegrationTests.java | 2 +- .../data/jpa/repository/support/DefaultJpaContextUnitTests.java | 2 +- .../repository/support/DefaultJpaEntityMetadataUnitTest.java | 2 +- .../data/jpa/repository/support/DefaultQueryHintsTest.java | 2 +- .../support/DefaultTransactionDisablingIntegrationTests.java | 2 +- ...clipseLinkJpaMetamodelEntityInformationIntegrationTests.java | 2 +- .../jpa/repository/support/EclipseLinkJpaRepositoryTests.java | 2 +- .../jpa/repository/support/EclipseLinkProxyIdAccessorTests.java | 2 +- .../jpa/repository/support/EntityGraphFactoryUnitTests.java | 2 +- ...gerBeanDefinitionRegistrarPostProcessorIntegrationTests.java | 2 +- ...ityManagerBeanDefinitionRegistrarPostProcessorUnitTests.java | 2 +- .../jpa/repository/support/EntityManagerFactoryRefTests.java | 2 +- .../repository/support/EntityManagerFactoryRefUnitTests.java | 2 +- .../support/FetchableFluentQueryByPredicateUnitTests.java | 2 +- .../HibernateJpaMetamodelEntityInformationIntegrationTests.java | 2 +- .../JavaConfigDefaultTransactionDisablingIntegrationTests.java | 2 +- .../support/JpaEntityInformationSupportUnitTests.java | 2 +- .../support/JpaMetamodelEntityInformationIntegrationTests.java | 2 +- .../support/JpaMetamodelEntityInformationUnitTests.java | 2 +- .../support/JpaPersistableEntityInformationUnitTests.java | 2 +- ...RepositoryFactoryBeanEntityPathResolverIntegrationTests.java | 2 +- .../repository/support/JpaRepositoryFactoryBeanUnitTests.java | 2 +- .../jpa/repository/support/JpaRepositoryFactoryUnitTests.java | 2 +- .../data/jpa/repository/support/JpaRepositoryTests.java | 2 +- .../support/MailMessageRepositoryIntegrationTests.java | 2 +- .../data/jpa/repository/support/MutableQueryHintsUnitTests.java | 2 +- .../data/jpa/repository/support/OpenJpaJpaRepositoryTests.java | 2 +- .../OpenJpaMetamodelEntityInformationIntegrationTests.java | 2 +- .../jpa/repository/support/OpenJpaProxyIdAccessorTests.java | 2 +- .../support/QSimpleEntityPathResolverUnitTests_Sample.java | 2 +- .../data/jpa/repository/support/QuerydslIntegrationTests.java | 2 +- .../support/QuerydslJpaPredicateExecutorUnitTests.java | 2 +- .../data/jpa/repository/support/QuerydslJpaRepositoryTests.java | 2 +- .../support/QuerydslRepositorySupportIntegrationTests.java | 2 +- .../jpa/repository/support/QuerydslRepositorySupportTests.java | 2 +- .../jpa/repository/support/SimpleJpaRepositoryUnitTests.java | 2 +- .../jpa/repository/support/TransactionalRepositoryTests.java | 2 +- .../XmlConfigDefaultTransactionDisablingIntegrationTests.java | 2 +- .../ClasspathScanningPersistenceUnitPostProcessorUnitTests.java | 2 +- .../data/jpa/support/EntityManagerTestUtils.java | 2 +- .../jpa/support/MergingPersistenceUnitManagerUnitTests.java | 2 +- .../data/jpa/support/ProxyImageNameSubstitutor.java | 2 +- .../data/jpa/util/BooleanExecutionCondition.java | 2 +- .../org/springframework/data/jpa/util/ClassPathExclusions.java | 2 +- .../data/jpa/util/ClassPathExclusionsExtension.java | 2 +- .../org/springframework/data/jpa/util/DisabledOnHibernate.java | 2 +- .../data/jpa/util/DisabledOnHibernateCondition.java | 2 +- .../data/jpa/util/DisabledOnHibernateConditionTests.java | 2 +- .../test/java/org/springframework/data/jpa/util/FixedDate.java | 2 +- .../org/springframework/data/jpa/util/HidingClassLoader.java | 2 +- .../data/jpa/util/JpaMetamodelCacheCleanupIntegrationTests.java | 2 +- .../springframework/data/jpa/util/JpaMetamodelUnitTests.java | 2 +- .../data/jpa/util/PackageExcludingClassLoader.java | 2 +- src/main/antora/modules/ROOT/pages/index.adoc | 2 +- 501 files changed, 501 insertions(+), 501 deletions(-) diff --git a/spring-data-envers/src/main/java/org/springframework/data/envers/repository/config/EnableEnversRepositories.java b/spring-data-envers/src/main/java/org/springframework/data/envers/repository/config/EnableEnversRepositories.java index ab3c0ff948..758e98177e 100644 --- a/spring-data-envers/src/main/java/org/springframework/data/envers/repository/config/EnableEnversRepositories.java +++ b/spring-data-envers/src/main/java/org/springframework/data/envers/repository/config/EnableEnversRepositories.java @@ -1,5 +1,5 @@ /* - * Copyright 2021-2024 the original author or authors. + * Copyright 2021-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-envers/src/main/java/org/springframework/data/envers/repository/support/DefaultRevisionEntityInformation.java b/spring-data-envers/src/main/java/org/springframework/data/envers/repository/support/DefaultRevisionEntityInformation.java index cf461e8d9f..d8b96b28d9 100644 --- a/spring-data-envers/src/main/java/org/springframework/data/envers/repository/support/DefaultRevisionEntityInformation.java +++ b/spring-data-envers/src/main/java/org/springframework/data/envers/repository/support/DefaultRevisionEntityInformation.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2024 the original author or authors. + * Copyright 2012-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-envers/src/main/java/org/springframework/data/envers/repository/support/DefaultRevisionMetadata.java b/spring-data-envers/src/main/java/org/springframework/data/envers/repository/support/DefaultRevisionMetadata.java index 6b92607b1f..5c7672d10d 100755 --- a/spring-data-envers/src/main/java/org/springframework/data/envers/repository/support/DefaultRevisionMetadata.java +++ b/spring-data-envers/src/main/java/org/springframework/data/envers/repository/support/DefaultRevisionMetadata.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2024 the original author or authors. + * Copyright 2012-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-envers/src/main/java/org/springframework/data/envers/repository/support/EnversRevisionRepository.java b/spring-data-envers/src/main/java/org/springframework/data/envers/repository/support/EnversRevisionRepository.java index 2d0ba8bea5..f1483304f3 100644 --- a/spring-data-envers/src/main/java/org/springframework/data/envers/repository/support/EnversRevisionRepository.java +++ b/spring-data-envers/src/main/java/org/springframework/data/envers/repository/support/EnversRevisionRepository.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2024 the original author or authors. + * Copyright 2012-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-envers/src/main/java/org/springframework/data/envers/repository/support/EnversRevisionRepositoryFactoryBean.java b/spring-data-envers/src/main/java/org/springframework/data/envers/repository/support/EnversRevisionRepositoryFactoryBean.java index dd7a6b4768..9f40559ca4 100755 --- a/spring-data-envers/src/main/java/org/springframework/data/envers/repository/support/EnversRevisionRepositoryFactoryBean.java +++ b/spring-data-envers/src/main/java/org/springframework/data/envers/repository/support/EnversRevisionRepositoryFactoryBean.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2024 the original author or authors. + * Copyright 2012-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-envers/src/main/java/org/springframework/data/envers/repository/support/EnversRevisionRepositoryImpl.java b/spring-data-envers/src/main/java/org/springframework/data/envers/repository/support/EnversRevisionRepositoryImpl.java index 25abac67e3..431c9fee0d 100755 --- a/spring-data-envers/src/main/java/org/springframework/data/envers/repository/support/EnversRevisionRepositoryImpl.java +++ b/spring-data-envers/src/main/java/org/springframework/data/envers/repository/support/EnversRevisionRepositoryImpl.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2024 the original author or authors. + * Copyright 2012-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-envers/src/main/java/org/springframework/data/envers/repository/support/ReflectionRevisionEntityInformation.java b/spring-data-envers/src/main/java/org/springframework/data/envers/repository/support/ReflectionRevisionEntityInformation.java index ea629fcdbe..631dbca9f8 100644 --- a/spring-data-envers/src/main/java/org/springframework/data/envers/repository/support/ReflectionRevisionEntityInformation.java +++ b/spring-data-envers/src/main/java/org/springframework/data/envers/repository/support/ReflectionRevisionEntityInformation.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2024 the original author or authors. + * Copyright 2012-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-envers/src/test/java/org/springframework/data/envers/Config.java b/spring-data-envers/src/test/java/org/springframework/data/envers/Config.java index 5f636e65e5..c8c1aa963e 100755 --- a/spring-data-envers/src/test/java/org/springframework/data/envers/Config.java +++ b/spring-data-envers/src/test/java/org/springframework/data/envers/Config.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2024 the original author or authors. + * Copyright 2012-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-envers/src/test/java/org/springframework/data/envers/repository/support/DefaultRevisionMetadataUnitTests.java b/spring-data-envers/src/test/java/org/springframework/data/envers/repository/support/DefaultRevisionMetadataUnitTests.java index 930b20be20..f5e50b0dcc 100644 --- a/spring-data-envers/src/test/java/org/springframework/data/envers/repository/support/DefaultRevisionMetadataUnitTests.java +++ b/spring-data-envers/src/test/java/org/springframework/data/envers/repository/support/DefaultRevisionMetadataUnitTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2024 the original author or authors. + * Copyright 2012-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-envers/src/test/java/org/springframework/data/envers/repository/support/EnversRevisionRepositoryImplUnitTests.java b/spring-data-envers/src/test/java/org/springframework/data/envers/repository/support/EnversRevisionRepositoryImplUnitTests.java index 81db782d28..625e099d5a 100644 --- a/spring-data-envers/src/test/java/org/springframework/data/envers/repository/support/EnversRevisionRepositoryImplUnitTests.java +++ b/spring-data-envers/src/test/java/org/springframework/data/envers/repository/support/EnversRevisionRepositoryImplUnitTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2020-2024 the original author or authors. + * Copyright 2020-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-envers/src/test/java/org/springframework/data/envers/repository/support/QueryDslRepositoryIntegrationTests.java b/spring-data-envers/src/test/java/org/springframework/data/envers/repository/support/QueryDslRepositoryIntegrationTests.java index 7aed270c92..7009f219e5 100755 --- a/spring-data-envers/src/test/java/org/springframework/data/envers/repository/support/QueryDslRepositoryIntegrationTests.java +++ b/spring-data-envers/src/test/java/org/springframework/data/envers/repository/support/QueryDslRepositoryIntegrationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2018-2024 the original author or authors. + * Copyright 2018-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-envers/src/test/java/org/springframework/data/envers/repository/support/RepositoryIntegrationTests.java b/spring-data-envers/src/test/java/org/springframework/data/envers/repository/support/RepositoryIntegrationTests.java index 1a4ce785ea..43f159b633 100755 --- a/spring-data-envers/src/test/java/org/springframework/data/envers/repository/support/RepositoryIntegrationTests.java +++ b/spring-data-envers/src/test/java/org/springframework/data/envers/repository/support/RepositoryIntegrationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2024 the original author or authors. + * Copyright 2012-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-envers/src/test/java/org/springframework/data/envers/sample/AbstractEntity.java b/spring-data-envers/src/test/java/org/springframework/data/envers/sample/AbstractEntity.java index 29cc905a15..1120fded1b 100644 --- a/spring-data-envers/src/test/java/org/springframework/data/envers/sample/AbstractEntity.java +++ b/spring-data-envers/src/test/java/org/springframework/data/envers/sample/AbstractEntity.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2024 the original author or authors. + * Copyright 2012-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-envers/src/test/java/org/springframework/data/envers/sample/Country.java b/spring-data-envers/src/test/java/org/springframework/data/envers/sample/Country.java index 67a2fed9d4..5973ecaa78 100755 --- a/spring-data-envers/src/test/java/org/springframework/data/envers/sample/Country.java +++ b/spring-data-envers/src/test/java/org/springframework/data/envers/sample/Country.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2024 the original author or authors. + * Copyright 2012-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-envers/src/test/java/org/springframework/data/envers/sample/CountryQueryDslRepository.java b/spring-data-envers/src/test/java/org/springframework/data/envers/sample/CountryQueryDslRepository.java index 741b2c117f..b7bc3e1c5a 100755 --- a/spring-data-envers/src/test/java/org/springframework/data/envers/sample/CountryQueryDslRepository.java +++ b/spring-data-envers/src/test/java/org/springframework/data/envers/sample/CountryQueryDslRepository.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2024 the original author or authors. + * Copyright 2015-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-envers/src/test/java/org/springframework/data/envers/sample/CountryRepository.java b/spring-data-envers/src/test/java/org/springframework/data/envers/sample/CountryRepository.java index 046de77f23..4f5cc1f2f5 100755 --- a/spring-data-envers/src/test/java/org/springframework/data/envers/sample/CountryRepository.java +++ b/spring-data-envers/src/test/java/org/springframework/data/envers/sample/CountryRepository.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2024 the original author or authors. + * Copyright 2012-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-envers/src/test/java/org/springframework/data/envers/sample/CustomRevisionEntity.java b/spring-data-envers/src/test/java/org/springframework/data/envers/sample/CustomRevisionEntity.java index be2dfd0fe3..d69410894d 100644 --- a/spring-data-envers/src/test/java/org/springframework/data/envers/sample/CustomRevisionEntity.java +++ b/spring-data-envers/src/test/java/org/springframework/data/envers/sample/CustomRevisionEntity.java @@ -1,5 +1,5 @@ /* - * Copyright 2021-2024 the original author or authors. + * Copyright 2021-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-envers/src/test/java/org/springframework/data/envers/sample/CustomRevisionListener.java b/spring-data-envers/src/test/java/org/springframework/data/envers/sample/CustomRevisionListener.java index 3bda04361d..80b45588db 100644 --- a/spring-data-envers/src/test/java/org/springframework/data/envers/sample/CustomRevisionListener.java +++ b/spring-data-envers/src/test/java/org/springframework/data/envers/sample/CustomRevisionListener.java @@ -1,5 +1,5 @@ /* - * Copyright 2021-2024 the original author or authors. + * Copyright 2021-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-envers/src/test/java/org/springframework/data/envers/sample/License.java b/spring-data-envers/src/test/java/org/springframework/data/envers/sample/License.java index b6542eaa48..9ba1070f0a 100755 --- a/spring-data-envers/src/test/java/org/springframework/data/envers/sample/License.java +++ b/spring-data-envers/src/test/java/org/springframework/data/envers/sample/License.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2024 the original author or authors. + * Copyright 2012-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-envers/src/test/java/org/springframework/data/envers/sample/LicenseRepository.java b/spring-data-envers/src/test/java/org/springframework/data/envers/sample/LicenseRepository.java index 87b38d5b88..2d6b7737df 100755 --- a/spring-data-envers/src/test/java/org/springframework/data/envers/sample/LicenseRepository.java +++ b/spring-data-envers/src/test/java/org/springframework/data/envers/sample/LicenseRepository.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2024 the original author or authors. + * Copyright 2012-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-envers/src/test/java/org/springframework/data/envers/sample/QCountry.java b/spring-data-envers/src/test/java/org/springframework/data/envers/sample/QCountry.java index 66a3d509b9..4d1f03c430 100755 --- a/spring-data-envers/src/test/java/org/springframework/data/envers/sample/QCountry.java +++ b/spring-data-envers/src/test/java/org/springframework/data/envers/sample/QCountry.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2024 the original author or authors. + * Copyright 2015-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/jmh/java/org/springframework/data/jpa/benchmark/RepositoryFinderBenchmarks.java b/spring-data-jpa/src/jmh/java/org/springframework/data/jpa/benchmark/RepositoryFinderBenchmarks.java index 05f66f1203..209dc55318 100644 --- a/spring-data-jpa/src/jmh/java/org/springframework/data/jpa/benchmark/RepositoryFinderBenchmarks.java +++ b/spring-data-jpa/src/jmh/java/org/springframework/data/jpa/benchmark/RepositoryFinderBenchmarks.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 the original author or authors. + * Copyright 2024-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/jmh/java/org/springframework/data/jpa/benchmark/model/IPersonProjection.java b/spring-data-jpa/src/jmh/java/org/springframework/data/jpa/benchmark/model/IPersonProjection.java index 6934c0ae67..442385ca32 100644 --- a/spring-data-jpa/src/jmh/java/org/springframework/data/jpa/benchmark/model/IPersonProjection.java +++ b/spring-data-jpa/src/jmh/java/org/springframework/data/jpa/benchmark/model/IPersonProjection.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 the original author or authors. + * Copyright 2024-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/jmh/java/org/springframework/data/jpa/benchmark/model/Person.java b/spring-data-jpa/src/jmh/java/org/springframework/data/jpa/benchmark/model/Person.java index 3996c0b611..aa830371aa 100644 --- a/spring-data-jpa/src/jmh/java/org/springframework/data/jpa/benchmark/model/Person.java +++ b/spring-data-jpa/src/jmh/java/org/springframework/data/jpa/benchmark/model/Person.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 the original author or authors. + * Copyright 2024-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/jmh/java/org/springframework/data/jpa/benchmark/model/Profile.java b/spring-data-jpa/src/jmh/java/org/springframework/data/jpa/benchmark/model/Profile.java index 816554553e..acd3f39b97 100644 --- a/spring-data-jpa/src/jmh/java/org/springframework/data/jpa/benchmark/model/Profile.java +++ b/spring-data-jpa/src/jmh/java/org/springframework/data/jpa/benchmark/model/Profile.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 the original author or authors. + * Copyright 2024-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/jmh/java/org/springframework/data/jpa/benchmark/repository/PersonRepository.java b/spring-data-jpa/src/jmh/java/org/springframework/data/jpa/benchmark/repository/PersonRepository.java index 3ba5fc00c9..491ab736a8 100644 --- a/spring-data-jpa/src/jmh/java/org/springframework/data/jpa/benchmark/repository/PersonRepository.java +++ b/spring-data-jpa/src/jmh/java/org/springframework/data/jpa/benchmark/repository/PersonRepository.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 the original author or authors. + * Copyright 2024-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/jmh/java/org/springframework/data/jpa/repository/query/HqlParserBenchmarks.java b/spring-data-jpa/src/jmh/java/org/springframework/data/jpa/repository/query/HqlParserBenchmarks.java index 482c4454fa..fd46a3f6c2 100644 --- a/spring-data-jpa/src/jmh/java/org/springframework/data/jpa/repository/query/HqlParserBenchmarks.java +++ b/spring-data-jpa/src/jmh/java/org/springframework/data/jpa/repository/query/HqlParserBenchmarks.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 the original author or authors. + * Copyright 2024-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/jmh/java/org/springframework/data/jpa/repository/query/JSqlParserQueryEnhancerBenchmarks.java b/spring-data-jpa/src/jmh/java/org/springframework/data/jpa/repository/query/JSqlParserQueryEnhancerBenchmarks.java index 724a417353..845282e319 100644 --- a/spring-data-jpa/src/jmh/java/org/springframework/data/jpa/repository/query/JSqlParserQueryEnhancerBenchmarks.java +++ b/spring-data-jpa/src/jmh/java/org/springframework/data/jpa/repository/query/JSqlParserQueryEnhancerBenchmarks.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 the original author or authors. + * Copyright 2024-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/convert/QueryByExamplePredicateBuilder.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/convert/QueryByExamplePredicateBuilder.java index e24aeded0e..993f42f3b2 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/convert/QueryByExamplePredicateBuilder.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/convert/QueryByExamplePredicateBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2016-2024 the original author or authors. + * Copyright 2016-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/convert/threeten/Jsr310JpaConverters.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/convert/threeten/Jsr310JpaConverters.java index 8f19eb580f..87aeb9353e 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/convert/threeten/Jsr310JpaConverters.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/convert/threeten/Jsr310JpaConverters.java @@ -1,5 +1,5 @@ /* - * Copyright 2014-2024 the original author or authors. + * Copyright 2014-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/domain/AbstractAuditable.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/domain/AbstractAuditable.java index 6cc365619f..c2653a2e89 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/domain/AbstractAuditable.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/domain/AbstractAuditable.java @@ -1,5 +1,5 @@ /* - * Copyright 2008-2024 the original author or authors. + * Copyright 2008-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/domain/AbstractPersistable.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/domain/AbstractPersistable.java index 63fa8307e6..245418357d 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/domain/AbstractPersistable.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/domain/AbstractPersistable.java @@ -1,5 +1,5 @@ /* - * Copyright 2008-2024 the original author or authors. + * Copyright 2008-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/domain/JpaSort.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/domain/JpaSort.java index a28bf8a390..f930564173 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/domain/JpaSort.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/domain/JpaSort.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2024 the original author or authors. + * Copyright 2013-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/domain/Specification.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/domain/Specification.java index 32c84faae9..ea626af591 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/domain/Specification.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/domain/Specification.java @@ -1,5 +1,5 @@ /* - * Copyright 2008-2024 the original author or authors. + * Copyright 2008-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/domain/SpecificationComposition.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/domain/SpecificationComposition.java index 9b0654bd76..ad78749e39 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/domain/SpecificationComposition.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/domain/SpecificationComposition.java @@ -1,5 +1,5 @@ /* - * Copyright 2018-2024 the original author or authors. + * Copyright 2018-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/domain/support/AuditingBeanFactoryPostProcessor.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/domain/support/AuditingBeanFactoryPostProcessor.java index 4d77cb4070..1b669e0854 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/domain/support/AuditingBeanFactoryPostProcessor.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/domain/support/AuditingBeanFactoryPostProcessor.java @@ -1,5 +1,5 @@ /* - * Copyright 2008-2024 the original author or authors. + * Copyright 2008-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/domain/support/AuditingEntityListener.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/domain/support/AuditingEntityListener.java index 84de19a961..9dc73af957 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/domain/support/AuditingEntityListener.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/domain/support/AuditingEntityListener.java @@ -1,5 +1,5 @@ /* - * Copyright 2008-2024 the original author or authors. + * Copyright 2008-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/mapping/JpaMetamodelMappingContext.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/mapping/JpaMetamodelMappingContext.java index ee663c687a..bc5a71c25c 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/mapping/JpaMetamodelMappingContext.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/mapping/JpaMetamodelMappingContext.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2024 the original author or authors. + * Copyright 2012-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/mapping/JpaPersistentEntity.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/mapping/JpaPersistentEntity.java index daf8c5ab74..90ca19aa71 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/mapping/JpaPersistentEntity.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/mapping/JpaPersistentEntity.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2024 the original author or authors. + * Copyright 2012-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/mapping/JpaPersistentEntityImpl.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/mapping/JpaPersistentEntityImpl.java index fa8eebd38d..761a1600d0 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/mapping/JpaPersistentEntityImpl.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/mapping/JpaPersistentEntityImpl.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2024 the original author or authors. + * Copyright 2012-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/mapping/JpaPersistentProperty.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/mapping/JpaPersistentProperty.java index 111e4cc0b6..63a9cf3515 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/mapping/JpaPersistentProperty.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/mapping/JpaPersistentProperty.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2024 the original author or authors. + * Copyright 2012-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/mapping/JpaPersistentPropertyImpl.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/mapping/JpaPersistentPropertyImpl.java index 501d3a6444..da773247e1 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/mapping/JpaPersistentPropertyImpl.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/mapping/JpaPersistentPropertyImpl.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2024 the original author or authors. + * Copyright 2012-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/projection/CollectionAwareProjectionFactory.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/projection/CollectionAwareProjectionFactory.java index eea31872ff..9b602fc65b 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/projection/CollectionAwareProjectionFactory.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/projection/CollectionAwareProjectionFactory.java @@ -1,5 +1,5 @@ /* - * Copyright 2017-2024 the original author or authors. + * Copyright 2017-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/provider/HibernateUtils.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/provider/HibernateUtils.java index f99e6fdb0e..862cb5a1fb 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/provider/HibernateUtils.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/provider/HibernateUtils.java @@ -1,5 +1,5 @@ /* - * Copyright 2016-2024 the original author or authors. + * Copyright 2016-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/provider/JpaClassUtils.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/provider/JpaClassUtils.java index c0e3324659..f00f4b849d 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/provider/JpaClassUtils.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/provider/JpaClassUtils.java @@ -1,5 +1,5 @@ /* - * Copyright 2008-2024 the original author or authors. + * Copyright 2008-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/provider/PersistenceProvider.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/provider/PersistenceProvider.java index 84ca80baeb..2b5e0abbeb 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/provider/PersistenceProvider.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/provider/PersistenceProvider.java @@ -1,5 +1,5 @@ /* - * Copyright 2008-2024 the original author or authors. + * Copyright 2008-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/provider/ProxyIdAccessor.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/provider/ProxyIdAccessor.java index 3d1dcdb86d..d999d7490b 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/provider/ProxyIdAccessor.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/provider/ProxyIdAccessor.java @@ -1,5 +1,5 @@ /* - * Copyright 2014-2024 the original author or authors. + * Copyright 2014-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/provider/QueryComment.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/provider/QueryComment.java index 8fdabf0959..aa39144da4 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/provider/QueryComment.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/provider/QueryComment.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2024 the original author or authors. + * Copyright 2013-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/provider/QueryExtractor.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/provider/QueryExtractor.java index 2d84633bf1..6bd6f4bace 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/provider/QueryExtractor.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/provider/QueryExtractor.java @@ -1,5 +1,5 @@ /* - * Copyright 2008-2024 the original author or authors. + * Copyright 2008-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/EntityGraph.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/EntityGraph.java index 0a40faa247..a6fd6367c4 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/EntityGraph.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/EntityGraph.java @@ -1,5 +1,5 @@ /* - * Copyright 2014-2024 the original author or authors. + * Copyright 2014-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/JpaContext.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/JpaContext.java index 3b889e30ac..13eff2d386 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/JpaContext.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/JpaContext.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2024 the original author or authors. + * Copyright 2015-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/JpaRepository.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/JpaRepository.java index 6be4294d94..a3541460f9 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/JpaRepository.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/JpaRepository.java @@ -1,5 +1,5 @@ /* - * Copyright 2008-2024 the original author or authors. + * Copyright 2008-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/JpaSpecificationExecutor.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/JpaSpecificationExecutor.java index 0d38cc580d..3abd83b2bf 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/JpaSpecificationExecutor.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/JpaSpecificationExecutor.java @@ -1,5 +1,5 @@ /* - * Copyright 2008-2024 the original author or authors. + * Copyright 2008-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/Lock.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/Lock.java index 219756b6ef..a8d1fc7775 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/Lock.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/Lock.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2024 the original author or authors. + * Copyright 2011-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/Meta.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/Meta.java index 55225de082..2ba8a0a9ea 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/Meta.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/Meta.java @@ -1,5 +1,5 @@ /* - * Copyright 2014-2024 the original author or authors. + * Copyright 2014-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/Modifying.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/Modifying.java index 48ef4ce55b..612bb4092a 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/Modifying.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/Modifying.java @@ -1,5 +1,5 @@ /* - * Copyright 2008-2024 the original author or authors. + * Copyright 2008-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/Query.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/Query.java index 8fc1433fdd..b1cf2866d4 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/Query.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/Query.java @@ -1,5 +1,5 @@ /* - * Copyright 2008-2024 the original author or authors. + * Copyright 2008-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/QueryHints.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/QueryHints.java index 86b482db80..996b8a2933 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/QueryHints.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/QueryHints.java @@ -1,5 +1,5 @@ /* - * Copyright 2008-2024 the original author or authors. + * Copyright 2008-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/QueryRewriter.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/QueryRewriter.java index d55d9a31a6..d34101046f 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/QueryRewriter.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/QueryRewriter.java @@ -1,5 +1,5 @@ /* - * Copyright 2022-2024 the original author or authors. + * Copyright 2022-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/Temporal.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/Temporal.java index 7668ccd33f..e7492ab305 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/Temporal.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/Temporal.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2024 the original author or authors. + * Copyright 2013-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/aot/JpaRuntimeHints.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/aot/JpaRuntimeHints.java index a2dcece1f2..ff2064f467 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/aot/JpaRuntimeHints.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/aot/JpaRuntimeHints.java @@ -1,5 +1,5 @@ /* - * Copyright 2022-2024 the original author or authors. + * Copyright 2022-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/cdi/BeanManagerQueryRewriterProvider.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/cdi/BeanManagerQueryRewriterProvider.java index e1ef5f475c..4aa304ec04 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/cdi/BeanManagerQueryRewriterProvider.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/cdi/BeanManagerQueryRewriterProvider.java @@ -1,5 +1,5 @@ /* - * Copyright 2022-2024 the original author or authors. + * Copyright 2022-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/cdi/JpaRepositoryBean.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/cdi/JpaRepositoryBean.java index e0bcb27c97..8cb39d7d49 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/cdi/JpaRepositoryBean.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/cdi/JpaRepositoryBean.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2024 the original author or authors. + * Copyright 2011-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/cdi/JpaRepositoryExtension.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/cdi/JpaRepositoryExtension.java index 8b8088c0c9..a10d005a1b 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/cdi/JpaRepositoryExtension.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/cdi/JpaRepositoryExtension.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2024 the original author or authors. + * Copyright 2011-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/config/AuditingBeanDefinitionParser.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/config/AuditingBeanDefinitionParser.java index b7a90e128e..8625119632 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/config/AuditingBeanDefinitionParser.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/config/AuditingBeanDefinitionParser.java @@ -1,5 +1,5 @@ /* - * Copyright 2008-2024 the original author or authors. + * Copyright 2008-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/config/BeanDefinitionNames.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/config/BeanDefinitionNames.java index 2304e4b239..55cd78b091 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/config/BeanDefinitionNames.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/config/BeanDefinitionNames.java @@ -1,5 +1,5 @@ /* - * Copyright 2014-2024 the original author or authors. + * Copyright 2014-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/config/EnableJpaAuditing.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/config/EnableJpaAuditing.java index 48304dbac1..6a6577fbbc 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/config/EnableJpaAuditing.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/config/EnableJpaAuditing.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2024 the original author or authors. + * Copyright 2013-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/config/EnableJpaRepositories.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/config/EnableJpaRepositories.java index e4b43d72dc..ed1889bafc 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/config/EnableJpaRepositories.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/config/EnableJpaRepositories.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2024 the original author or authors. + * Copyright 2012-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/config/InspectionClassLoader.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/config/InspectionClassLoader.java index 7611ba3986..a95eb1db86 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/config/InspectionClassLoader.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/config/InspectionClassLoader.java @@ -1,5 +1,5 @@ /* - * Copyright 2018-2024 the original author or authors. + * Copyright 2018-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/config/JpaAuditingRegistrar.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/config/JpaAuditingRegistrar.java index bafc70f0aa..88e4dbbd0c 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/config/JpaAuditingRegistrar.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/config/JpaAuditingRegistrar.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2024 the original author or authors. + * Copyright 2013-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/config/JpaMetamodelMappingContextFactoryBean.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/config/JpaMetamodelMappingContextFactoryBean.java index b0a7851d42..2bd8cd5ec8 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/config/JpaMetamodelMappingContextFactoryBean.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/config/JpaMetamodelMappingContextFactoryBean.java @@ -1,5 +1,5 @@ /* - * Copyright 2017-2024 the original author or authors. + * Copyright 2017-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/config/JpaRepositoriesRegistrar.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/config/JpaRepositoriesRegistrar.java index 9e8d640da9..6c6e803576 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/config/JpaRepositoriesRegistrar.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/config/JpaRepositoriesRegistrar.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2024 the original author or authors. + * Copyright 2012-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/config/JpaRepositoryConfigExtension.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/config/JpaRepositoryConfigExtension.java index 7010542f45..1bcf8073a8 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/config/JpaRepositoryConfigExtension.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/config/JpaRepositoryConfigExtension.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2024 the original author or authors. + * Copyright 2012-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/config/JpaRepositoryNameSpaceHandler.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/config/JpaRepositoryNameSpaceHandler.java index a0de895722..951e4132cd 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/config/JpaRepositoryNameSpaceHandler.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/config/JpaRepositoryNameSpaceHandler.java @@ -1,5 +1,5 @@ /* - * Copyright 2008-2024 the original author or authors. + * Copyright 2008-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/AbstractJpaQuery.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/AbstractJpaQuery.java index 5742a1ea4e..a457cabf96 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/AbstractJpaQuery.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/AbstractJpaQuery.java @@ -1,5 +1,5 @@ /* - * Copyright 2008-2024 the original author or authors. + * Copyright 2008-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/AbstractStringBasedJpaQuery.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/AbstractStringBasedJpaQuery.java index c60da04424..bd9b5d6f77 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/AbstractStringBasedJpaQuery.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/AbstractStringBasedJpaQuery.java @@ -1,5 +1,5 @@ /* - * Copyright 2008-2024 the original author or authors. + * Copyright 2008-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/BadJpqlGrammarErrorListener.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/BadJpqlGrammarErrorListener.java index b629bd6179..66b64a0314 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/BadJpqlGrammarErrorListener.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/BadJpqlGrammarErrorListener.java @@ -1,5 +1,5 @@ /* - * Copyright 2022-2024 the original author or authors. + * Copyright 2022-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/BadJpqlGrammarException.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/BadJpqlGrammarException.java index 56dae97430..6cc24630ef 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/BadJpqlGrammarException.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/BadJpqlGrammarException.java @@ -1,5 +1,5 @@ /* - * Copyright 2022-2024 the original author or authors. + * Copyright 2022-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/BeanFactoryQueryRewriterProvider.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/BeanFactoryQueryRewriterProvider.java index 552cca806c..ee50c94696 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/BeanFactoryQueryRewriterProvider.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/BeanFactoryQueryRewriterProvider.java @@ -1,5 +1,5 @@ /* - * Copyright 2022-2024 the original author or authors. + * Copyright 2022-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/CollectionUtils.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/CollectionUtils.java index 632125c566..6352836f98 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/CollectionUtils.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/CollectionUtils.java @@ -1,5 +1,5 @@ /* - * Copyright 2023-2024 the original author or authors. + * Copyright 2023-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/DeclaredQuery.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/DeclaredQuery.java index 4e54424404..70bc5c829b 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/DeclaredQuery.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/DeclaredQuery.java @@ -1,5 +1,5 @@ /* - * Copyright 2018-2024 the original author or authors. + * Copyright 2018-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/DefaultJpaEntityMetadata.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/DefaultJpaEntityMetadata.java index 78105e7eb0..daa30cbb87 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/DefaultJpaEntityMetadata.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/DefaultJpaEntityMetadata.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2024 the original author or authors. + * Copyright 2013-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/DefaultJpaQueryMethodFactory.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/DefaultJpaQueryMethodFactory.java index 03bcb52b83..80539f2fac 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/DefaultJpaQueryMethodFactory.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/DefaultJpaQueryMethodFactory.java @@ -1,5 +1,5 @@ /* - * Copyright 2019-2024 the original author or authors. + * Copyright 2019-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/DefaultQueryEnhancer.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/DefaultQueryEnhancer.java index 3aff35357b..701bdf6033 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/DefaultQueryEnhancer.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/DefaultQueryEnhancer.java @@ -1,5 +1,5 @@ /* - * Copyright 2022-2024 the original author or authors. + * Copyright 2022-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/DelegatingQueryRewriter.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/DelegatingQueryRewriter.java index e171a49413..8cba903a94 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/DelegatingQueryRewriter.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/DelegatingQueryRewriter.java @@ -1,5 +1,5 @@ /* - * Copyright 2022-2024 the original author or authors. + * Copyright 2022-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/EmptyDeclaredQuery.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/EmptyDeclaredQuery.java index 67f9f9b3e6..850c0919a3 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/EmptyDeclaredQuery.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/EmptyDeclaredQuery.java @@ -1,5 +1,5 @@ /* - * Copyright 2018-2024 the original author or authors. + * Copyright 2018-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/EqlQueryParser.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/EqlQueryParser.java index 4e5dadff34..378337c73a 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/EqlQueryParser.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/EqlQueryParser.java @@ -1,5 +1,5 @@ /* - * Copyright 2023-2024 the original author or authors. + * Copyright 2023-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/EqlQueryRenderer.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/EqlQueryRenderer.java index f3ecafe01e..1412a0103b 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/EqlQueryRenderer.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/EqlQueryRenderer.java @@ -1,5 +1,5 @@ /* - * Copyright 2023-2024 the original author or authors. + * Copyright 2023-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/EqlQueryTransformer.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/EqlQueryTransformer.java index 26c067b5d5..92084189c9 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/EqlQueryTransformer.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/EqlQueryTransformer.java @@ -1,5 +1,5 @@ /* - * Copyright 2023-2024 the original author or authors. + * Copyright 2023-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/EscapeCharacter.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/EscapeCharacter.java index b9897832f6..d73680ff62 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/EscapeCharacter.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/EscapeCharacter.java @@ -1,5 +1,5 @@ /* - * Copyright 2019-2024 the original author or authors. + * Copyright 2019-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/ExpressionBasedStringQuery.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/ExpressionBasedStringQuery.java index 411c2662d5..54f2be3518 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/ExpressionBasedStringQuery.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/ExpressionBasedStringQuery.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2024 the original author or authors. + * Copyright 2013-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/HibernateJpaParametersParameterAccessor.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/HibernateJpaParametersParameterAccessor.java index 53291a0ea0..37b06f0744 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/HibernateJpaParametersParameterAccessor.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/HibernateJpaParametersParameterAccessor.java @@ -1,5 +1,5 @@ /* - * Copyright 2022-2024 the original author or authors. + * Copyright 2022-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/HqlQueryParser.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/HqlQueryParser.java index 9842c2b6b8..061f3590b6 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/HqlQueryParser.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/HqlQueryParser.java @@ -1,5 +1,5 @@ /* - * Copyright 2022-2024 the original author or authors. + * Copyright 2022-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/HqlQueryRenderer.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/HqlQueryRenderer.java index 28fa868b1e..c10be8ae4a 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/HqlQueryRenderer.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/HqlQueryRenderer.java @@ -1,5 +1,5 @@ /* - * Copyright 2022-2024 the original author or authors. + * Copyright 2022-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/HqlQueryTransformer.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/HqlQueryTransformer.java index 670ecd2c84..6fe5a4ef1e 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/HqlQueryTransformer.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/HqlQueryTransformer.java @@ -1,5 +1,5 @@ /* - * Copyright 2022-2024 the original author or authors. + * Copyright 2022-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/InvalidJpaQueryMethodException.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/InvalidJpaQueryMethodException.java index 5662d7d091..14cdf678d1 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/InvalidJpaQueryMethodException.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/InvalidJpaQueryMethodException.java @@ -1,5 +1,5 @@ /* - * Copyright 2014-2024 the original author or authors. + * Copyright 2014-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/JSqlParserQueryEnhancer.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/JSqlParserQueryEnhancer.java index 1fbc87d17a..06f06e3495 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/JSqlParserQueryEnhancer.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/JSqlParserQueryEnhancer.java @@ -1,5 +1,5 @@ /* - * Copyright 2022-2024 the original author or authors. + * Copyright 2022-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/JSqlParserUtils.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/JSqlParserUtils.java index efe56e1892..c0fff14ab4 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/JSqlParserUtils.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/JSqlParserUtils.java @@ -1,5 +1,5 @@ /* - * Copyright 2022-2024 the original author or authors. + * Copyright 2022-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/Jpa21Utils.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/Jpa21Utils.java index e436624215..546bc27b39 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/Jpa21Utils.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/Jpa21Utils.java @@ -1,5 +1,5 @@ /* - * Copyright 2014-2024 the original author or authors. + * Copyright 2014-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/JpaCountQueryCreator.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/JpaCountQueryCreator.java index 851a867214..60c4f072ab 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/JpaCountQueryCreator.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/JpaCountQueryCreator.java @@ -1,5 +1,5 @@ /* - * Copyright 2008-2024 the original author or authors. + * Copyright 2008-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/JpaEntityGraph.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/JpaEntityGraph.java index d1a6b45935..597ff0a558 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/JpaEntityGraph.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/JpaEntityGraph.java @@ -1,5 +1,5 @@ /* - * Copyright 2014-2024 the original author or authors. + * Copyright 2014-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/JpaEntityMetadata.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/JpaEntityMetadata.java index 3652a84551..f7cc6cc9a0 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/JpaEntityMetadata.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/JpaEntityMetadata.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2024 the original author or authors. + * Copyright 2013-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/JpaKeysetScrollQueryCreator.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/JpaKeysetScrollQueryCreator.java index 25e7c25ca9..46908bdd2f 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/JpaKeysetScrollQueryCreator.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/JpaKeysetScrollQueryCreator.java @@ -1,5 +1,5 @@ /* - * Copyright 2023-2024 the original author or authors. + * Copyright 2023-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/JpaParameters.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/JpaParameters.java index 220a285d8f..b3fc5526f5 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/JpaParameters.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/JpaParameters.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2024 the original author or authors. + * Copyright 2013-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/JpaParametersParameterAccessor.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/JpaParametersParameterAccessor.java index 6d760d5a3a..e222439a22 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/JpaParametersParameterAccessor.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/JpaParametersParameterAccessor.java @@ -1,5 +1,5 @@ /* - * Copyright 2017-2024 the original author or authors. + * Copyright 2017-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/JpaQueryCreator.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/JpaQueryCreator.java index 255ac86dc3..d86880372b 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/JpaQueryCreator.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/JpaQueryCreator.java @@ -1,5 +1,5 @@ /* - * Copyright 2008-2024 the original author or authors. + * Copyright 2008-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/JpaQueryEnhancer.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/JpaQueryEnhancer.java index 30f3742e28..1954b9455a 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/JpaQueryEnhancer.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/JpaQueryEnhancer.java @@ -1,5 +1,5 @@ /* - * Copyright 2022-2024 the original author or authors. + * Copyright 2022-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/JpaQueryExecution.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/JpaQueryExecution.java index 82482cd99c..35a680c8fe 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/JpaQueryExecution.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/JpaQueryExecution.java @@ -1,5 +1,5 @@ /* - * Copyright 2008-2024 the original author or authors. + * Copyright 2008-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/JpaQueryFactory.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/JpaQueryFactory.java index 8f1d3247df..53108001f0 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/JpaQueryFactory.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/JpaQueryFactory.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2024 the original author or authors. + * Copyright 2013-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/JpaQueryLookupStrategy.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/JpaQueryLookupStrategy.java index 8cf8d12125..277d6195ea 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/JpaQueryLookupStrategy.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/JpaQueryLookupStrategy.java @@ -1,5 +1,5 @@ /* - * Copyright 2008-2024 the original author or authors. + * Copyright 2008-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/JpaQueryMethod.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/JpaQueryMethod.java index 2bb15aa97d..f640da86cb 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/JpaQueryMethod.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/JpaQueryMethod.java @@ -1,5 +1,5 @@ /* - * Copyright 2008-2024 the original author or authors. + * Copyright 2008-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/JpaQueryMethodFactory.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/JpaQueryMethodFactory.java index 24326fe0ae..a5b5213127 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/JpaQueryMethodFactory.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/JpaQueryMethodFactory.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2024 the original author or authors. + * Copyright 2012-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/JpaQueryParserSupport.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/JpaQueryParserSupport.java index ca17005e77..5dc4f11419 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/JpaQueryParserSupport.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/JpaQueryParserSupport.java @@ -1,5 +1,5 @@ /* - * Copyright 2022-2024 the original author or authors. + * Copyright 2022-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/JpaQueryParsingToken.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/JpaQueryParsingToken.java index 0882174ef4..4e8357cc44 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/JpaQueryParsingToken.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/JpaQueryParsingToken.java @@ -1,5 +1,5 @@ /* - * Copyright 2022-2024 the original author or authors. + * Copyright 2022-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/JpaResultConverters.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/JpaResultConverters.java index 03c9d82adb..06382e5e9b 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/JpaResultConverters.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/JpaResultConverters.java @@ -1,5 +1,5 @@ /* - * Copyright 2014-2024 the original author or authors. + * Copyright 2014-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/JpqlQueryParser.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/JpqlQueryParser.java index 98988cf032..b3143309f8 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/JpqlQueryParser.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/JpqlQueryParser.java @@ -1,5 +1,5 @@ /* - * Copyright 2022-2024 the original author or authors. + * Copyright 2022-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/JpqlQueryRenderer.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/JpqlQueryRenderer.java index 492215e48f..3320c390d1 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/JpqlQueryRenderer.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/JpqlQueryRenderer.java @@ -1,5 +1,5 @@ /* - * Copyright 2022-2024 the original author or authors. + * Copyright 2022-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/JpqlQueryTransformer.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/JpqlQueryTransformer.java index 4c2f5f6c4e..47396b2462 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/JpqlQueryTransformer.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/JpqlQueryTransformer.java @@ -1,5 +1,5 @@ /* - * Copyright 2022-2024 the original author or authors. + * Copyright 2022-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/KeysetScrollDelegate.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/KeysetScrollDelegate.java index 2942fa0bce..7fb9f3659c 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/KeysetScrollDelegate.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/KeysetScrollDelegate.java @@ -1,5 +1,5 @@ /* - * Copyright 2023-2024 the original author or authors. + * Copyright 2023-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/KeysetScrollSpecification.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/KeysetScrollSpecification.java index 6047c164ca..40aa051983 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/KeysetScrollSpecification.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/KeysetScrollSpecification.java @@ -1,5 +1,5 @@ /* - * Copyright 2023-2024 the original author or authors. + * Copyright 2023-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/Meta.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/Meta.java index 79b6d7e0bd..53790bcf4f 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/Meta.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/Meta.java @@ -1,5 +1,5 @@ /* - * Copyright 2014-2024 the original author or authors. + * Copyright 2014-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/NamedQuery.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/NamedQuery.java index e1271d4ea5..4cb445b104 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/NamedQuery.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/NamedQuery.java @@ -1,5 +1,5 @@ /* - * Copyright 2008-2024 the original author or authors. + * Copyright 2008-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/NativeJpaQuery.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/NativeJpaQuery.java index fe5958fca0..27664688cc 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/NativeJpaQuery.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/NativeJpaQuery.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2024 the original author or authors. + * Copyright 2013-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/ParameterBinder.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/ParameterBinder.java index 78fc9531ee..7a49f584a1 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/ParameterBinder.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/ParameterBinder.java @@ -1,5 +1,5 @@ /* - * Copyright 2008-2024 the original author or authors. + * Copyright 2008-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/ParameterBinderFactory.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/ParameterBinderFactory.java index 898cd73936..57f6403d5d 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/ParameterBinderFactory.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/ParameterBinderFactory.java @@ -1,5 +1,5 @@ /* - * Copyright 2017-2024 the original author or authors. + * Copyright 2017-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/ParameterBinding.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/ParameterBinding.java index 4778943f68..efa1b8b1ea 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/ParameterBinding.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/ParameterBinding.java @@ -1,5 +1,5 @@ /* - * Copyright 2023-2024 the original author or authors. + * Copyright 2023-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/ParameterMetadataProvider.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/ParameterMetadataProvider.java index 213e641a5c..b99f1b93f9 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/ParameterMetadataProvider.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/ParameterMetadataProvider.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2024 the original author or authors. + * Copyright 2011-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/PartTreeJpaQuery.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/PartTreeJpaQuery.java index 1d0923f26d..a1246ac056 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/PartTreeJpaQuery.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/PartTreeJpaQuery.java @@ -1,5 +1,5 @@ /* - * Copyright 2008-2024 the original author or authors. + * Copyright 2008-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/Procedure.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/Procedure.java index 6e6a825259..9ebbe5f2a8 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/Procedure.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/Procedure.java @@ -1,5 +1,5 @@ /* - * Copyright 2014-2024 the original author or authors. + * Copyright 2014-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/ProcedureParameter.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/ProcedureParameter.java index e86a59151a..0cef0b0a0f 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/ProcedureParameter.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/ProcedureParameter.java @@ -1,5 +1,5 @@ /* - * Copyright 2021-2024 the original author or authors. + * Copyright 2021-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/QueryEnhancer.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/QueryEnhancer.java index ec28f9e5af..b5df477507 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/QueryEnhancer.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/QueryEnhancer.java @@ -1,5 +1,5 @@ /* - * Copyright 2022-2024 the original author or authors. + * Copyright 2022-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/QueryEnhancerFactory.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/QueryEnhancerFactory.java index c40ab11f66..5a2853cb1a 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/QueryEnhancerFactory.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/QueryEnhancerFactory.java @@ -1,5 +1,5 @@ /* - * Copyright 2022-2024 the original author or authors. + * Copyright 2022-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/QueryParameterSetter.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/QueryParameterSetter.java index a05a34052b..727f61cc81 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/QueryParameterSetter.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/QueryParameterSetter.java @@ -1,5 +1,5 @@ /* - * Copyright 2017-2024 the original author or authors. + * Copyright 2017-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/QueryParameterSetterFactory.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/QueryParameterSetterFactory.java index 696ac66535..8bdeea1f02 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/QueryParameterSetterFactory.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/QueryParameterSetterFactory.java @@ -1,5 +1,5 @@ /* - * Copyright 2017-2024 the original author or authors. + * Copyright 2017-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/QueryRewriterProvider.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/QueryRewriterProvider.java index b3abe97552..85e6d34aa2 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/QueryRewriterProvider.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/QueryRewriterProvider.java @@ -1,5 +1,5 @@ /* - * Copyright 2022-2024 the original author or authors. + * Copyright 2022-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/QueryTransformers.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/QueryTransformers.java index 368e9a95b2..fd080e40d0 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/QueryTransformers.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/QueryTransformers.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 the original author or authors. + * Copyright 2024-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/QueryUtils.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/QueryUtils.java index 0265b5549d..09a7b09f90 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/QueryUtils.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/QueryUtils.java @@ -1,5 +1,5 @@ /* - * Copyright 2008-2024 the original author or authors. + * Copyright 2008-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/ScrollDelegate.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/ScrollDelegate.java index 359dfb6ea2..7fbe146bb4 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/ScrollDelegate.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/ScrollDelegate.java @@ -1,5 +1,5 @@ /* - * Copyright 2023-2024 the original author or authors. + * Copyright 2023-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/SimpleJpaQuery.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/SimpleJpaQuery.java index 5174168501..1c8cf1fbda 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/SimpleJpaQuery.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/SimpleJpaQuery.java @@ -1,5 +1,5 @@ /* - * Copyright 2008-2024 the original author or authors. + * Copyright 2008-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/StoredProcedureAttributeSource.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/StoredProcedureAttributeSource.java index 770c946f64..2616c3d796 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/StoredProcedureAttributeSource.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/StoredProcedureAttributeSource.java @@ -1,5 +1,5 @@ /* - * Copyright 2014-2024 the original author or authors. + * Copyright 2014-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/StoredProcedureAttributes.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/StoredProcedureAttributes.java index 2acc5f83c1..e7ef76a3eb 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/StoredProcedureAttributes.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/StoredProcedureAttributes.java @@ -1,5 +1,5 @@ /* - * Copyright 2014-2024 the original author or authors. + * Copyright 2014-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/StoredProcedureJpaQuery.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/StoredProcedureJpaQuery.java index 54d6b0b24a..8ff29f4ba2 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/StoredProcedureJpaQuery.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/StoredProcedureJpaQuery.java @@ -1,5 +1,5 @@ /* - * Copyright 2014-2024 the original author or authors. + * Copyright 2014-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/StringQuery.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/StringQuery.java index 5bea73422c..4a2e9d8e25 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/StringQuery.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/StringQuery.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2024 the original author or authors. + * Copyright 2013-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/CrudMethodMetadata.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/CrudMethodMetadata.java index ae738974b1..4b0b7bacaf 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/CrudMethodMetadata.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/CrudMethodMetadata.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2024 the original author or authors. + * Copyright 2011-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/CrudMethodMetadataPostProcessor.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/CrudMethodMetadataPostProcessor.java index 246e82dcd6..135d3c6e44 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/CrudMethodMetadataPostProcessor.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/CrudMethodMetadataPostProcessor.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2024 the original author or authors. + * Copyright 2011-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/DefaultJpaContext.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/DefaultJpaContext.java index e6e51b991d..220ac48587 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/DefaultJpaContext.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/DefaultJpaContext.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2024 the original author or authors. + * Copyright 2015-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/DefaultQueryHints.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/DefaultQueryHints.java index bbf5b12a9a..61efae5b5e 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/DefaultQueryHints.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/DefaultQueryHints.java @@ -1,5 +1,5 @@ /* - * Copyright 2017-2024 the original author or authors. + * Copyright 2017-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/EntityGraphFactory.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/EntityGraphFactory.java index 97bf993818..5308fa64b8 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/EntityGraphFactory.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/EntityGraphFactory.java @@ -1,5 +1,5 @@ /* - * Copyright 2021-2024 the original author or authors. + * Copyright 2021-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/EntityManagerBeanDefinitionRegistrarPostProcessor.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/EntityManagerBeanDefinitionRegistrarPostProcessor.java index a3344c2c94..4d84dfc0d4 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/EntityManagerBeanDefinitionRegistrarPostProcessor.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/EntityManagerBeanDefinitionRegistrarPostProcessor.java @@ -1,5 +1,5 @@ /* - * Copyright 2014-2024 the original author or authors. + * Copyright 2014-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/FetchableFluentQueryByPredicate.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/FetchableFluentQueryByPredicate.java index 9ed0a0ce3e..fdc3bb28ae 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/FetchableFluentQueryByPredicate.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/FetchableFluentQueryByPredicate.java @@ -1,5 +1,5 @@ /* - * Copyright 2021-2024 the original author or authors. + * Copyright 2021-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/FetchableFluentQueryBySpecification.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/FetchableFluentQueryBySpecification.java index 08659af984..534cd61330 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/FetchableFluentQueryBySpecification.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/FetchableFluentQueryBySpecification.java @@ -1,5 +1,5 @@ /* - * Copyright 2021-2024 the original author or authors. + * Copyright 2021-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/FluentQuerySupport.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/FluentQuerySupport.java index 5917a119f5..253610e78b 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/FluentQuerySupport.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/FluentQuerySupport.java @@ -1,5 +1,5 @@ /* - * Copyright 2021-2024 the original author or authors. + * Copyright 2021-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/JpaEntityInformation.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/JpaEntityInformation.java index 096bd77d21..98828424ab 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/JpaEntityInformation.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/JpaEntityInformation.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2024 the original author or authors. + * Copyright 2011-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/JpaEntityInformationSupport.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/JpaEntityInformationSupport.java index 00c9f7f27d..6d8c0ba8dc 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/JpaEntityInformationSupport.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/JpaEntityInformationSupport.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2024 the original author or authors. + * Copyright 2011-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/JpaEvaluationContextExtension.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/JpaEvaluationContextExtension.java index 79b7b10de0..f635a221a4 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/JpaEvaluationContextExtension.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/JpaEvaluationContextExtension.java @@ -1,5 +1,5 @@ /* - * Copyright 2019-2024 the original author or authors. + * Copyright 2019-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/JpaMetamodelEntityInformation.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/JpaMetamodelEntityInformation.java index 9979fc773b..9293454649 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/JpaMetamodelEntityInformation.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/JpaMetamodelEntityInformation.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2024 the original author or authors. + * Copyright 2011-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/JpaPersistableEntityInformation.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/JpaPersistableEntityInformation.java index ed0b4644ec..aaaff2050c 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/JpaPersistableEntityInformation.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/JpaPersistableEntityInformation.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2024 the original author or authors. + * Copyright 2011-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/JpaRepositoryConfigurationAware.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/JpaRepositoryConfigurationAware.java index d5b497f9a2..b8d6e2a587 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/JpaRepositoryConfigurationAware.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/JpaRepositoryConfigurationAware.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 the original author or authors. + * Copyright 2024-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/JpaRepositoryFactory.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/JpaRepositoryFactory.java index bffdafd46b..11f16448f6 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/JpaRepositoryFactory.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/JpaRepositoryFactory.java @@ -1,5 +1,5 @@ /* - * Copyright 2008-2024 the original author or authors. + * Copyright 2008-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/JpaRepositoryFactoryBean.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/JpaRepositoryFactoryBean.java index f75f45a8d1..86f2f14d6c 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/JpaRepositoryFactoryBean.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/JpaRepositoryFactoryBean.java @@ -1,5 +1,5 @@ /* - * Copyright 2008-2024 the original author or authors. + * Copyright 2008-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/JpaRepositoryImplementation.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/JpaRepositoryImplementation.java index d3a5b1c5fe..006b39a689 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/JpaRepositoryImplementation.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/JpaRepositoryImplementation.java @@ -1,5 +1,5 @@ /* - * Copyright 2017-2024 the original author or authors. + * Copyright 2017-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/MutableQueryHints.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/MutableQueryHints.java index 4a1e7443b6..46b7a7c77d 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/MutableQueryHints.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/MutableQueryHints.java @@ -1,5 +1,5 @@ /* - * Copyright 2020-2024 the original author or authors. + * Copyright 2020-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/QueryHintValue.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/QueryHintValue.java index c32b40f767..0d01e738a8 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/QueryHintValue.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/QueryHintValue.java @@ -1,5 +1,5 @@ /* - * Copyright 2020-2024 the original author or authors. + * Copyright 2020-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/QueryHints.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/QueryHints.java index 17e6d01725..8afea10892 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/QueryHints.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/QueryHints.java @@ -1,5 +1,5 @@ /* - * Copyright 2017-2024 the original author or authors. + * Copyright 2017-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/Querydsl.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/Querydsl.java index 0ade24f133..cd3945bd14 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/Querydsl.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/Querydsl.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2024 the original author or authors. + * Copyright 2012-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/QuerydslJpaPredicateExecutor.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/QuerydslJpaPredicateExecutor.java index 08f3b7ab07..ad0762f78d 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/QuerydslJpaPredicateExecutor.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/QuerydslJpaPredicateExecutor.java @@ -1,5 +1,5 @@ /* - * Copyright 2008-2024 the original author or authors. + * Copyright 2008-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/QuerydslJpaRepository.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/QuerydslJpaRepository.java index 0f32999b14..129d56f6e9 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/QuerydslJpaRepository.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/QuerydslJpaRepository.java @@ -1,5 +1,5 @@ /* - * Copyright 2008-2024 the original author or authors. + * Copyright 2008-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/QuerydslRepositorySupport.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/QuerydslRepositorySupport.java index a140b734b0..09c43e198b 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/QuerydslRepositorySupport.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/QuerydslRepositorySupport.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2024 the original author or authors. + * Copyright 2011-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/SimpleJpaRepository.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/SimpleJpaRepository.java index f40821ab30..c217aa54c8 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/SimpleJpaRepository.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/SimpleJpaRepository.java @@ -1,5 +1,5 @@ /* - * Copyright 2008-2024 the original author or authors. + * Copyright 2008-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/support/ClasspathScanningPersistenceUnitPostProcessor.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/support/ClasspathScanningPersistenceUnitPostProcessor.java index 8415d67959..324c37f327 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/support/ClasspathScanningPersistenceUnitPostProcessor.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/support/ClasspathScanningPersistenceUnitPostProcessor.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2024 the original author or authors. + * Copyright 2011-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/support/MergingPersistenceUnitManager.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/support/MergingPersistenceUnitManager.java index e2703107cc..c3c7fc384f 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/support/MergingPersistenceUnitManager.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/support/MergingPersistenceUnitManager.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2024 the original author or authors. + * Copyright 2011-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/support/PageableUtils.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/support/PageableUtils.java index c50a8f98aa..fab11c139a 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/support/PageableUtils.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/support/PageableUtils.java @@ -1,5 +1,5 @@ /* - * Copyright 2008-2024 the original author or authors. + * Copyright 2008-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/util/BeanDefinitionUtils.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/util/BeanDefinitionUtils.java index 80403737d5..a5c181ee0b 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/util/BeanDefinitionUtils.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/util/BeanDefinitionUtils.java @@ -1,5 +1,5 @@ /* - * Copyright 2014-2024 the original author or authors. + * Copyright 2014-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/util/HibernateProxyDetector.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/util/HibernateProxyDetector.java index 6969cfb4a5..149742c0b7 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/util/HibernateProxyDetector.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/util/HibernateProxyDetector.java @@ -1,5 +1,5 @@ /* - * Copyright 2018-2024 the original author or authors. + * Copyright 2018-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/util/JpaMetamodel.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/util/JpaMetamodel.java index c822dce291..2d3c5fbab8 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/util/JpaMetamodel.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/util/JpaMetamodel.java @@ -1,5 +1,5 @@ /* - * Copyright 2016-2024 the original author or authors. + * Copyright 2016-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/util/JpaMetamodelCacheCleanup.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/util/JpaMetamodelCacheCleanup.java index df17d56ade..c9c3e70447 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/util/JpaMetamodelCacheCleanup.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/util/JpaMetamodelCacheCleanup.java @@ -1,5 +1,5 @@ /* - * Copyright 2018-2024 the original author or authors. + * Copyright 2018-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/AntlrVersionTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/AntlrVersionTests.java index c694587167..7c18f5d466 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/AntlrVersionTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/AntlrVersionTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2023-2024 the original author or authors. + * Copyright 2023-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/convert/QueryByExamplePredicateBuilderUnitTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/convert/QueryByExamplePredicateBuilderUnitTests.java index 0cd7169d04..db43691aa5 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/convert/QueryByExamplePredicateBuilderUnitTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/convert/QueryByExamplePredicateBuilderUnitTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2016-2024 the original author or authors. + * Copyright 2016-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/convert/threeten/DateTimeSample.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/convert/threeten/DateTimeSample.java index 7743c9868c..579c430b83 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/convert/threeten/DateTimeSample.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/convert/threeten/DateTimeSample.java @@ -1,5 +1,5 @@ /* - * Copyright 2014-2024 the original author or authors. + * Copyright 2014-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/convert/threeten/Jsr310JpaConvertersIntegrationTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/convert/threeten/Jsr310JpaConvertersIntegrationTests.java index 5ef388138e..ff76fbd718 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/convert/threeten/Jsr310JpaConvertersIntegrationTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/convert/threeten/Jsr310JpaConvertersIntegrationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2014-2024 the original author or authors. + * Copyright 2014-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/convert/threeten/Jsr310JpaConvertersUnitTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/convert/threeten/Jsr310JpaConvertersUnitTests.java index 92a31cec4a..a1daf39d27 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/convert/threeten/Jsr310JpaConvertersUnitTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/convert/threeten/Jsr310JpaConvertersUnitTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2017-2024 the original author or authors. + * Copyright 2017-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/JpaSortTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/JpaSortTests.java index 53d3d0df21..dac929f40d 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/JpaSortTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/JpaSortTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2024 the original author or authors. + * Copyright 2013-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/SpecificationUnitTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/SpecificationUnitTests.java index aeb0c819ea..96f193b425 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/SpecificationUnitTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/SpecificationUnitTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2024 the original author or authors. + * Copyright 2013-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/AbstractAnnotatedAuditable.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/AbstractAnnotatedAuditable.java index 82adedca45..e3e2ee3472 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/AbstractAnnotatedAuditable.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/AbstractAnnotatedAuditable.java @@ -1,5 +1,5 @@ /* - * Copyright 2014-2024 the original author or authors. + * Copyright 2014-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/AbstractMappedType.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/AbstractMappedType.java index 60a37337b0..801b3fd9c9 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/AbstractMappedType.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/AbstractMappedType.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2024 the original author or authors. + * Copyright 2013-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/Account.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/Account.java index 856611e95f..787c4bd64f 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/Account.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/Account.java @@ -1,5 +1,5 @@ /* - * Copyright 2008-2024 the original author or authors. + * Copyright 2008-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/Address.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/Address.java index 468a3ba193..e5db7bfddf 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/Address.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/Address.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2024 the original author or authors. + * Copyright 2013-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/AnnotatedAuditableUser.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/AnnotatedAuditableUser.java index cbb435fbc2..44bcc91e6f 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/AnnotatedAuditableUser.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/AnnotatedAuditableUser.java @@ -1,5 +1,5 @@ /* - * Copyright 2014-2024 the original author or authors. + * Copyright 2014-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/AuditableEmbeddable.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/AuditableEmbeddable.java index 2cb8553073..40563a3f52 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/AuditableEmbeddable.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/AuditableEmbeddable.java @@ -1,5 +1,5 @@ /* - * Copyright 2008-2024 the original author or authors. + * Copyright 2008-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/AuditableEntity.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/AuditableEntity.java index 8cb2b861c8..730fe36d20 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/AuditableEntity.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/AuditableEntity.java @@ -1,5 +1,5 @@ /* - * Copyright 2008-2024 the original author or authors. + * Copyright 2008-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/AuditableRole.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/AuditableRole.java index 9fa9442b30..bfc17a68d2 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/AuditableRole.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/AuditableRole.java @@ -1,5 +1,5 @@ /* - * Copyright 2008-2024 the original author or authors. + * Copyright 2008-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/AuditableUser.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/AuditableUser.java index e69864c553..65d4e6e2ad 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/AuditableUser.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/AuditableUser.java @@ -1,5 +1,5 @@ /* - * Copyright 2008-2024 the original author or authors. + * Copyright 2008-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/AuditorAwareStub.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/AuditorAwareStub.java index 2ef54a1ff6..00124d98db 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/AuditorAwareStub.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/AuditorAwareStub.java @@ -1,5 +1,5 @@ /* - * Copyright 2008-2024 the original author or authors. + * Copyright 2008-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/Book.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/Book.java index e66c26ffab..e30fd93869 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/Book.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/Book.java @@ -1,5 +1,5 @@ /* - * Copyright 2008-2024 the original author or authors. + * Copyright 2008-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/Child.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/Child.java index 05673e35b0..f3df1a4fe2 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/Child.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/Child.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2024 the original author or authors. + * Copyright 2013-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/ConcreteType1.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/ConcreteType1.java index 90be74aeb7..28fb4e588f 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/ConcreteType1.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/ConcreteType1.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2024 the original author or authors. + * Copyright 2013-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/ConcreteType2.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/ConcreteType2.java index 356cc35d52..a30d7b4140 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/ConcreteType2.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/ConcreteType2.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2024 the original author or authors. + * Copyright 2013-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/CustomAbstractPersistable.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/CustomAbstractPersistable.java index aa136318aa..dd3fd70449 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/CustomAbstractPersistable.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/CustomAbstractPersistable.java @@ -1,5 +1,5 @@ /* - * Copyright 2014-2024 the original author or authors. + * Copyright 2014-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/Customer.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/Customer.java index 72d01a6267..f8442a9ae4 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/Customer.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/Customer.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2024 the original author or authors. + * Copyright 2013-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/Dummy.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/Dummy.java index e30afcd084..bb8bfe638a 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/Dummy.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/Dummy.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2024 the original author or authors. + * Copyright 2015-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/EmbeddedIdExampleDepartment.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/EmbeddedIdExampleDepartment.java index 043457222a..a7aa1b9dfc 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/EmbeddedIdExampleDepartment.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/EmbeddedIdExampleDepartment.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2024 the original author or authors. + * Copyright 2013-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/EmbeddedIdExampleEmployee.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/EmbeddedIdExampleEmployee.java index 0368411310..218c1f6e01 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/EmbeddedIdExampleEmployee.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/EmbeddedIdExampleEmployee.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2024 the original author or authors. + * Copyright 2013-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/EmbeddedIdExampleEmployeePK.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/EmbeddedIdExampleEmployeePK.java index 1b5e49bef7..393bb6b668 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/EmbeddedIdExampleEmployeePK.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/EmbeddedIdExampleEmployeePK.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2024 the original author or authors. + * Copyright 2013-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/EmployeeWithName.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/EmployeeWithName.java index ee4f273f10..4668ed04de 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/EmployeeWithName.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/EmployeeWithName.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2024 the original author or authors. + * Copyright 2012-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/EntityWithAssignedId.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/EntityWithAssignedId.java index 3204f31995..4226b8bb67 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/EntityWithAssignedId.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/EntityWithAssignedId.java @@ -1,5 +1,5 @@ /* - * Copyright 2019-2024 the original author or authors. + * Copyright 2019-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/IdClassExampleDepartment.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/IdClassExampleDepartment.java index 2539184afb..7db4bf3486 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/IdClassExampleDepartment.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/IdClassExampleDepartment.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2024 the original author or authors. + * Copyright 2013-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/IdClassExampleEmployee.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/IdClassExampleEmployee.java index 18df94dcec..6ad0aeb024 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/IdClassExampleEmployee.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/IdClassExampleEmployee.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2024 the original author or authors. + * Copyright 2013-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/IdClassExampleEmployeePK.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/IdClassExampleEmployeePK.java index 142c75b5f9..fd730da59d 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/IdClassExampleEmployeePK.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/IdClassExampleEmployeePK.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2024 the original author or authors. + * Copyright 2013-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/Invoice.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/Invoice.java index 2f5381f494..a0458759f6 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/Invoice.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/Invoice.java @@ -1,5 +1,5 @@ /* - * Copyright 2020-2024 the original author or authors. + * Copyright 2020-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/InvoiceItem.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/InvoiceItem.java index 1ff39954df..c791359af3 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/InvoiceItem.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/InvoiceItem.java @@ -1,5 +1,5 @@ /* - * Copyright 2020-2024 the original author or authors. + * Copyright 2020-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/Item.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/Item.java index 1625c2a794..7a01bdf620 100755 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/Item.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/Item.java @@ -1,5 +1,5 @@ /* - * Copyright 2016-2024 the original author or authors. + * Copyright 2016-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/ItemId.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/ItemId.java index 774c609c97..b58f92d049 100755 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/ItemId.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/ItemId.java @@ -1,5 +1,5 @@ /* - * Copyright 2016-2024 the original author or authors. + * Copyright 2016-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/ItemSite.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/ItemSite.java index b5da989a14..f5ad83e344 100755 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/ItemSite.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/ItemSite.java @@ -1,5 +1,5 @@ /* - * Copyright 2016-2024 the original author or authors. + * Copyright 2016-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/ItemSiteId.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/ItemSiteId.java index c691ac8f50..4d838de5e6 100755 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/ItemSiteId.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/ItemSiteId.java @@ -1,5 +1,5 @@ /* - * Copyright 2016-2024 the original author or authors. + * Copyright 2016-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/MailMessage.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/MailMessage.java index 08d5975559..065e9ec59b 100755 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/MailMessage.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/MailMessage.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2024 the original author or authors. + * Copyright 2013-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/MailSender.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/MailSender.java index a15de9c1f1..00fffaa244 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/MailSender.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/MailSender.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2024 the original author or authors. + * Copyright 2013-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/MailUser.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/MailUser.java index 49911d316a..16d5b2dbcd 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/MailUser.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/MailUser.java @@ -1,5 +1,5 @@ /* - * Copyright 2014-2024 the original author or authors. + * Copyright 2014-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/Order.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/Order.java index c9146c1bf6..2c544945b7 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/Order.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/Order.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2024 the original author or authors. + * Copyright 2013-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/OrmXmlEntity.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/OrmXmlEntity.java index b18eb9f18b..48ba2cdeb2 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/OrmXmlEntity.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/OrmXmlEntity.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2024 the original author or authors. + * Copyright 2015-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/Owner.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/Owner.java index 7661f038a1..820fc189fd 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/Owner.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/Owner.java @@ -1,5 +1,5 @@ /* - * Copyright 2008-2024 the original author or authors. + * Copyright 2008-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/OwnerContainer.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/OwnerContainer.java index 177b8b48ba..f726ca86c1 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/OwnerContainer.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/OwnerContainer.java @@ -1,5 +1,5 @@ /* - * Copyright 2008-2024 the original author or authors. + * Copyright 2008-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/Parent.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/Parent.java index b0a00f0ace..4b9e57c4fe 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/Parent.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/Parent.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2024 the original author or authors. + * Copyright 2013-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/PersistableWithIdClass.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/PersistableWithIdClass.java index 5b6d1277d9..08a31a09bf 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/PersistableWithIdClass.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/PersistableWithIdClass.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2024 the original author or authors. + * Copyright 2012-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/PersistableWithIdClassPK.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/PersistableWithIdClassPK.java index 5f7a6ffa43..0dcef9e938 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/PersistableWithIdClassPK.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/PersistableWithIdClassPK.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2024 the original author or authors. + * Copyright 2012-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/PersistableWithSingleIdClass.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/PersistableWithSingleIdClass.java index 38305b4b90..cefd449fc9 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/PersistableWithSingleIdClass.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/PersistableWithSingleIdClass.java @@ -1,5 +1,5 @@ /* - * Copyright 2021-2024 the original author or authors. + * Copyright 2021-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/PersistableWithSingleIdClassPK.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/PersistableWithSingleIdClassPK.java index e405b3c4ba..6466fd1dd8 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/PersistableWithSingleIdClassPK.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/PersistableWithSingleIdClassPK.java @@ -1,5 +1,5 @@ /* - * Copyright 2021-2024 the original author or authors. + * Copyright 2021-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/PrimitiveVersionProperty.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/PrimitiveVersionProperty.java index c3531adacc..694f896df8 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/PrimitiveVersionProperty.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/PrimitiveVersionProperty.java @@ -1,5 +1,5 @@ /* - * Copyright 2014-2024 the original author or authors. + * Copyright 2014-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/Role.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/Role.java index f9518a8fbc..101a784ee2 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/Role.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/Role.java @@ -1,5 +1,5 @@ /* - * Copyright 2008-2024 the original author or authors. + * Copyright 2008-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/SampleEntity.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/SampleEntity.java index 8fe586d843..3fafe176f1 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/SampleEntity.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/SampleEntity.java @@ -1,5 +1,5 @@ /* - * Copyright 2008-2024 the original author or authors. + * Copyright 2008-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/SampleEntityPK.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/SampleEntityPK.java index c46143f81d..2ad2f36f3f 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/SampleEntityPK.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/SampleEntityPK.java @@ -1,5 +1,5 @@ /* - * Copyright 2008-2024 the original author or authors. + * Copyright 2008-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/SampleWithPrimitiveId.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/SampleWithPrimitiveId.java index a84c1409f5..f1047f1d4f 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/SampleWithPrimitiveId.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/SampleWithPrimitiveId.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2024 the original author or authors. + * Copyright 2013-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/SampleWithTimestampVersion.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/SampleWithTimestampVersion.java index 7dc7d4ab59..3b17fb3a59 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/SampleWithTimestampVersion.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/SampleWithTimestampVersion.java @@ -1,5 +1,5 @@ /* - * Copyright 2014-2024 the original author or authors. + * Copyright 2014-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/Site.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/Site.java index 996561cdf4..591f4da96e 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/Site.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/Site.java @@ -1,5 +1,5 @@ /* - * Copyright 2016-2024 the original author or authors. + * Copyright 2016-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/User.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/User.java index ec981b020f..56f5595932 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/User.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/User.java @@ -1,5 +1,5 @@ /* - * Copyright 2008-2024 the original author or authors. + * Copyright 2008-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/UserSpecifications.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/UserSpecifications.java index 3b4d0cbbcd..304dcb5607 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/UserSpecifications.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/UserSpecifications.java @@ -1,5 +1,5 @@ /* - * Copyright 2008-2024 the original author or authors. + * Copyright 2008-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/UserWithOptionalField.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/UserWithOptionalField.java index b4029f4717..cdfb9a3bfc 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/UserWithOptionalField.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/UserWithOptionalField.java @@ -1,5 +1,5 @@ /* - * Copyright 2008-2024 the original author or authors. + * Copyright 2008-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/UserWithOptionalFieldRepository.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/UserWithOptionalFieldRepository.java index 348b4433c6..c2ead4cdf7 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/UserWithOptionalFieldRepository.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/UserWithOptionalFieldRepository.java @@ -1,5 +1,5 @@ /* - * Copyright 2008-2024 the original author or authors. + * Copyright 2008-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/VersionedUser.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/VersionedUser.java index 5e5927e1e4..58ff336205 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/VersionedUser.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/sample/VersionedUser.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2024 the original author or authors. + * Copyright 2013-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/support/AbstractAttributeConverterIntegrationTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/support/AbstractAttributeConverterIntegrationTests.java index c5a088ddec..34fb8b1bf4 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/support/AbstractAttributeConverterIntegrationTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/support/AbstractAttributeConverterIntegrationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2024 the original author or authors. + * Copyright 2015-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/support/AnnotationAuditingBeanFactoryPostProcessorUnitTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/support/AnnotationAuditingBeanFactoryPostProcessorUnitTests.java index 39160aee50..94702362a0 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/support/AnnotationAuditingBeanFactoryPostProcessorUnitTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/support/AnnotationAuditingBeanFactoryPostProcessorUnitTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2024 the original author or authors. + * Copyright 2013-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/support/AuditingBeanFactoryPostProcessorUnitTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/support/AuditingBeanFactoryPostProcessorUnitTests.java index e34cec061d..c5ed0d79df 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/support/AuditingBeanFactoryPostProcessorUnitTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/support/AuditingBeanFactoryPostProcessorUnitTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2008-2024 the original author or authors. + * Copyright 2008-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/support/AuditingEntityListenerTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/support/AuditingEntityListenerTests.java index e95c8b0542..674fef7bf9 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/support/AuditingEntityListenerTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/support/AuditingEntityListenerTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2008-2024 the original author or authors. + * Copyright 2008-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/support/AuditingEntityWithEmbeddableListenerTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/support/AuditingEntityWithEmbeddableListenerTests.java index 2887bb4dd3..6701ddc4b9 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/support/AuditingEntityWithEmbeddableListenerTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/support/AuditingEntityWithEmbeddableListenerTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2008-2024 the original author or authors. + * Copyright 2008-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/support/AuditingNamespaceUnitTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/support/AuditingNamespaceUnitTests.java index 2835201104..510793ad72 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/support/AuditingNamespaceUnitTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/support/AuditingNamespaceUnitTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2008-2024 the original author or authors. + * Copyright 2008-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/support/QueryByExampleWithOptionalEmptyTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/support/QueryByExampleWithOptionalEmptyTests.java index d5711367ef..21c04b3145 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/support/QueryByExampleWithOptionalEmptyTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/support/QueryByExampleWithOptionalEmptyTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2008-2024 the original author or authors. + * Copyright 2008-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/infrastructure/EclipseLinkMetamodelIntegrationTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/infrastructure/EclipseLinkMetamodelIntegrationTests.java index 93ff873092..e3cf795046 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/infrastructure/EclipseLinkMetamodelIntegrationTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/infrastructure/EclipseLinkMetamodelIntegrationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2024 the original author or authors. + * Copyright 2013-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/infrastructure/HibernateMetamodelIntegrationTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/infrastructure/HibernateMetamodelIntegrationTests.java index 284287c990..6ecaceccbc 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/infrastructure/HibernateMetamodelIntegrationTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/infrastructure/HibernateMetamodelIntegrationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2024 the original author or authors. + * Copyright 2015-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/infrastructure/HibernateTestUtils.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/infrastructure/HibernateTestUtils.java index 82efcfadd3..02d29a7673 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/infrastructure/HibernateTestUtils.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/infrastructure/HibernateTestUtils.java @@ -1,5 +1,5 @@ /* - * Copyright 2016-2024 the original author or authors. + * Copyright 2016-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/infrastructure/MetamodelIntegrationTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/infrastructure/MetamodelIntegrationTests.java index 2f48b244b4..c821dd76a5 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/infrastructure/MetamodelIntegrationTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/infrastructure/MetamodelIntegrationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2024 the original author or authors. + * Copyright 2013-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/infrastructure/OpenJpaMetamodelIntegrationTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/infrastructure/OpenJpaMetamodelIntegrationTests.java index 8e437f6473..16983f0f88 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/infrastructure/OpenJpaMetamodelIntegrationTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/infrastructure/OpenJpaMetamodelIntegrationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2024 the original author or authors. + * Copyright 2013-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/mapping/JpaMetamodelMappingContextIntegrationTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/mapping/JpaMetamodelMappingContextIntegrationTests.java index 3ed9eaf357..4e2d3c32ea 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/mapping/JpaMetamodelMappingContextIntegrationTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/mapping/JpaMetamodelMappingContextIntegrationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2024 the original author or authors. + * Copyright 2012-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/mapping/JpaMetamodelMappingContextUnitTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/mapping/JpaMetamodelMappingContextUnitTests.java index ff83c9672e..03962c2aa6 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/mapping/JpaMetamodelMappingContextUnitTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/mapping/JpaMetamodelMappingContextUnitTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2024 the original author or authors. + * Copyright 2015-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/mapping/JpaPersistentPropertyImplUnitTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/mapping/JpaPersistentPropertyImplUnitTests.java index e7d42e9e76..ef3af850a1 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/mapping/JpaPersistentPropertyImplUnitTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/mapping/JpaPersistentPropertyImplUnitTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2024 the original author or authors. + * Copyright 2013-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/provider/PersistenceProviderIntegrationTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/provider/PersistenceProviderIntegrationTests.java index b28943e2d5..0f27bd1422 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/provider/PersistenceProviderIntegrationTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/provider/PersistenceProviderIntegrationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2014-2024 the original author or authors. + * Copyright 2014-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/provider/PersistenceProviderUnitTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/provider/PersistenceProviderUnitTests.java index bcb9582bc6..ba7c3abed7 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/provider/PersistenceProviderUnitTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/provider/PersistenceProviderUnitTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2014-2024 the original author or authors. + * Copyright 2014-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/AbstractPersistableIntegrationTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/AbstractPersistableIntegrationTests.java index 67ce3cfa50..bad12168d4 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/AbstractPersistableIntegrationTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/AbstractPersistableIntegrationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2014-2024 the original author or authors. + * Copyright 2014-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/CrudMethodMetadataUnitTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/CrudMethodMetadataUnitTests.java index 76c7e95662..52e217bb71 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/CrudMethodMetadataUnitTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/CrudMethodMetadataUnitTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2024 the original author or authors. + * Copyright 2011-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/CustomAbstractPersistableIntegrationTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/CustomAbstractPersistableIntegrationTests.java index 46353534a1..a5ac1bd413 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/CustomAbstractPersistableIntegrationTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/CustomAbstractPersistableIntegrationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2014-2024 the original author or authors. + * Copyright 2014-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/CustomEclipseLinkJpaVendorAdapter.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/CustomEclipseLinkJpaVendorAdapter.java index 124fff7adb..6919ba545d 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/CustomEclipseLinkJpaVendorAdapter.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/CustomEclipseLinkJpaVendorAdapter.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2024 the original author or authors. + * Copyright 2015-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/CustomHsqlHibernateJpaVendorAdaptor.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/CustomHsqlHibernateJpaVendorAdaptor.java index 2957ab2e87..359bda9b5e 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/CustomHsqlHibernateJpaVendorAdaptor.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/CustomHsqlHibernateJpaVendorAdaptor.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2024 the original author or authors. + * Copyright 2012-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/EclipseLinkEntityGraphRepositoryMethodsIntegrationTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/EclipseLinkEntityGraphRepositoryMethodsIntegrationTests.java index e0d21dc716..74820a58a2 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/EclipseLinkEntityGraphRepositoryMethodsIntegrationTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/EclipseLinkEntityGraphRepositoryMethodsIntegrationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2014-2024 the original author or authors. + * Copyright 2014-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/EclipseLinkNamespaceUserRepositoryTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/EclipseLinkNamespaceUserRepositoryTests.java index 6eb1d40dda..c3bc0da88a 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/EclipseLinkNamespaceUserRepositoryTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/EclipseLinkNamespaceUserRepositoryTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2008-2024 the original author or authors. + * Copyright 2008-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/EclipseLinkParentRepositoryIntegrationTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/EclipseLinkParentRepositoryIntegrationTests.java index 06d1575fd5..796e14be8a 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/EclipseLinkParentRepositoryIntegrationTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/EclipseLinkParentRepositoryIntegrationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2024 the original author or authors. + * Copyright 2013-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/EclipseLinkQueryByExampleIntegrationTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/EclipseLinkQueryByExampleIntegrationTests.java index afea59666d..1f0e5e1300 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/EclipseLinkQueryByExampleIntegrationTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/EclipseLinkQueryByExampleIntegrationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2008-2024 the original author or authors. + * Copyright 2008-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/EclipseLinkRepositoryWithCompositeKeyIntegrationTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/EclipseLinkRepositoryWithCompositeKeyIntegrationTests.java index 82ca0c59a9..a2f1bbb5db 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/EclipseLinkRepositoryWithCompositeKeyIntegrationTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/EclipseLinkRepositoryWithCompositeKeyIntegrationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2016-2024 the original author or authors. + * Copyright 2016-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/EclipseLinkStoredProcedureIntegrationTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/EclipseLinkStoredProcedureIntegrationTests.java index e3ff3d5c07..71a583ebc1 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/EclipseLinkStoredProcedureIntegrationTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/EclipseLinkStoredProcedureIntegrationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2008-2024 the original author or authors. + * Copyright 2008-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/EclipseLinkUserRepositoryFinderTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/EclipseLinkUserRepositoryFinderTests.java index 99343adb99..75cfa39d82 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/EclipseLinkUserRepositoryFinderTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/EclipseLinkUserRepositoryFinderTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2024 the original author or authors. + * Copyright 2011-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/EntityGraphRepositoryMethodsIntegrationTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/EntityGraphRepositoryMethodsIntegrationTests.java index 1086577a21..7191b85a4d 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/EntityGraphRepositoryMethodsIntegrationTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/EntityGraphRepositoryMethodsIntegrationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2014-2024 the original author or authors. + * Copyright 2014-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/EntityWithAssignedIdIntegrationTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/EntityWithAssignedIdIntegrationTests.java index 10a84ed886..05e6714895 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/EntityWithAssignedIdIntegrationTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/EntityWithAssignedIdIntegrationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2019-2024 the original author or authors. + * Copyright 2019-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/GreetingsFrom.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/GreetingsFrom.java index 247944ccd0..3e31f95ffb 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/GreetingsFrom.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/GreetingsFrom.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 the original author or authors. + * Copyright 2024-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/JavaConfigUserRepositoryTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/JavaConfigUserRepositoryTests.java index b1aeb29c3a..d87b9e152c 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/JavaConfigUserRepositoryTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/JavaConfigUserRepositoryTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2024 the original author or authors. + * Copyright 2012-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/MappedTypeRepositoryIntegrationTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/MappedTypeRepositoryIntegrationTests.java index 1a33ab4bc2..42428a19f2 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/MappedTypeRepositoryIntegrationTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/MappedTypeRepositoryIntegrationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2024 the original author or authors. + * Copyright 2013-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/NamespaceUserRepositoryTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/NamespaceUserRepositoryTests.java index a37117e848..5c99719d12 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/NamespaceUserRepositoryTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/NamespaceUserRepositoryTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2008-2024 the original author or authors. + * Copyright 2008-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/ORMInfrastructureTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/ORMInfrastructureTests.java index 98bd534a78..5cbb6a96bb 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/ORMInfrastructureTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/ORMInfrastructureTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2008-2024 the original author or authors. + * Copyright 2008-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/OpenJpaEntityGraphRepositoryMethodsIntegrationTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/OpenJpaEntityGraphRepositoryMethodsIntegrationTests.java index 22390b7682..c42ae99579 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/OpenJpaEntityGraphRepositoryMethodsIntegrationTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/OpenJpaEntityGraphRepositoryMethodsIntegrationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2014-2024 the original author or authors. + * Copyright 2014-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/OpenJpaNamespaceUserRepositoryTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/OpenJpaNamespaceUserRepositoryTests.java index cfe023d9c6..a69fb9e35c 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/OpenJpaNamespaceUserRepositoryTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/OpenJpaNamespaceUserRepositoryTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2008-2024 the original author or authors. + * Copyright 2008-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/OpenJpaParentRepositoryIntegrationTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/OpenJpaParentRepositoryIntegrationTests.java index 5cf9bc4917..d94ed598c0 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/OpenJpaParentRepositoryIntegrationTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/OpenJpaParentRepositoryIntegrationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2024 the original author or authors. + * Copyright 2013-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/OpenJpaRepositoryWithCompositeKeyIntegrationTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/OpenJpaRepositoryWithCompositeKeyIntegrationTests.java index e3c8eeb334..c6acc17b33 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/OpenJpaRepositoryWithCompositeKeyIntegrationTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/OpenJpaRepositoryWithCompositeKeyIntegrationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2016-2024 the original author or authors. + * Copyright 2016-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/OpenJpaStoredProcedureIntegrationTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/OpenJpaStoredProcedureIntegrationTests.java index 993cb32a04..6984b99e27 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/OpenJpaStoredProcedureIntegrationTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/OpenJpaStoredProcedureIntegrationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2024 the original author or authors. + * Copyright 2015-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/OpenJpaUserRepositoryFinderTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/OpenJpaUserRepositoryFinderTests.java index d53d6bd531..d1e1b01f66 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/OpenJpaUserRepositoryFinderTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/OpenJpaUserRepositoryFinderTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2024 the original author or authors. + * Copyright 2011-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/ParentRepositoryIntegrationTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/ParentRepositoryIntegrationTests.java index 6b85895950..7b53e6669b 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/ParentRepositoryIntegrationTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/ParentRepositoryIntegrationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2024 the original author or authors. + * Copyright 2013-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/QueryByExampleIntegrationTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/QueryByExampleIntegrationTests.java index a5302d9506..458954f3e1 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/QueryByExampleIntegrationTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/QueryByExampleIntegrationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2008-2024 the original author or authors. + * Copyright 2008-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/RedeclaringRepositoryMethodsTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/RedeclaringRepositoryMethodsTests.java index b8b1f54511..c4f5c4e30d 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/RedeclaringRepositoryMethodsTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/RedeclaringRepositoryMethodsTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2024 the original author or authors. + * Copyright 2013-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/RepositoryWithCompositeKeyTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/RepositoryWithCompositeKeyTests.java index 64b51acb1c..20613cc1d6 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/RepositoryWithCompositeKeyTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/RepositoryWithCompositeKeyTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2024 the original author or authors. + * Copyright 2013-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/RepositoryWithIdClassKeyTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/RepositoryWithIdClassKeyTests.java index b0cbec6b44..5cc0f45ce0 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/RepositoryWithIdClassKeyTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/RepositoryWithIdClassKeyTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2016-2024 the original author or authors. + * Copyright 2016-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/RoleRepositoryIntegrationTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/RoleRepositoryIntegrationTests.java index 2a8f849823..5fc3573d64 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/RoleRepositoryIntegrationTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/RoleRepositoryIntegrationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2024 the original author or authors. + * Copyright 2011-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/SPR8954Tests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/SPR8954Tests.java index f731ca2c66..f2a0042a32 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/SPR8954Tests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/SPR8954Tests.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2024 the original author or authors. + * Copyright 2012-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/SimpleJpaParameterBindingTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/SimpleJpaParameterBindingTests.java index bc11790d8e..efe754ad7b 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/SimpleJpaParameterBindingTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/SimpleJpaParameterBindingTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2024 the original author or authors. + * Copyright 2011-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/StoredProcedureIntegrationTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/StoredProcedureIntegrationTests.java index 93615637f5..8cc377e059 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/StoredProcedureIntegrationTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/StoredProcedureIntegrationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2024 the original author or authors. + * Copyright 2015-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/UserRepositoryFinderTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/UserRepositoryFinderTests.java index 6a8c06789d..b47d1a277c 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/UserRepositoryFinderTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/UserRepositoryFinderTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2008-2024 the original author or authors. + * Copyright 2008-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/UserRepositoryStoredProcedureIntegrationTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/UserRepositoryStoredProcedureIntegrationTests.java index de57832f7a..1f158fa4fd 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/UserRepositoryStoredProcedureIntegrationTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/UserRepositoryStoredProcedureIntegrationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2014-2024 the original author or authors. + * Copyright 2014-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/UserRepositoryTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/UserRepositoryTests.java index d549077eec..cc201a01b7 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/UserRepositoryTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/UserRepositoryTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2008-2024 the original author or authors. + * Copyright 2008-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/aot/JpaRuntimeHintsUnitTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/aot/JpaRuntimeHintsUnitTests.java index bce5b13fcd..9f7f6b5f0e 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/aot/JpaRuntimeHintsUnitTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/aot/JpaRuntimeHintsUnitTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2022-2024 the original author or authors. + * Copyright 2022-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/cdi/CdiExtensionIntegrationTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/cdi/CdiExtensionIntegrationTests.java index 1d44e9bf86..e04c20790e 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/cdi/CdiExtensionIntegrationTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/cdi/CdiExtensionIntegrationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2024 the original author or authors. + * Copyright 2011-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/cdi/EntityManagerFactoryProducer.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/cdi/EntityManagerFactoryProducer.java index a00c0d43b5..d293674d49 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/cdi/EntityManagerFactoryProducer.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/cdi/EntityManagerFactoryProducer.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2024 the original author or authors. + * Copyright 2011-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/cdi/JpaQueryRewriterWithCdiIntegrationTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/cdi/JpaQueryRewriterWithCdiIntegrationTests.java index 30d6a7b85d..92994cfef3 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/cdi/JpaQueryRewriterWithCdiIntegrationTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/cdi/JpaQueryRewriterWithCdiIntegrationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2022-2024 the original author or authors. + * Copyright 2022-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/cdi/JpaRepositoryExtensionUnitTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/cdi/JpaRepositoryExtensionUnitTests.java index 3b76bc9a05..7c8b6c8d94 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/cdi/JpaRepositoryExtensionUnitTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/cdi/JpaRepositoryExtensionUnitTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2024 the original author or authors. + * Copyright 2013-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/cdi/Person.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/cdi/Person.java index a889375381..007de3b9c9 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/cdi/Person.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/cdi/Person.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2024 the original author or authors. + * Copyright 2011-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/cdi/PersonDB.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/cdi/PersonDB.java index c91f3f97bb..abb7b5e6fd 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/cdi/PersonDB.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/cdi/PersonDB.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2024 the original author or authors. + * Copyright 2011-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/cdi/PersonRepository.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/cdi/PersonRepository.java index 72b4956aba..eb8468db45 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/cdi/PersonRepository.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/cdi/PersonRepository.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2024 the original author or authors. + * Copyright 2011-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/cdi/QualifiedCustomizedCdiConfiguration.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/cdi/QualifiedCustomizedCdiConfiguration.java index 67e387afbb..ad47eda044 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/cdi/QualifiedCustomizedCdiConfiguration.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/cdi/QualifiedCustomizedCdiConfiguration.java @@ -1,5 +1,5 @@ /* - * Copyright 2014-2024 the original author or authors. + * Copyright 2014-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/cdi/QualifiedCustomizedUserRepository.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/cdi/QualifiedCustomizedUserRepository.java index 2d41f76bf6..d43704a813 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/cdi/QualifiedCustomizedUserRepository.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/cdi/QualifiedCustomizedUserRepository.java @@ -1,5 +1,5 @@ /* - * Copyright 2014-2024 the original author or authors. + * Copyright 2014-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/cdi/QualifiedCustomizedUserRepositoryBean.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/cdi/QualifiedCustomizedUserRepositoryBean.java index 779fa370ea..7a34f07fb4 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/cdi/QualifiedCustomizedUserRepositoryBean.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/cdi/QualifiedCustomizedUserRepositoryBean.java @@ -1,5 +1,5 @@ /* - * Copyright 2014-2024 the original author or authors. + * Copyright 2014-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/cdi/QualifiedCustomizedUserRepositoryCustom.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/cdi/QualifiedCustomizedUserRepositoryCustom.java index e4d49f78a0..ed789c32ca 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/cdi/QualifiedCustomizedUserRepositoryCustom.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/cdi/QualifiedCustomizedUserRepositoryCustom.java @@ -1,5 +1,5 @@ /* - * Copyright 2014-2024 the original author or authors. + * Copyright 2014-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/cdi/QualifiedEntityManagerProducer.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/cdi/QualifiedEntityManagerProducer.java index 5a2a045bb1..093b5afc16 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/cdi/QualifiedEntityManagerProducer.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/cdi/QualifiedEntityManagerProducer.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2024 the original author or authors. + * Copyright 2011-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/cdi/QualifiedFragment.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/cdi/QualifiedFragment.java index f379d09c1b..4702152d9b 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/cdi/QualifiedFragment.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/cdi/QualifiedFragment.java @@ -1,5 +1,5 @@ /* - * Copyright 2018-2024 the original author or authors. + * Copyright 2018-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/cdi/QualifiedFragmentBean.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/cdi/QualifiedFragmentBean.java index 6ff85427b4..54ce392031 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/cdi/QualifiedFragmentBean.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/cdi/QualifiedFragmentBean.java @@ -1,5 +1,5 @@ /* - * Copyright 2018-2024 the original author or authors. + * Copyright 2018-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/cdi/QualifiedPersonRepository.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/cdi/QualifiedPersonRepository.java index a9fc2fe9a3..487121fc7a 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/cdi/QualifiedPersonRepository.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/cdi/QualifiedPersonRepository.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2024 the original author or authors. + * Copyright 2011-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/cdi/RepositoryConsumer.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/cdi/RepositoryConsumer.java index f9ff0fa711..2833ea63b0 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/cdi/RepositoryConsumer.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/cdi/RepositoryConsumer.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2024 the original author or authors. + * Copyright 2011-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/cdi/SamplePersonRepository.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/cdi/SamplePersonRepository.java index 5e99a709a4..559370d8fe 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/cdi/SamplePersonRepository.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/cdi/SamplePersonRepository.java @@ -1,5 +1,5 @@ /* - * Copyright 2014-2024 the original author or authors. + * Copyright 2014-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/cdi/SamplePersonRepositoryCustom.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/cdi/SamplePersonRepositoryCustom.java index 072332f0fb..66a910a882 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/cdi/SamplePersonRepositoryCustom.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/cdi/SamplePersonRepositoryCustom.java @@ -1,5 +1,5 @@ /* - * Copyright 2014-2024 the original author or authors. + * Copyright 2014-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/cdi/SamplePersonRepositoryImpl.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/cdi/SamplePersonRepositoryImpl.java index 4e14a00ea4..ed7ef43cdd 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/cdi/SamplePersonRepositoryImpl.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/cdi/SamplePersonRepositoryImpl.java @@ -1,5 +1,5 @@ /* - * Copyright 2014-2024 the original author or authors. + * Copyright 2014-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/cdi/Transactional.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/cdi/Transactional.java index ddc35d77bc..d50e810b25 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/cdi/Transactional.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/cdi/Transactional.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2024 the original author or authors. + * Copyright 2011-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/cdi/TransactionalInterceptor.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/cdi/TransactionalInterceptor.java index 1e9813df95..51d2bc3b29 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/cdi/TransactionalInterceptor.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/cdi/TransactionalInterceptor.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2024 the original author or authors. + * Copyright 2011-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/cdi/UnqualifiedEntityManagerProducer.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/cdi/UnqualifiedEntityManagerProducer.java index d18edec881..43eded0a81 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/cdi/UnqualifiedEntityManagerProducer.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/cdi/UnqualifiedEntityManagerProducer.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2024 the original author or authors. + * Copyright 2011-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/cdi/UnqualifiedPersonRepository.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/cdi/UnqualifiedPersonRepository.java index 47677d70ac..fb7a4dd096 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/cdi/UnqualifiedPersonRepository.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/cdi/UnqualifiedPersonRepository.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2024 the original author or authors. + * Copyright 2011-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/cdi/UserDB.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/cdi/UserDB.java index d89737beb0..93f14563c7 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/cdi/UserDB.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/cdi/UserDB.java @@ -1,5 +1,5 @@ /* - * Copyright 2014-2024 the original author or authors. + * Copyright 2014-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/config/AbstractAuditingViaJavaConfigRepositoriesTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/config/AbstractAuditingViaJavaConfigRepositoriesTests.java index 7a5fb05c0d..5285ed2e3e 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/config/AbstractAuditingViaJavaConfigRepositoriesTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/config/AbstractAuditingViaJavaConfigRepositoriesTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2024 the original author or authors. + * Copyright 2013-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/config/AbstractRepositoryConfigTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/config/AbstractRepositoryConfigTests.java index 8d6baca3e3..64da44a6a0 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/config/AbstractRepositoryConfigTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/config/AbstractRepositoryConfigTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2008-2024 the original author or authors. + * Copyright 2008-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/config/AllowNestedRepositoriesRepositoryConfigTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/config/AllowNestedRepositoriesRepositoryConfigTests.java index 6110e02b1c..edae851478 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/config/AllowNestedRepositoriesRepositoryConfigTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/config/AllowNestedRepositoriesRepositoryConfigTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2024 the original author or authors. + * Copyright 2013-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/config/AuditingBeanDefinitionParserTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/config/AuditingBeanDefinitionParserTests.java index 14edf2c213..b739493a23 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/config/AuditingBeanDefinitionParserTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/config/AuditingBeanDefinitionParserTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2008-2024 the original author or authors. + * Copyright 2008-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/config/CustomRepositoryFactoryConfigTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/config/CustomRepositoryFactoryConfigTests.java index 9dc0b3d0fc..02f2f2a1fe 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/config/CustomRepositoryFactoryConfigTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/config/CustomRepositoryFactoryConfigTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2008-2024 the original author or authors. + * Copyright 2008-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/config/DefaultAuditingViaJavaConfigRepositoriesTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/config/DefaultAuditingViaJavaConfigRepositoriesTests.java index 69206bb28e..5e40224732 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/config/DefaultAuditingViaJavaConfigRepositoriesTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/config/DefaultAuditingViaJavaConfigRepositoriesTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2024 the original author or authors. + * Copyright 2013-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/config/ExplicitAuditingViaJavaConfigRepositoriesTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/config/ExplicitAuditingViaJavaConfigRepositoriesTests.java index cc3ff4e612..d0c5fd06f4 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/config/ExplicitAuditingViaJavaConfigRepositoriesTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/config/ExplicitAuditingViaJavaConfigRepositoriesTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2024 the original author or authors. + * Copyright 2013-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/config/InfrastructureConfig.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/config/InfrastructureConfig.java index 8542911649..4fdaad1022 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/config/InfrastructureConfig.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/config/InfrastructureConfig.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2024 the original author or authors. + * Copyright 2013-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/config/InspectionClassLoaderUnitTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/config/InspectionClassLoaderUnitTests.java index beb61ed5ad..0b3da373e5 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/config/InspectionClassLoaderUnitTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/config/InspectionClassLoaderUnitTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2018-2024 the original author or authors. + * Copyright 2018-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/config/JpaAuditingRegistrarUnitTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/config/JpaAuditingRegistrarUnitTests.java index 623f3d5249..504ac40d24 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/config/JpaAuditingRegistrarUnitTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/config/JpaAuditingRegistrarUnitTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2024 the original author or authors. + * Copyright 2013-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/config/JpaRepositoriesRegistrarIntegrationTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/config/JpaRepositoriesRegistrarIntegrationTests.java index d6b550f0ea..8d4a11955e 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/config/JpaRepositoriesRegistrarIntegrationTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/config/JpaRepositoriesRegistrarIntegrationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2024 the original author or authors. + * Copyright 2012-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/config/JpaRepositoriesRegistrarUnitTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/config/JpaRepositoriesRegistrarUnitTests.java index 144079a085..aa16810d00 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/config/JpaRepositoriesRegistrarUnitTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/config/JpaRepositoriesRegistrarUnitTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2024 the original author or authors. + * Copyright 2012-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/config/JpaRepositoryConfigDefinitionParserTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/config/JpaRepositoryConfigDefinitionParserTests.java index 09751277d3..2cbadc8275 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/config/JpaRepositoryConfigDefinitionParserTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/config/JpaRepositoryConfigDefinitionParserTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2008-2024 the original author or authors. + * Copyright 2008-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/config/JpaRepositoryConfigExtensionUnitTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/config/JpaRepositoryConfigExtensionUnitTests.java index 54ca71d9f7..df4e2097e5 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/config/JpaRepositoryConfigExtensionUnitTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/config/JpaRepositoryConfigExtensionUnitTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2024 the original author or authors. + * Copyright 2013-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/config/JpaRepositoryRegistrationAotProcessorUnitTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/config/JpaRepositoryRegistrationAotProcessorUnitTests.java index ef9011e437..714abc2afa 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/config/JpaRepositoryRegistrationAotProcessorUnitTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/config/JpaRepositoryRegistrationAotProcessorUnitTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2022-2024 the original author or authors. + * Copyright 2022-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/config/NestedRepositoriesJavaConfigTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/config/NestedRepositoriesJavaConfigTests.java index 2cf100c402..7384a64cb6 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/config/NestedRepositoriesJavaConfigTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/config/NestedRepositoriesJavaConfigTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2024 the original author or authors. + * Copyright 2013-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/config/QueryLookupStrategyTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/config/QueryLookupStrategyTests.java index 7ea61726f6..22cb434931 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/config/QueryLookupStrategyTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/config/QueryLookupStrategyTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2008-2024 the original author or authors. + * Copyright 2008-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/config/RepositoriesJavaConfigTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/config/RepositoriesJavaConfigTests.java index 688e5471a8..bb40ccfc01 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/config/RepositoriesJavaConfigTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/config/RepositoriesJavaConfigTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2024 the original author or authors. + * Copyright 2013-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/config/RepositoryAutoConfigTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/config/RepositoryAutoConfigTests.java index a6eada978a..f08f7bb2ee 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/config/RepositoryAutoConfigTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/config/RepositoryAutoConfigTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2008-2024 the original author or authors. + * Copyright 2008-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/config/RepositoryConfigTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/config/RepositoryConfigTests.java index 10977363f9..722e137690 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/config/RepositoryConfigTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/config/RepositoryConfigTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2008-2024 the original author or authors. + * Copyright 2008-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/config/TypeFilterConfigTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/config/TypeFilterConfigTests.java index b8e35ce52b..56b449f9b6 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/config/TypeFilterConfigTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/config/TypeFilterConfigTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2008-2024 the original author or authors. + * Copyright 2008-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/custom/CustomGenericJpaRepository.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/custom/CustomGenericJpaRepository.java index e9c53f287a..00fe7c6aa1 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/custom/CustomGenericJpaRepository.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/custom/CustomGenericJpaRepository.java @@ -1,5 +1,5 @@ /* - * Copyright 2008-2024 the original author or authors. + * Copyright 2008-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/custom/CustomGenericJpaRepositoryFactory.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/custom/CustomGenericJpaRepositoryFactory.java index ab6b76002b..d898522b32 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/custom/CustomGenericJpaRepositoryFactory.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/custom/CustomGenericJpaRepositoryFactory.java @@ -1,5 +1,5 @@ /* - * Copyright 2008-2024 the original author or authors. + * Copyright 2008-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/custom/CustomGenericJpaRepositoryFactoryBean.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/custom/CustomGenericJpaRepositoryFactoryBean.java index 09a702b6f0..b2c13f48dc 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/custom/CustomGenericJpaRepositoryFactoryBean.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/custom/CustomGenericJpaRepositoryFactoryBean.java @@ -1,5 +1,5 @@ /* - * Copyright 2008-2024 the original author or authors. + * Copyright 2008-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/custom/CustomGenericRepository.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/custom/CustomGenericRepository.java index b39c31c296..b5d8b10b8e 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/custom/CustomGenericRepository.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/custom/CustomGenericRepository.java @@ -1,5 +1,5 @@ /* - * Copyright 2008-2024 the original author or authors. + * Copyright 2008-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/custom/UserCustomExtendedRepository.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/custom/UserCustomExtendedRepository.java index dd537e7155..1606e832f8 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/custom/UserCustomExtendedRepository.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/custom/UserCustomExtendedRepository.java @@ -1,5 +1,5 @@ /* - * Copyright 2008-2024 the original author or authors. + * Copyright 2008-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/generics/EclipseLinkGenericsIntegrationTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/generics/EclipseLinkGenericsIntegrationTests.java index e7725e53e6..9c3019106f 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/generics/EclipseLinkGenericsIntegrationTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/generics/EclipseLinkGenericsIntegrationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2014-2024 the original author or authors. + * Copyright 2014-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/generics/GenericsIntegrationTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/generics/GenericsIntegrationTests.java index 364bcbfa7f..ce40a725bc 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/generics/GenericsIntegrationTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/generics/GenericsIntegrationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2014-2024 the original author or authors. + * Copyright 2014-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/procedures/MySqlStoredProcedureIntegrationTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/procedures/MySqlStoredProcedureIntegrationTests.java index b248e809f6..5366736fc9 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/procedures/MySqlStoredProcedureIntegrationTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/procedures/MySqlStoredProcedureIntegrationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2024 the original author or authors. + * Copyright 2015-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/procedures/PostgresStoredProcedureIntegrationTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/procedures/PostgresStoredProcedureIntegrationTests.java index b3c76d25b1..af07eb0013 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/procedures/PostgresStoredProcedureIntegrationTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/procedures/PostgresStoredProcedureIntegrationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2024 the original author or authors. + * Copyright 2015-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/procedures/PostgresStoredProcedureNullHandlingIntegrationTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/procedures/PostgresStoredProcedureNullHandlingIntegrationTests.java index 98783a9c28..c5fba7eff7 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/procedures/PostgresStoredProcedureNullHandlingIntegrationTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/procedures/PostgresStoredProcedureNullHandlingIntegrationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2024 the original author or authors. + * Copyright 2015-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/procedures/StoredProcedureConfigSupport.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/procedures/StoredProcedureConfigSupport.java index 0b8ef1f9cd..998245126b 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/procedures/StoredProcedureConfigSupport.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/procedures/StoredProcedureConfigSupport.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 the original author or authors. + * Copyright 2024-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/projections/ProjectionJoinIntegrationTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/projections/ProjectionJoinIntegrationTests.java index 1c952765e6..d0bdce94bd 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/projections/ProjectionJoinIntegrationTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/projections/ProjectionJoinIntegrationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2018-2024 the original author or authors. + * Copyright 2018-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/projections/ProjectionsIntegrationTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/projections/ProjectionsIntegrationTests.java index f744dd540d..9abc3716e0 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/projections/ProjectionsIntegrationTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/projections/ProjectionsIntegrationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2017-2024 the original author or authors. + * Copyright 2017-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/AbstractJpaQueryTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/AbstractJpaQueryTests.java index 1f7db3cc42..8728e03229 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/AbstractJpaQueryTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/AbstractJpaQueryTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2008-2024 the original author or authors. + * Copyright 2008-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/AbstractStringBasedJpaQueryIntegrationTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/AbstractStringBasedJpaQueryIntegrationTests.java index 6e6c605114..92f268ac60 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/AbstractStringBasedJpaQueryIntegrationTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/AbstractStringBasedJpaQueryIntegrationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2016-2024 the original author or authors. + * Copyright 2016-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/AbstractStringBasedJpaQueryUnitTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/AbstractStringBasedJpaQueryUnitTests.java index 5a33a4bf59..e9cbf01d2d 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/AbstractStringBasedJpaQueryUnitTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/AbstractStringBasedJpaQueryUnitTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 the original author or authors. + * Copyright 2024-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/CollectionUtilsUnitTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/CollectionUtilsUnitTests.java index dd488b1ac5..9ab7aa87da 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/CollectionUtilsUnitTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/CollectionUtilsUnitTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2023-2024 the original author or authors. + * Copyright 2023-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/CustomNonBindableJpaParametersIntegrationTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/CustomNonBindableJpaParametersIntegrationTests.java index 724f0e1bf7..50ca107e95 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/CustomNonBindableJpaParametersIntegrationTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/CustomNonBindableJpaParametersIntegrationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2019-2024 the original author or authors. + * Copyright 2019-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/DefaultQueryEnhancerUnitTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/DefaultQueryEnhancerUnitTests.java index da2bb066ac..43a87c8282 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/DefaultQueryEnhancerUnitTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/DefaultQueryEnhancerUnitTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2023-2024 the original author or authors. + * Copyright 2023-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/DefaultQueryUtilsUnitTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/DefaultQueryUtilsUnitTests.java index cf3eb4867c..0e6b4a577c 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/DefaultQueryUtilsUnitTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/DefaultQueryUtilsUnitTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2008-2024 the original author or authors. + * Copyright 2008-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/EclipseLinkJpa21UtilsTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/EclipseLinkJpa21UtilsTests.java index bd97fbb600..19a2701e0e 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/EclipseLinkJpa21UtilsTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/EclipseLinkJpa21UtilsTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2017-2024 the original author or authors. + * Copyright 2017-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/EclipseLinkMetaAnnotatedQueryMethodIntegrationTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/EclipseLinkMetaAnnotatedQueryMethodIntegrationTests.java index 7c5d31b1bd..59c6c97bbc 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/EclipseLinkMetaAnnotatedQueryMethodIntegrationTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/EclipseLinkMetaAnnotatedQueryMethodIntegrationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2024 the original author or authors. + * Copyright 2013-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/EclipseLinkParameterMetadataProviderIntegrationTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/EclipseLinkParameterMetadataProviderIntegrationTests.java index c89f75309f..1e253c5acb 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/EclipseLinkParameterMetadataProviderIntegrationTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/EclipseLinkParameterMetadataProviderIntegrationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2024 the original author or authors. + * Copyright 2015-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/EclipseLinkQueryUtilsIntegrationTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/EclipseLinkQueryUtilsIntegrationTests.java index f70c7186f7..e607648544 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/EclipseLinkQueryUtilsIntegrationTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/EclipseLinkQueryUtilsIntegrationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2024 the original author or authors. + * Copyright 2013-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/EqlComplianceTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/EqlComplianceTests.java index 124de35a33..5ce1211785 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/EqlComplianceTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/EqlComplianceTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2023-2024 the original author or authors. + * Copyright 2023-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/EqlParserQueryEnhancerUnitTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/EqlParserQueryEnhancerUnitTests.java index 4f6752c175..713e24a74c 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/EqlParserQueryEnhancerUnitTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/EqlParserQueryEnhancerUnitTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2023-2024 the original author or authors. + * Copyright 2023-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/EqlQueryRendererTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/EqlQueryRendererTests.java index 7fccc9cb89..4267925d5b 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/EqlQueryRendererTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/EqlQueryRendererTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2023-2024 the original author or authors. + * Copyright 2023-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/EqlQueryTransformerTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/EqlQueryTransformerTests.java index e43ff50ec0..5a2bf4f14b 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/EqlQueryTransformerTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/EqlQueryTransformerTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2023-2024 the original author or authors. + * Copyright 2023-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/EqlSpecificationTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/EqlSpecificationTests.java index b2187ef6fc..fff1c5337f 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/EqlSpecificationTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/EqlSpecificationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2023-2024 the original author or authors. + * Copyright 2023-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/EscapeCharacterUnitTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/EscapeCharacterUnitTests.java index 418fbff3e0..ca16538f7d 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/EscapeCharacterUnitTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/EscapeCharacterUnitTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2019-2024 the original author or authors. + * Copyright 2019-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/ExpressionBasedStringQueryUnitTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/ExpressionBasedStringQueryUnitTests.java index e92c16eb88..91b4ecea84 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/ExpressionBasedStringQueryUnitTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/ExpressionBasedStringQueryUnitTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2024 the original author or authors. + * Copyright 2013-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/HqlParserQueryEnhancerUnitTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/HqlParserQueryEnhancerUnitTests.java index f19c4acc78..236e8cf73b 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/HqlParserQueryEnhancerUnitTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/HqlParserQueryEnhancerUnitTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2023-2024 the original author or authors. + * Copyright 2023-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/HqlParserUnitTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/HqlParserUnitTests.java index 62f194ea66..fb56b657f3 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/HqlParserUnitTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/HqlParserUnitTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2023-2024 the original author or authors. + * Copyright 2023-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/HqlQueryRendererTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/HqlQueryRendererTests.java index e2cb7138cc..72ce32c5b5 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/HqlQueryRendererTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/HqlQueryRendererTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2022-2024 the original author or authors. + * Copyright 2022-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/HqlQueryTransformerTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/HqlQueryTransformerTests.java index 5dab8c1cfe..0e89ded679 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/HqlQueryTransformerTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/HqlQueryTransformerTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2022-2024 the original author or authors. + * Copyright 2022-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/HqlSpecificationTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/HqlSpecificationTests.java index 91afec5a0c..f6f6be459f 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/HqlSpecificationTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/HqlSpecificationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2022-2024 the original author or authors. + * Copyright 2022-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/JSqlParserQueryEnhancerUnitTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/JSqlParserQueryEnhancerUnitTests.java index 1269fe23f0..2d697d5db0 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/JSqlParserQueryEnhancerUnitTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/JSqlParserQueryEnhancerUnitTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2023-2024 the original author or authors. + * Copyright 2023-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/Jpa21UtilsTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/Jpa21UtilsTests.java index f09d50be0e..da6f929f28 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/Jpa21UtilsTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/Jpa21UtilsTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2017-2024 the original author or authors. + * Copyright 2017-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/Jpa21UtilsUnitTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/Jpa21UtilsUnitTests.java index 4885869be9..fab642d505 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/Jpa21UtilsUnitTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/Jpa21UtilsUnitTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2024 the original author or authors. + * Copyright 2015-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/JpaCountQueryCreatorIntegrationTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/JpaCountQueryCreatorIntegrationTests.java index 3835426aba..9afcf27d56 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/JpaCountQueryCreatorIntegrationTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/JpaCountQueryCreatorIntegrationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2017-2024 the original author or authors. + * Copyright 2017-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/JpaParametersUnitTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/JpaParametersUnitTests.java index ea851bb4fe..c798acd8ac 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/JpaParametersUnitTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/JpaParametersUnitTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2024 the original author or authors. + * Copyright 2013-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/JpaQueryExecutionUnitTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/JpaQueryExecutionUnitTests.java index da57f6a899..6d93f6ae9f 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/JpaQueryExecutionUnitTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/JpaQueryExecutionUnitTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2008-2024 the original author or authors. + * Copyright 2008-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/JpaQueryLookupStrategyUnitTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/JpaQueryLookupStrategyUnitTests.java index ffa4475b45..34202d48fd 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/JpaQueryLookupStrategyUnitTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/JpaQueryLookupStrategyUnitTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2024 the original author or authors. + * Copyright 2012-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/JpaQueryMethodUnitTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/JpaQueryMethodUnitTests.java index eee3095181..5b7f152832 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/JpaQueryMethodUnitTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/JpaQueryMethodUnitTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2008-2024 the original author or authors. + * Copyright 2008-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/JpaQueryRewriteIntegrationTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/JpaQueryRewriteIntegrationTests.java index 4c504e8cc9..9738c7843a 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/JpaQueryRewriteIntegrationTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/JpaQueryRewriteIntegrationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2022-2024 the original author or authors. + * Copyright 2022-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/JpqlComplianceTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/JpqlComplianceTests.java index f858594973..8ed1b09025 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/JpqlComplianceTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/JpqlComplianceTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 the original author or authors. + * Copyright 2024-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/JpqlParserQueryEnhancerUnitTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/JpqlParserQueryEnhancerUnitTests.java index a026e90366..05b4fa3185 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/JpqlParserQueryEnhancerUnitTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/JpqlParserQueryEnhancerUnitTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2023-2024 the original author or authors. + * Copyright 2023-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/JpqlQueryRendererTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/JpqlQueryRendererTests.java index 6ff73aa3bf..18a46691e2 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/JpqlQueryRendererTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/JpqlQueryRendererTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2022-2024 the original author or authors. + * Copyright 2022-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/JpqlQueryTransformerTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/JpqlQueryTransformerTests.java index 72f0ff8b49..b0e2282d84 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/JpqlQueryTransformerTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/JpqlQueryTransformerTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2022-2024 the original author or authors. + * Copyright 2022-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/JpqlSpecificationTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/JpqlSpecificationTests.java index 44f57f2643..810afb1878 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/JpqlSpecificationTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/JpqlSpecificationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2022-2024 the original author or authors. + * Copyright 2022-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/KeysetScrollSpecificationUnitTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/KeysetScrollSpecificationUnitTests.java index 39a43cb1d5..9d8c92a18a 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/KeysetScrollSpecificationUnitTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/KeysetScrollSpecificationUnitTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2023-2024 the original author or authors. + * Copyright 2023-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/LikeBindingUnitTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/LikeBindingUnitTests.java index 54b2e8bad3..7a4903bf84 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/LikeBindingUnitTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/LikeBindingUnitTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2024 the original author or authors. + * Copyright 2013-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/MetaAnnotatedQueryMethodIntegrationTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/MetaAnnotatedQueryMethodIntegrationTests.java index 8947bda883..ae76cb023a 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/MetaAnnotatedQueryMethodIntegrationTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/MetaAnnotatedQueryMethodIntegrationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2024 the original author or authors. + * Copyright 2013-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/MetaAnnotatedQueryMethodUnitTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/MetaAnnotatedQueryMethodUnitTests.java index b9e899121f..29e50b85b6 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/MetaAnnotatedQueryMethodUnitTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/MetaAnnotatedQueryMethodUnitTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2024 the original author or authors. + * Copyright 2013-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/NamedOrIndexedQueryParameterSetterUnitTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/NamedOrIndexedQueryParameterSetterUnitTests.java index 844ae69e01..6f1692142d 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/NamedOrIndexedQueryParameterSetterUnitTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/NamedOrIndexedQueryParameterSetterUnitTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2017-2024 the original author or authors. + * Copyright 2017-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/NamedQueryUnitTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/NamedQueryUnitTests.java index ebdd2a8395..dadfd1083d 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/NamedQueryUnitTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/NamedQueryUnitTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2008-2024 the original author or authors. + * Copyright 2008-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/NativeJpaQueryUnitTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/NativeJpaQueryUnitTests.java index 67c61b9305..546a6c3b23 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/NativeJpaQueryUnitTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/NativeJpaQueryUnitTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 the original author or authors. + * Copyright 2024-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/OpenJpaJpa21UtilsTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/OpenJpaJpa21UtilsTests.java index b8299fa9a1..4c5cac42e1 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/OpenJpaJpa21UtilsTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/OpenJpaJpa21UtilsTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2017-2024 the original author or authors. + * Copyright 2017-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/OpenJpaParameterMetadataProviderIntegrationTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/OpenJpaParameterMetadataProviderIntegrationTests.java index a2013af402..7517a2a7e1 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/OpenJpaParameterMetadataProviderIntegrationTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/OpenJpaParameterMetadataProviderIntegrationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2024 the original author or authors. + * Copyright 2015-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/OpenJpaQueryUtilsIntegrationTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/OpenJpaQueryUtilsIntegrationTests.java index 2363f429d5..fd8f1cb634 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/OpenJpaQueryUtilsIntegrationTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/OpenJpaQueryUtilsIntegrationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2024 the original author or authors. + * Copyright 2013-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/ParameterBinderUnitTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/ParameterBinderUnitTests.java index 4f90c40c71..e80d9a8692 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/ParameterBinderUnitTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/ParameterBinderUnitTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2008-2024 the original author or authors. + * Copyright 2008-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/ParameterBindingParserUnitTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/ParameterBindingParserUnitTests.java index b4bd22d9ad..edcaf0e4ea 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/ParameterBindingParserUnitTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/ParameterBindingParserUnitTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2017-2024 the original author or authors. + * Copyright 2017-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/ParameterExpressionProviderTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/ParameterExpressionProviderTests.java index 6d1d5393b9..b706551305 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/ParameterExpressionProviderTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/ParameterExpressionProviderTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2017-2024 the original author or authors. + * Copyright 2017-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/ParameterMetadataProviderIntegrationTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/ParameterMetadataProviderIntegrationTests.java index 6dc7b84b1c..c0f86397d3 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/ParameterMetadataProviderIntegrationTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/ParameterMetadataProviderIntegrationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2024 the original author or authors. + * Copyright 2015-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/ParameterMetadataProviderUnitTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/ParameterMetadataProviderUnitTests.java index c62b6e8b09..86a4de3ab2 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/ParameterMetadataProviderUnitTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/ParameterMetadataProviderUnitTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2017-2024 the original author or authors. + * Copyright 2017-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/PartTreeJpaQueryIntegrationTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/PartTreeJpaQueryIntegrationTests.java index ddd71dbfa7..4bd5f9c2dd 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/PartTreeJpaQueryIntegrationTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/PartTreeJpaQueryIntegrationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2024 the original author or authors. + * Copyright 2011-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License import org.springframework.aop.framework.Advised; diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/QueryEnhancerFactoryUnitTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/QueryEnhancerFactoryUnitTests.java index 568ea9b53d..86880d32aa 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/QueryEnhancerFactoryUnitTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/QueryEnhancerFactoryUnitTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2022-2024 the original author or authors. + * Copyright 2022-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/QueryEnhancerTckTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/QueryEnhancerTckTests.java index 3e3465e3d3..cd5982a1ca 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/QueryEnhancerTckTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/QueryEnhancerTckTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2023-2024 the original author or authors. + * Copyright 2023-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/QueryEnhancerUnitTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/QueryEnhancerUnitTests.java index d476c445b2..3113627c8e 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/QueryEnhancerUnitTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/QueryEnhancerUnitTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2022-2024 the original author or authors. + * Copyright 2022-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/QueryParameterSetterFactoryUnitTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/QueryParameterSetterFactoryUnitTests.java index 51fb6d8d37..0b35d49b04 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/QueryParameterSetterFactoryUnitTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/QueryParameterSetterFactoryUnitTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2017-2024 the original author or authors. + * Copyright 2017-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/QueryUtilsIntegrationTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/QueryUtilsIntegrationTests.java index ffbee9e80f..7c3e235442 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/QueryUtilsIntegrationTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/QueryUtilsIntegrationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2024 the original author or authors. + * Copyright 2013-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/QueryUtilsUnitTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/QueryUtilsUnitTests.java index b2b2c4acd6..647d4dfa2b 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/QueryUtilsUnitTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/QueryUtilsUnitTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2008-2024 the original author or authors. + * Copyright 2008-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/QueryWithNullLikeIntegrationTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/QueryWithNullLikeIntegrationTests.java index 59f418aa61..9f7e2da8ea 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/QueryWithNullLikeIntegrationTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/QueryWithNullLikeIntegrationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2024 the original author or authors. + * Copyright 2012-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/SimpleJpaQueryUnitTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/SimpleJpaQueryUnitTests.java index e9d7ca11fe..96faecd20c 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/SimpleJpaQueryUnitTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/SimpleJpaQueryUnitTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2008-2024 the original author or authors. + * Copyright 2008-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/StoredProcedureAttributeSourceUnitTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/StoredProcedureAttributeSourceUnitTests.java index bcfc8bf9ad..9e0363671d 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/StoredProcedureAttributeSourceUnitTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/StoredProcedureAttributeSourceUnitTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2014-2024 the original author or authors. + * Copyright 2014-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/StoredProcedureAttributesUnitTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/StoredProcedureAttributesUnitTests.java index 919f12d1a9..b9c495778d 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/StoredProcedureAttributesUnitTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/StoredProcedureAttributesUnitTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2024 the original author or authors. + * Copyright 2015-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/StringQueryUnitTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/StringQueryUnitTests.java index 556f75ebba..5e19aaddb9 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/StringQueryUnitTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/StringQueryUnitTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2024 the original author or authors. + * Copyright 2013-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/TupleConverterUnitTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/TupleConverterUnitTests.java index 13dc550fb0..6d3e3a73b4 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/TupleConverterUnitTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/TupleConverterUnitTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2016-2024 the original author or authors. + * Copyright 2016-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/sample/AnnotatedAuditableUserRepository.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/sample/AnnotatedAuditableUserRepository.java index 36748415e5..cf549ad521 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/sample/AnnotatedAuditableUserRepository.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/sample/AnnotatedAuditableUserRepository.java @@ -1,5 +1,5 @@ /* - * Copyright 2014-2024 the original author or authors. + * Copyright 2014-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/sample/AuditableEntityRepository.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/sample/AuditableEntityRepository.java index 321fdbf179..216d448d84 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/sample/AuditableEntityRepository.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/sample/AuditableEntityRepository.java @@ -1,5 +1,5 @@ /* - * Copyright 2008-2024 the original author or authors. + * Copyright 2008-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/sample/AuditableUserRepository.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/sample/AuditableUserRepository.java index 127c237fbf..b3d39afc9b 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/sample/AuditableUserRepository.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/sample/AuditableUserRepository.java @@ -1,5 +1,5 @@ /* - * Copyright 2008-2024 the original author or authors. + * Copyright 2008-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/sample/BookRepository.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/sample/BookRepository.java index dd4af2f2d6..c5a89ebf0f 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/sample/BookRepository.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/sample/BookRepository.java @@ -1,5 +1,5 @@ /* - * Copyright 2014-2024 the original author or authors. + * Copyright 2014-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/sample/CategoryRepository.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/sample/CategoryRepository.java index 601c4647ae..676a095567 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/sample/CategoryRepository.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/sample/CategoryRepository.java @@ -1,5 +1,5 @@ /* - * Copyright 2014-2024 the original author or authors. + * Copyright 2014-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/sample/ClassWithNestedRepository.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/sample/ClassWithNestedRepository.java index 303910c50b..17089b7e60 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/sample/ClassWithNestedRepository.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/sample/ClassWithNestedRepository.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2024 the original author or authors. + * Copyright 2013-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/sample/ConcreteRepository1.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/sample/ConcreteRepository1.java index 52ff1ee123..78ee0efe1d 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/sample/ConcreteRepository1.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/sample/ConcreteRepository1.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2024 the original author or authors. + * Copyright 2013-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/sample/ConcreteRepository2.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/sample/ConcreteRepository2.java index 5137c87da7..55fef12d72 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/sample/ConcreteRepository2.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/sample/ConcreteRepository2.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2024 the original author or authors. + * Copyright 2013-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/sample/CustomAbstractPersistableRepository.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/sample/CustomAbstractPersistableRepository.java index 12dcbeed5e..d59a163db7 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/sample/CustomAbstractPersistableRepository.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/sample/CustomAbstractPersistableRepository.java @@ -1,5 +1,5 @@ /* - * Copyright 2014-2024 the original author or authors. + * Copyright 2014-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/sample/DummyRepository.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/sample/DummyRepository.java index 07a00c4424..34aef70172 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/sample/DummyRepository.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/sample/DummyRepository.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2024 the original author or authors. + * Copyright 2015-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/sample/EmployeeRepositoryWithEmbeddedId.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/sample/EmployeeRepositoryWithEmbeddedId.java index c52e42343a..ea1bc60f56 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/sample/EmployeeRepositoryWithEmbeddedId.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/sample/EmployeeRepositoryWithEmbeddedId.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2024 the original author or authors. + * Copyright 2013-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/sample/EmployeeRepositoryWithIdClass.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/sample/EmployeeRepositoryWithIdClass.java index 703501f0d6..e3413fed97 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/sample/EmployeeRepositoryWithIdClass.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/sample/EmployeeRepositoryWithIdClass.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2024 the original author or authors. + * Copyright 2013-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/sample/EntityWithAssignedIdRepository.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/sample/EntityWithAssignedIdRepository.java index 505c658d44..fc6f4714bc 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/sample/EntityWithAssignedIdRepository.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/sample/EntityWithAssignedIdRepository.java @@ -1,5 +1,5 @@ /* - * Copyright 2019-2024 the original author or authors. + * Copyright 2019-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/sample/ItemRepository.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/sample/ItemRepository.java index 9335ce52d9..a82370752c 100755 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/sample/ItemRepository.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/sample/ItemRepository.java @@ -1,5 +1,5 @@ /* - * Copyright 2016-2024 the original author or authors. + * Copyright 2016-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/sample/ItemSiteRepository.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/sample/ItemSiteRepository.java index 0151618d4b..dd6ba72176 100755 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/sample/ItemSiteRepository.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/sample/ItemSiteRepository.java @@ -1,5 +1,5 @@ /* - * Copyright 2016-2024 the original author or authors. + * Copyright 2016-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/sample/MailMessageRepository.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/sample/MailMessageRepository.java index 11ecbd0d61..62ad9525e4 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/sample/MailMessageRepository.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/sample/MailMessageRepository.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2024 the original author or authors. + * Copyright 2013-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/sample/MappedTypeRepository.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/sample/MappedTypeRepository.java index 12c1041ef4..a2ce8ab9b1 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/sample/MappedTypeRepository.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/sample/MappedTypeRepository.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2024 the original author or authors. + * Copyright 2013-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/sample/NameOnlyDto.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/sample/NameOnlyDto.java index f27d201137..13ee35f497 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/sample/NameOnlyDto.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/sample/NameOnlyDto.java @@ -1,5 +1,5 @@ /* - * Copyright 2018-2024 the original author or authors. + * Copyright 2018-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/sample/ParentRepository.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/sample/ParentRepository.java index 4ab5675004..71f665c311 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/sample/ParentRepository.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/sample/ParentRepository.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2024 the original author or authors. + * Copyright 2013-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/sample/ProductRepository.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/sample/ProductRepository.java index 3d34f051ea..2de721721e 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/sample/ProductRepository.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/sample/ProductRepository.java @@ -1,5 +1,5 @@ /* - * Copyright 2014-2024 the original author or authors. + * Copyright 2014-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/sample/RedeclaringRepositoryMethodsRepository.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/sample/RedeclaringRepositoryMethodsRepository.java index dd9343fff3..a5012f6d2b 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/sample/RedeclaringRepositoryMethodsRepository.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/sample/RedeclaringRepositoryMethodsRepository.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2024 the original author or authors. + * Copyright 2013-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/sample/RepositoryMethodsWithEntityGraphConfigRepository.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/sample/RepositoryMethodsWithEntityGraphConfigRepository.java index eee395794b..fe8e0dd4b6 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/sample/RepositoryMethodsWithEntityGraphConfigRepository.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/sample/RepositoryMethodsWithEntityGraphConfigRepository.java @@ -1,5 +1,5 @@ /* - * Copyright 2014-2024 the original author or authors. + * Copyright 2014-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/sample/RoleRepository.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/sample/RoleRepository.java index 1895ce863a..083e6f03fb 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/sample/RoleRepository.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/sample/RoleRepository.java @@ -1,5 +1,5 @@ /* - * Copyright 2008-2024 the original author or authors. + * Copyright 2008-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/sample/RoleRepositoryWithMeta.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/sample/RoleRepositoryWithMeta.java index 9258d62457..2fc75192e6 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/sample/RoleRepositoryWithMeta.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/sample/RoleRepositoryWithMeta.java @@ -1,5 +1,5 @@ /* - * Copyright 2008-2024 the original author or authors. + * Copyright 2008-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/sample/SampleConfig.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/sample/SampleConfig.java index 7f9ac2aab4..a319360651 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/sample/SampleConfig.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/sample/SampleConfig.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2024 the original author or authors. + * Copyright 2013-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/sample/SampleEvaluationContextExtension.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/sample/SampleEvaluationContextExtension.java index 274ba7e601..a1deba7c24 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/sample/SampleEvaluationContextExtension.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/sample/SampleEvaluationContextExtension.java @@ -1,5 +1,5 @@ /* - * Copyright 2014-2024 the original author or authors. + * Copyright 2014-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/sample/SiteRepository.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/sample/SiteRepository.java index 3bbd36c434..ff5ae98e4c 100755 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/sample/SiteRepository.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/sample/SiteRepository.java @@ -1,5 +1,5 @@ /* - * Copyright 2016-2024 the original author or authors. + * Copyright 2016-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/sample/UserRepository.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/sample/UserRepository.java index 684b49bced..eec409f62d 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/sample/UserRepository.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/sample/UserRepository.java @@ -1,5 +1,5 @@ /* - * Copyright 2008-2024 the original author or authors. + * Copyright 2008-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/sample/UserRepositoryCustom.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/sample/UserRepositoryCustom.java index 485f71b8d4..86f454c0de 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/sample/UserRepositoryCustom.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/sample/UserRepositoryCustom.java @@ -1,5 +1,5 @@ /* - * Copyright 2008-2024 the original author or authors. + * Copyright 2008-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/sample/UserRepositoryImpl.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/sample/UserRepositoryImpl.java index f27d136730..965834876f 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/sample/UserRepositoryImpl.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/sample/UserRepositoryImpl.java @@ -1,5 +1,5 @@ /* - * Copyright 2008-2024 the original author or authors. + * Copyright 2008-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/CrudMethodMetadataPopulatingMethodInterceptorUnitTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/CrudMethodMetadataPopulatingMethodInterceptorUnitTests.java index c9bcee59a3..723c34a693 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/CrudMethodMetadataPopulatingMethodInterceptorUnitTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/CrudMethodMetadataPopulatingMethodInterceptorUnitTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2024 the original author or authors. + * Copyright 2012-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/DefaultJpaContextIntegrationTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/DefaultJpaContextIntegrationTests.java index 6b88b69bf4..6018de0c11 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/DefaultJpaContextIntegrationTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/DefaultJpaContextIntegrationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2024 the original author or authors. + * Copyright 2015-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/DefaultJpaContextUnitTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/DefaultJpaContextUnitTests.java index 1ea6993ce2..899cbd406d 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/DefaultJpaContextUnitTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/DefaultJpaContextUnitTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2024 the original author or authors. + * Copyright 2015-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/DefaultJpaEntityMetadataUnitTest.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/DefaultJpaEntityMetadataUnitTest.java index d874935ddb..042ffdd982 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/DefaultJpaEntityMetadataUnitTest.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/DefaultJpaEntityMetadataUnitTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2024 the original author or authors. + * Copyright 2013-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/DefaultQueryHintsTest.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/DefaultQueryHintsTest.java index fea4d697b6..c0b69d22e9 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/DefaultQueryHintsTest.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/DefaultQueryHintsTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2018-2024 the original author or authors. + * Copyright 2018-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/DefaultTransactionDisablingIntegrationTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/DefaultTransactionDisablingIntegrationTests.java index 1a8e34d1f5..f27993c8e2 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/DefaultTransactionDisablingIntegrationTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/DefaultTransactionDisablingIntegrationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2024 the original author or authors. + * Copyright 2015-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/EclipseLinkJpaMetamodelEntityInformationIntegrationTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/EclipseLinkJpaMetamodelEntityInformationIntegrationTests.java index 4922461995..c18afd1320 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/EclipseLinkJpaMetamodelEntityInformationIntegrationTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/EclipseLinkJpaMetamodelEntityInformationIntegrationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2024 the original author or authors. + * Copyright 2013-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/EclipseLinkJpaRepositoryTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/EclipseLinkJpaRepositoryTests.java index 34c38daa48..4892d568c1 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/EclipseLinkJpaRepositoryTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/EclipseLinkJpaRepositoryTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2024 the original author or authors. + * Copyright 2013-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/EclipseLinkProxyIdAccessorTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/EclipseLinkProxyIdAccessorTests.java index eb619200c7..c7259a5b17 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/EclipseLinkProxyIdAccessorTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/EclipseLinkProxyIdAccessorTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2014-2024 the original author or authors. + * Copyright 2014-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/EntityGraphFactoryUnitTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/EntityGraphFactoryUnitTests.java index 647896ffbb..c2039fcd60 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/EntityGraphFactoryUnitTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/EntityGraphFactoryUnitTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2021-2024 the original author or authors. + * Copyright 2021-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/EntityManagerBeanDefinitionRegistrarPostProcessorIntegrationTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/EntityManagerBeanDefinitionRegistrarPostProcessorIntegrationTests.java index a1d020423d..bf2fa3070e 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/EntityManagerBeanDefinitionRegistrarPostProcessorIntegrationTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/EntityManagerBeanDefinitionRegistrarPostProcessorIntegrationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2014-2024 the original author or authors. + * Copyright 2014-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/EntityManagerBeanDefinitionRegistrarPostProcessorUnitTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/EntityManagerBeanDefinitionRegistrarPostProcessorUnitTests.java index 8a6725a615..a34fc121fa 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/EntityManagerBeanDefinitionRegistrarPostProcessorUnitTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/EntityManagerBeanDefinitionRegistrarPostProcessorUnitTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2014-2024 the original author or authors. + * Copyright 2014-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/EntityManagerFactoryRefTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/EntityManagerFactoryRefTests.java index e5848bfef9..50380485a6 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/EntityManagerFactoryRefTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/EntityManagerFactoryRefTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2008-2024 the original author or authors. + * Copyright 2008-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/EntityManagerFactoryRefUnitTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/EntityManagerFactoryRefUnitTests.java index b25682e9a8..a9ea88ad00 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/EntityManagerFactoryRefUnitTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/EntityManagerFactoryRefUnitTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2008-2024 the original author or authors. + * Copyright 2008-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/FetchableFluentQueryByPredicateUnitTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/FetchableFluentQueryByPredicateUnitTests.java index f2c5e9f00c..295ed287c9 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/FetchableFluentQueryByPredicateUnitTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/FetchableFluentQueryByPredicateUnitTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2022-2024 the original author or authors. + * Copyright 2022-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/HibernateJpaMetamodelEntityInformationIntegrationTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/HibernateJpaMetamodelEntityInformationIntegrationTests.java index 82824c084b..deffda2a29 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/HibernateJpaMetamodelEntityInformationIntegrationTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/HibernateJpaMetamodelEntityInformationIntegrationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2024 the original author or authors. + * Copyright 2011-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/JavaConfigDefaultTransactionDisablingIntegrationTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/JavaConfigDefaultTransactionDisablingIntegrationTests.java index 0a5e0d9199..7d985c050d 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/JavaConfigDefaultTransactionDisablingIntegrationTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/JavaConfigDefaultTransactionDisablingIntegrationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2024 the original author or authors. + * Copyright 2015-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/JpaEntityInformationSupportUnitTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/JpaEntityInformationSupportUnitTests.java index e66e624b12..6b36813294 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/JpaEntityInformationSupportUnitTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/JpaEntityInformationSupportUnitTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2024 the original author or authors. + * Copyright 2011-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/JpaMetamodelEntityInformationIntegrationTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/JpaMetamodelEntityInformationIntegrationTests.java index 0f5c9ab3a7..a04a0ee1c4 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/JpaMetamodelEntityInformationIntegrationTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/JpaMetamodelEntityInformationIntegrationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2024 the original author or authors. + * Copyright 2011-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/JpaMetamodelEntityInformationUnitTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/JpaMetamodelEntityInformationUnitTests.java index 1bed3b7fdf..476957a8d2 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/JpaMetamodelEntityInformationUnitTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/JpaMetamodelEntityInformationUnitTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2024 the original author or authors. + * Copyright 2012-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/JpaPersistableEntityInformationUnitTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/JpaPersistableEntityInformationUnitTests.java index 37050ffe89..03e8b764bb 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/JpaPersistableEntityInformationUnitTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/JpaPersistableEntityInformationUnitTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2024 the original author or authors. + * Copyright 2011-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/JpaRepositoryFactoryBeanEntityPathResolverIntegrationTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/JpaRepositoryFactoryBeanEntityPathResolverIntegrationTests.java index 73a3c76ce3..d5f1f891af 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/JpaRepositoryFactoryBeanEntityPathResolverIntegrationTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/JpaRepositoryFactoryBeanEntityPathResolverIntegrationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2017-2024 the original author or authors. + * Copyright 2017-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/JpaRepositoryFactoryBeanUnitTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/JpaRepositoryFactoryBeanUnitTests.java index bfbbe561cb..dad06c1f9d 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/JpaRepositoryFactoryBeanUnitTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/JpaRepositoryFactoryBeanUnitTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2008-2024 the original author or authors. + * Copyright 2008-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/JpaRepositoryFactoryUnitTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/JpaRepositoryFactoryUnitTests.java index 983c7c2195..4b5ad4cf3e 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/JpaRepositoryFactoryUnitTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/JpaRepositoryFactoryUnitTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2008-2024 the original author or authors. + * Copyright 2008-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/JpaRepositoryTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/JpaRepositoryTests.java index 27daa255a8..563c0c7a67 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/JpaRepositoryTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/JpaRepositoryTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2008-2024 the original author or authors. + * Copyright 2008-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/MailMessageRepositoryIntegrationTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/MailMessageRepositoryIntegrationTests.java index b813ae8714..3688699d61 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/MailMessageRepositoryIntegrationTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/MailMessageRepositoryIntegrationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2024 the original author or authors. + * Copyright 2013-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/MutableQueryHintsUnitTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/MutableQueryHintsUnitTests.java index e4c0c3c7c0..c47f5c5c75 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/MutableQueryHintsUnitTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/MutableQueryHintsUnitTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2020-2024 the original author or authors. + * Copyright 2020-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/OpenJpaJpaRepositoryTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/OpenJpaJpaRepositoryTests.java index 10440974b2..dd8a85fce2 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/OpenJpaJpaRepositoryTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/OpenJpaJpaRepositoryTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2024 the original author or authors. + * Copyright 2013-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/OpenJpaMetamodelEntityInformationIntegrationTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/OpenJpaMetamodelEntityInformationIntegrationTests.java index 70a8e8ed87..5c0a0600dd 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/OpenJpaMetamodelEntityInformationIntegrationTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/OpenJpaMetamodelEntityInformationIntegrationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2024 the original author or authors. + * Copyright 2013-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/OpenJpaProxyIdAccessorTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/OpenJpaProxyIdAccessorTests.java index 6162daab39..54372525c8 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/OpenJpaProxyIdAccessorTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/OpenJpaProxyIdAccessorTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2014-2024 the original author or authors. + * Copyright 2014-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/QSimpleEntityPathResolverUnitTests_Sample.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/QSimpleEntityPathResolverUnitTests_Sample.java index 2f33aaafd0..773d82abbe 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/QSimpleEntityPathResolverUnitTests_Sample.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/QSimpleEntityPathResolverUnitTests_Sample.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2024 the original author or authors. + * Copyright 2011-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/QuerydslIntegrationTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/QuerydslIntegrationTests.java index 2c71c33483..4a59ea90a4 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/QuerydslIntegrationTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/QuerydslIntegrationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2014-2024 the original author or authors. + * Copyright 2014-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/QuerydslJpaPredicateExecutorUnitTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/QuerydslJpaPredicateExecutorUnitTests.java index 7962695b6a..559bc0f2af 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/QuerydslJpaPredicateExecutorUnitTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/QuerydslJpaPredicateExecutorUnitTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2008-2024 the original author or authors. + * Copyright 2008-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/QuerydslJpaRepositoryTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/QuerydslJpaRepositoryTests.java index 7e4778d531..ece657841b 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/QuerydslJpaRepositoryTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/QuerydslJpaRepositoryTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2008-2024 the original author or authors. + * Copyright 2008-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/QuerydslRepositorySupportIntegrationTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/QuerydslRepositorySupportIntegrationTests.java index 6c400a05c4..eb411ddce3 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/QuerydslRepositorySupportIntegrationTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/QuerydslRepositorySupportIntegrationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2024 the original author or authors. + * Copyright 2011-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/QuerydslRepositorySupportTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/QuerydslRepositorySupportTests.java index 1eb68aa08b..4e1e1d650a 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/QuerydslRepositorySupportTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/QuerydslRepositorySupportTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2024 the original author or authors. + * Copyright 2011-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/SimpleJpaRepositoryUnitTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/SimpleJpaRepositoryUnitTests.java index 5b83077bbb..24e43d24cb 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/SimpleJpaRepositoryUnitTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/SimpleJpaRepositoryUnitTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2024 the original author or authors. + * Copyright 2011-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/TransactionalRepositoryTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/TransactionalRepositoryTests.java index 5a29269c82..be195c947c 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/TransactionalRepositoryTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/TransactionalRepositoryTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2008-2024 the original author or authors. + * Copyright 2008-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/XmlConfigDefaultTransactionDisablingIntegrationTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/XmlConfigDefaultTransactionDisablingIntegrationTests.java index df684286e9..839293c009 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/XmlConfigDefaultTransactionDisablingIntegrationTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/XmlConfigDefaultTransactionDisablingIntegrationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2024 the original author or authors. + * Copyright 2015-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/support/ClasspathScanningPersistenceUnitPostProcessorUnitTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/support/ClasspathScanningPersistenceUnitPostProcessorUnitTests.java index 9e60043821..e60565e8c8 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/support/ClasspathScanningPersistenceUnitPostProcessorUnitTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/support/ClasspathScanningPersistenceUnitPostProcessorUnitTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2024 the original author or authors. + * Copyright 2011-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/support/EntityManagerTestUtils.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/support/EntityManagerTestUtils.java index 013857d487..479c69c015 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/support/EntityManagerTestUtils.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/support/EntityManagerTestUtils.java @@ -1,5 +1,5 @@ /* - * Copyright 2014-2024 the original author or authors. + * Copyright 2014-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/support/MergingPersistenceUnitManagerUnitTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/support/MergingPersistenceUnitManagerUnitTests.java index 495c89d71f..4233d685fb 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/support/MergingPersistenceUnitManagerUnitTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/support/MergingPersistenceUnitManagerUnitTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2024 the original author or authors. + * Copyright 2011-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/support/ProxyImageNameSubstitutor.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/support/ProxyImageNameSubstitutor.java index 24fde9888a..89e64a3024 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/support/ProxyImageNameSubstitutor.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/support/ProxyImageNameSubstitutor.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2024 the original author or authors. + * Copyright 2015-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/util/BooleanExecutionCondition.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/util/BooleanExecutionCondition.java index bd617cb557..590d92d4d0 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/util/BooleanExecutionCondition.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/util/BooleanExecutionCondition.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 the original author or authors. + * Copyright 2024-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/util/ClassPathExclusions.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/util/ClassPathExclusions.java index aa25c22739..f53d4d6ce4 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/util/ClassPathExclusions.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/util/ClassPathExclusions.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 the original author or authors. + * Copyright 2024-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/util/ClassPathExclusionsExtension.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/util/ClassPathExclusionsExtension.java index 46dcd05fb5..b8d76f9285 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/util/ClassPathExclusionsExtension.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/util/ClassPathExclusionsExtension.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 the original author or authors. + * Copyright 2024-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/util/DisabledOnHibernate.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/util/DisabledOnHibernate.java index 0ee4e25989..cdae0ff329 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/util/DisabledOnHibernate.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/util/DisabledOnHibernate.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2024 the original author or authors. + * Copyright 2015-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/util/DisabledOnHibernateCondition.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/util/DisabledOnHibernateCondition.java index 804309544f..21e2c87b2d 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/util/DisabledOnHibernateCondition.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/util/DisabledOnHibernateCondition.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 the original author or authors. + * Copyright 2024-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/util/DisabledOnHibernateConditionTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/util/DisabledOnHibernateConditionTests.java index 15a977cb5f..80750aeb5d 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/util/DisabledOnHibernateConditionTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/util/DisabledOnHibernateConditionTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 the original author or authors. + * Copyright 2024-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/util/FixedDate.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/util/FixedDate.java index 377874e48c..a6e2800784 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/util/FixedDate.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/util/FixedDate.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2024 the original author or authors. + * Copyright 2015-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/util/HidingClassLoader.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/util/HidingClassLoader.java index ce60e381e2..2ed67c83f1 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/util/HidingClassLoader.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/util/HidingClassLoader.java @@ -1,5 +1,5 @@ /* - * Copyright 2017-2024 the original author or authors. + * Copyright 2017-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/util/JpaMetamodelCacheCleanupIntegrationTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/util/JpaMetamodelCacheCleanupIntegrationTests.java index 19f03a9225..65cb8ea1ad 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/util/JpaMetamodelCacheCleanupIntegrationTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/util/JpaMetamodelCacheCleanupIntegrationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2018-2024 the original author or authors. + * Copyright 2018-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/util/JpaMetamodelUnitTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/util/JpaMetamodelUnitTests.java index a4cd6592bf..73102d6d03 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/util/JpaMetamodelUnitTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/util/JpaMetamodelUnitTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2018-2024 the original author or authors. + * Copyright 2018-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/util/PackageExcludingClassLoader.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/util/PackageExcludingClassLoader.java index b768c90fd4..b5c8ed5216 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/util/PackageExcludingClassLoader.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/util/PackageExcludingClassLoader.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 the original author or authors. + * Copyright 2024-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/antora/modules/ROOT/pages/index.adoc b/src/main/antora/modules/ROOT/pages/index.adoc index 83a6f4ac77..4f9d18adce 100644 --- a/src/main/antora/modules/ROOT/pages/index.adoc +++ b/src/main/antora/modules/ROOT/pages/index.adoc @@ -15,7 +15,7 @@ Upgrade Notes, Supported Versions, additional cross-version information. Oliver Gierke, Thomas Darimont, Christoph Strobl, Mark Paluch, Jay Bryant, Greg Turnquist -(C) 2008-2024 VMware, Inc. +(C) 2008-2025 VMware, Inc. Copies of this document may be made for your own use and for distribution to others, provided that you do not charge any fee for such copies and further provided that each copy contains this Copyright Notice, whether distributed in print or electronically. From 7667c9aff18c734073fdc4d907681a913673942d Mon Sep 17 00:00:00 2001 From: Jens Schauder Date: Thu, 9 Jan 2025 13:07:55 +0100 Subject: [PATCH 110/157] Document limitations of non-supported collection attributes in Query By Example Closes #3740 --- .../antora/modules/ROOT/pages/repositories/query-by-example.adoc | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main/antora/modules/ROOT/pages/repositories/query-by-example.adoc b/src/main/antora/modules/ROOT/pages/repositories/query-by-example.adoc index 513ba122f0..3804f1d6c5 100644 --- a/src/main/antora/modules/ROOT/pages/repositories/query-by-example.adoc +++ b/src/main/antora/modules/ROOT/pages/repositories/query-by-example.adoc @@ -1,3 +1,4 @@ +:support-qbe-collection: false include::{commons}@data-commons::page$query-by-example.adoc[] [[query-by-example.running]] From 32023366a5f2fbf6ab729da1a627baa9a33961e1 Mon Sep 17 00:00:00 2001 From: Mark Paluch Date: Fri, 17 Jan 2025 10:32:00 +0100 Subject: [PATCH 111/157] Prepare 3.3.8 (2024.0.8). See #3714 --- pom.xml | 20 ++++---------------- 1 file changed, 4 insertions(+), 16 deletions(-) diff --git a/pom.xml b/pom.xml index 9e79992d88..1c18226498 100755 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ org.springframework.data.build spring-data-parent - 3.3.8-SNAPSHOT + 3.3.8 @@ -42,7 +42,7 @@ 4.9 9.1.0 42.7.4 - 3.3.8-SNAPSHOT + 3.3.8 0.10.3 org.hibernate @@ -286,20 +286,8 @@ - - spring-snapshot - https://repo.spring.io/snapshot - - true - - - false - - - - spring-milestone - https://repo.spring.io/milestone - + + From 98bbd88e73bce146b72864f7078c15683a76ccd3 Mon Sep 17 00:00:00 2001 From: Mark Paluch Date: Fri, 17 Jan 2025 10:32:17 +0100 Subject: [PATCH 112/157] Release version 3.3.8 (2024.0.8). See #3714 --- pom.xml | 2 +- spring-data-envers/pom.xml | 4 ++-- spring-data-jpa-distribution/pom.xml | 2 +- spring-data-jpa/pom.xml | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/pom.xml b/pom.xml index 1c18226498..5da0497f2e 100755 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ org.springframework.data spring-data-jpa-parent - 3.3.8-SNAPSHOT + 3.3.8 pom Spring Data JPA Parent diff --git a/spring-data-envers/pom.xml b/spring-data-envers/pom.xml index f8455967c2..39faece7bc 100755 --- a/spring-data-envers/pom.xml +++ b/spring-data-envers/pom.xml @@ -5,12 +5,12 @@ org.springframework.data spring-data-envers - 3.3.8-SNAPSHOT + 3.3.8 org.springframework.data spring-data-jpa-parent - 3.3.8-SNAPSHOT + 3.3.8 ../pom.xml diff --git a/spring-data-jpa-distribution/pom.xml b/spring-data-jpa-distribution/pom.xml index fa59854c2d..99fe3e958b 100644 --- a/spring-data-jpa-distribution/pom.xml +++ b/spring-data-jpa-distribution/pom.xml @@ -14,7 +14,7 @@ org.springframework.data spring-data-jpa-parent - 3.3.8-SNAPSHOT + 3.3.8 ../pom.xml diff --git a/spring-data-jpa/pom.xml b/spring-data-jpa/pom.xml index 6dadcddbf4..84136a858f 100644 --- a/spring-data-jpa/pom.xml +++ b/spring-data-jpa/pom.xml @@ -6,7 +6,7 @@ org.springframework.data spring-data-jpa - 3.3.8-SNAPSHOT + 3.3.8 Spring Data JPA Spring Data module for JPA repositories. @@ -15,7 +15,7 @@ org.springframework.data spring-data-jpa-parent - 3.3.8-SNAPSHOT + 3.3.8 ../pom.xml From 3c3ad7b00aeeb416723c6996c478a702d0659eca Mon Sep 17 00:00:00 2001 From: Mark Paluch Date: Fri, 17 Jan 2025 10:34:45 +0100 Subject: [PATCH 113/157] Prepare next development iteration. See #3714 --- pom.xml | 2 +- spring-data-envers/pom.xml | 4 ++-- spring-data-jpa-distribution/pom.xml | 2 +- spring-data-jpa/pom.xml | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/pom.xml b/pom.xml index 5da0497f2e..43052438a0 100755 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ org.springframework.data spring-data-jpa-parent - 3.3.8 + 3.3.9-SNAPSHOT pom Spring Data JPA Parent diff --git a/spring-data-envers/pom.xml b/spring-data-envers/pom.xml index 39faece7bc..2f269425fb 100755 --- a/spring-data-envers/pom.xml +++ b/spring-data-envers/pom.xml @@ -5,12 +5,12 @@ org.springframework.data spring-data-envers - 3.3.8 + 3.3.9-SNAPSHOT org.springframework.data spring-data-jpa-parent - 3.3.8 + 3.3.9-SNAPSHOT ../pom.xml diff --git a/spring-data-jpa-distribution/pom.xml b/spring-data-jpa-distribution/pom.xml index 99fe3e958b..48b5f543da 100644 --- a/spring-data-jpa-distribution/pom.xml +++ b/spring-data-jpa-distribution/pom.xml @@ -14,7 +14,7 @@ org.springframework.data spring-data-jpa-parent - 3.3.8 + 3.3.9-SNAPSHOT ../pom.xml diff --git a/spring-data-jpa/pom.xml b/spring-data-jpa/pom.xml index 84136a858f..535be983a4 100644 --- a/spring-data-jpa/pom.xml +++ b/spring-data-jpa/pom.xml @@ -6,7 +6,7 @@ org.springframework.data spring-data-jpa - 3.3.8 + 3.3.9-SNAPSHOT Spring Data JPA Spring Data module for JPA repositories. @@ -15,7 +15,7 @@ org.springframework.data spring-data-jpa-parent - 3.3.8 + 3.3.9-SNAPSHOT ../pom.xml From f0f957b5a696d8bf4c79247799bee27915d2af00 Mon Sep 17 00:00:00 2001 From: Mark Paluch Date: Fri, 17 Jan 2025 10:34:46 +0100 Subject: [PATCH 114/157] After release cleanups. See #3714 --- pom.xml | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/pom.xml b/pom.xml index 43052438a0..40c2f37da5 100755 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ org.springframework.data.build spring-data-parent - 3.3.8 + 3.3.9-SNAPSHOT @@ -42,7 +42,7 @@ 4.9 9.1.0 42.7.4 - 3.3.8 + 3.3.9-SNAPSHOT 0.10.3 org.hibernate @@ -286,8 +286,20 @@ - - + + spring-snapshot + https://repo.spring.io/snapshot + + true + + + false + + + + spring-milestone + https://repo.spring.io/milestone + From 9672b30e789796009c8c73b74d85d858c85555e0 Mon Sep 17 00:00:00 2001 From: Mark Paluch Date: Wed, 22 Jan 2025 14:15:39 +0100 Subject: [PATCH 115/157] =?UTF-8?q?Document=20that=20fluent=20`findBy(?= =?UTF-8?q?=E2=80=A6)`=20queries=20must=20return=20a=20result.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Closes #3294 --- .../repository/JpaSpecificationExecutor.java | 8 +++++++- .../support/QuerydslJpaPredicateExecutor.java | 11 ++++++++++- .../support/SimpleJpaRepository.java | 11 ++++++++++- .../jpa/repository/UserRepositoryTests.java | 19 ++++++++++++++----- 4 files changed, 41 insertions(+), 8 deletions(-) diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/JpaSpecificationExecutor.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/JpaSpecificationExecutor.java index 3abd83b2bf..4d18351a99 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/JpaSpecificationExecutor.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/JpaSpecificationExecutor.java @@ -23,6 +23,7 @@ import java.util.Optional; import java.util.function.Function; +import org.springframework.dao.InvalidDataAccessApiUsageException; import org.springframework.data.domain.Page; import org.springframework.data.domain.Pageable; import org.springframework.data.domain.Sort; @@ -122,11 +123,16 @@ public interface JpaSpecificationExecutor { /** * Returns entities matching the given {@link Specification} applying the {@code queryFunction} that defines the query * and its result type. + *

+ * The query object used with {@code queryFunction} is only valid inside the {@code findBy(…)} method call. This + * requires the query function to return a query result and not the {@link FluentQuery} object itself to ensure the + * query is executed inside the {@code findBy(…)} method. * * @param spec must not be null. * @param queryFunction the query function defining projection, sorting, and the result type - * @return all entities matching the given Example. + * @return all entities matching the given specification. * @since 3.0 + * @throws InvalidDataAccessApiUsageException if the query function returns the {@link FluentQuery} instance. */ R findBy(Specification spec, Function, R> queryFunction); diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/QuerydslJpaPredicateExecutor.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/QuerydslJpaPredicateExecutor.java index ad0762f78d..7b31a6ce5c 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/QuerydslJpaPredicateExecutor.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/QuerydslJpaPredicateExecutor.java @@ -24,6 +24,7 @@ import java.util.function.Function; import org.springframework.dao.IncorrectResultSizeDataAccessException; +import org.springframework.dao.InvalidDataAccessApiUsageException; import org.springframework.data.domain.KeysetScrollPosition; import org.springframework.data.domain.OffsetScrollPosition; import org.springframework.data.domain.Page; @@ -41,6 +42,7 @@ import org.springframework.data.querydsl.EntityPathResolver; import org.springframework.data.querydsl.QSort; import org.springframework.data.querydsl.QuerydslPredicateExecutor; +import org.springframework.data.repository.query.FluentQuery; import org.springframework.data.repository.query.FluentQuery.FetchableFluentQuery; import org.springframework.data.support.PageableExecutionUtils; import org.springframework.lang.Nullable; @@ -245,7 +247,14 @@ public R findBy(Predicate predicate, Function) fluentQuery); + R result = queryFunction.apply((FetchableFluentQuery) fluentQuery); + + if (result instanceof FluentQuery) { + throw new InvalidDataAccessApiUsageException( + "findBy(…) queries must result a query result and not the FluentQuery object to ensure that queries are executed within the scope of the findBy(…) method"); + } + + return result; } @Override diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/SimpleJpaRepository.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/SimpleJpaRepository.java index c217aa54c8..8c69552c77 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/SimpleJpaRepository.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/SimpleJpaRepository.java @@ -42,6 +42,7 @@ import java.util.function.BiConsumer; import java.util.function.Function; +import org.springframework.dao.InvalidDataAccessApiUsageException; import org.springframework.data.domain.Example; import org.springframework.data.domain.KeysetScrollPosition; import org.springframework.data.domain.OffsetScrollPosition; @@ -62,6 +63,7 @@ import org.springframework.data.jpa.support.PageableUtils; import org.springframework.data.projection.ProjectionFactory; import org.springframework.data.projection.SpelAwareProxyProjectionFactory; +import org.springframework.data.repository.query.FluentQuery; import org.springframework.data.repository.query.FluentQuery.FetchableFluentQuery; import org.springframework.data.support.PageableExecutionUtils; import org.springframework.data.util.ProxyUtils; @@ -539,7 +541,14 @@ private R doFindBy(Specification spec, Class domainClass, FetchableFluentQueryBySpecification fluentQuery = new FetchableFluentQueryBySpecification<>(spec, domainClass, finder, scrollDelegate, this::count, this::exists, this.entityManager, getProjectionFactory()); - return queryFunction.apply((FetchableFluentQuery) fluentQuery); + R result = queryFunction.apply((FetchableFluentQuery) fluentQuery); + + if (result instanceof FluentQuery) { + throw new InvalidDataAccessApiUsageException( + "findBy(…) queries must result a query result and not the FluentQuery object to ensure that queries are executed within the scope of the findBy(…) method"); + } + + return result; } @Override diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/UserRepositoryTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/UserRepositoryTests.java index cc201a01b7..11df50869d 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/UserRepositoryTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/UserRepositoryTests.java @@ -41,6 +41,7 @@ import java.util.Map; import java.util.Optional; import java.util.Set; +import java.util.function.Function; import java.util.stream.IntStream; import java.util.stream.Stream; @@ -2352,6 +2353,14 @@ void findByFluentExampleWithSorting() { assertThat(users).containsExactly(thirdUser, firstUser, fourthUser); } + @Test // GH-3294 + void findByFluentFailsReturningFluentQuery() { + + User prototype = new User(); + assertThatExceptionOfType(InvalidDataAccessApiUsageException.class) + .isThrownBy(() -> repository.findBy(of(prototype), Function.identity())); + } + @Test // GH-2294 void findByFluentExampleFirstValue() { @@ -2449,13 +2458,13 @@ void findByFluentExampleWithInterfaceBasedProjectionUsingSpEL() { prototype.setFirstname("v"); List users = repository.findBy( - of(prototype, - matching().withIgnorePaths("age", "createdAt", "active").withMatcher("firstname", - GenericPropertyMatcher::contains)), // - q -> q.as(UserProjectionUsingSpEL.class).all()); + of(prototype, + matching().withIgnorePaths("age", "createdAt", "active").withMatcher("firstname", + GenericPropertyMatcher::contains)), // + q -> q.as(UserProjectionUsingSpEL.class).all()); assertThat(users).extracting(UserProjectionUsingSpEL::hello) - .contains(new GreetingsFrom().groot(firstUser.getFirstname())); + .contains(new GreetingsFrom().groot(firstUser.getFirstname())); } @Test // GH-2294 From 1fc50dd3c9e97f9d15804fef5818429fa587adeb Mon Sep 17 00:00:00 2001 From: Mark Paluch Date: Wed, 29 Jan 2025 15:07:47 +0100 Subject: [PATCH 116/157] Skip parameter lookup for unused query parameters. We now skip binding parameter lookup if the query isn't using named parameters and the parameter is not associated with a name. Also, we check for presence of lookup identifiers to avoid parameter binding that cannot be looked up as they are not used anymore. This can happen when a declared query uses parameters only in the ORDER BY clause that is truncated during count query derivation. Then the query object reports parameters althtough they are not being used. We also refined parameter carryover during count query derivation. Previously, we copied all parameters without introspecting their origin. now, we copy only expression parameters to the derived query as count query derivation doesn't have access to expressions as our query parsers require valid JPQL. Closes #3756 --- .../query/QueryParameterSetterFactory.java | 7 ++- .../jpa/repository/query/StringQuery.java | 20 +++++--- .../jpa/repository/UserRepositoryTests.java | 36 +++++++++---- .../ExpressionBasedStringQueryUnitTests.java | 6 +-- .../query/StringQueryUnitTests.java | 50 +++++++++++++++++++ .../jpa/repository/sample/UserRepository.java | 45 ++++++++--------- 6 files changed, 118 insertions(+), 46 deletions(-) diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/QueryParameterSetterFactory.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/QueryParameterSetterFactory.java index 8bdeea1f02..5682d909ca 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/QueryParameterSetterFactory.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/QueryParameterSetterFactory.java @@ -245,10 +245,13 @@ public QueryParameterSetter create(ParameterBinding binding, DeclaredQuery decla BindingIdentifier identifier = mia.identifier(); - if (declaredQuery.hasNamedParameter()) { + if (declaredQuery.hasNamedParameter() && identifier.hasName()) { parameter = findParameterForBinding(parameters, identifier.getName()); - } else { + } else if (identifier.hasPosition()) { parameter = findParameterForBinding(parameters, identifier.getPosition() - 1); + } else { + // this can happen when a query uses parameters in ORDER BY and the COUNT query just needs to drop a binding. + parameter = null; } return parameter == null // diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/StringQuery.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/StringQuery.java index 4a2e9d8e25..1a26f381fd 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/StringQuery.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/StringQuery.java @@ -113,9 +113,19 @@ public DeclaredQuery deriveCountQuery(@Nullable String countQueryProjection) { StringQuery stringQuery = new StringQuery(this.queryEnhancer.createCountQueryFor(countQueryProjection), // this.isNative); + // need to copy expression bindings from the declared to the derived query as JPQL query derivation only sees JPA + // parameter markers and not the original expressions anymore. if (this.hasParameterBindings() && !this.getParameterBindings().equals(stringQuery.getParameterBindings())) { - stringQuery.getParameterBindings().clear(); - stringQuery.getParameterBindings().addAll(this.bindings); + + List derivedBindings = stringQuery.getParameterBindings(); + + for (ParameterBinding binding : bindings) { + + if (binding.getOrigin().isExpression() && derivedBindings + .removeIf(it -> !it.getOrigin().isExpression() && it.getIdentifier().equals(binding.getIdentifier()))) { + derivedBindings.add(binding); + } + } } return stringQuery; @@ -235,8 +245,7 @@ private String parseParameterBindingsOfQueryIntoBindingsAndReturnCleanedQuery(St greatestParameterIndex = 0; } - SpelExtractor spelExtractor = createSpelExtractor(query, parametersShouldBeAccessedByIndex, - greatestParameterIndex); + SpelExtractor spelExtractor = createSpelExtractor(query, parametersShouldBeAccessedByIndex, greatestParameterIndex); String resultingQuery = spelExtractor.getQueryString(); Matcher matcher = PARAMETER_BINDING_PATTERN.matcher(resultingQuery); @@ -340,8 +349,7 @@ private String parseParameterBindingsOfQueryIntoBindingsAndReturnCleanedQuery(St return resultingQuery; } - private static SpelExtractor createSpelExtractor(String queryWithSpel, boolean parametersShouldBeAccessedByIndex, - int greatestParameterIndex) { + private static SpelExtractor createSpelExtractor(String queryWithSpel, boolean parametersShouldBeAccessedByIndex, int greatestParameterIndex) { /* * If parameters need to be bound by index, we bind the synthetic expression parameters starting from position of the greatest discovered index parameter in order to diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/UserRepositoryTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/UserRepositoryTests.java index 11df50869d..98b1334957 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/UserRepositoryTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/UserRepositoryTests.java @@ -3016,22 +3016,36 @@ void handlesColonsFollowedByIntegerInStringLiteral() { assertThat(users).extracting(User::getId).containsExactly(expected.getId()); } - @Disabled("ORDER BY CASE appears to be a Hibernate-only feature") - @Test // DATAJPA-1233 + @Test // DATAJPA-1233, GH-3756 void handlesCountQueriesWithLessParametersSingleParam() { - // repository.findAllOrderedBySpecialNameSingleParam("Oliver", PageRequest.of(2, 3)); + + flushTestUsers(); + + Page result = repository.findAllOrderedByNamedParam("Oliver", PageRequest.of(0, 3)); + + assertThat(result.getContent()).containsExactly(firstUser, fourthUser, thirdUser); + assertThat(result.getTotalElements()).isEqualTo(4); + + result = repository.findAllOrderedByIndexedParam("Oliver", PageRequest.of(0, 3)); + + assertThat(result.getContent()).containsExactly(firstUser, fourthUser, thirdUser); + assertThat(result.getTotalElements()).isEqualTo(4); } - @Disabled("ORDER BY CASE appears to be a Hibernate-only feature") - @Test // DATAJPA-1233 + @Test // DATAJPA-1233, GH-3756 void handlesCountQueriesWithLessParametersMoreThanOne() { - // repository.findAllOrderedBySpecialNameMultipleParams("Oliver", "x", PageRequest.of(2, 3)); - } - @Disabled("ORDER BY CASE appears to be a Hibernate-only feature") - @Test // DATAJPA-1233 - void handlesCountQueriesWithLessParametersMoreThanOneIndexed() { - // repository.findAllOrderedBySpecialNameMultipleParamsIndexed("x", "Oliver", PageRequest.of(2, 3)); + flushTestUsers(); + + Page result = repository.findAllOrderedBySpecialNameMultipleParams("Oliver", "x", PageRequest.of(0, 3)); + + assertThat(result.getContent()).containsExactly(firstUser, fourthUser, thirdUser); + assertThat(result.getTotalElements()).isEqualTo(4); + + result = repository.findAllOrderedBySpecialNameMultipleParamsIndexed("x", "Oliver", PageRequest.of(0, 3)); + + assertThat(result.getContent()).containsExactly(firstUser, fourthUser, thirdUser); + assertThat(result.getTotalElements()).isEqualTo(4); } // DATAJPA-928 diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/ExpressionBasedStringQueryUnitTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/ExpressionBasedStringQueryUnitTests.java index 91b4ecea84..168189c6bc 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/ExpressionBasedStringQueryUnitTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/ExpressionBasedStringQueryUnitTests.java @@ -176,7 +176,7 @@ void indexedExpressionsShouldCreateLikeBindings() { } @Test - public void doesTemplatingWhenEntityNameSpelIsPresent() { + void doesTemplatingWhenEntityNameSpelIsPresent() { StringQuery query = new ExpressionBasedStringQuery("select #{#entityName + 'Hallo'} from #{#entityName} u", metadata, SPEL_PARSER, false); @@ -185,7 +185,7 @@ public void doesTemplatingWhenEntityNameSpelIsPresent() { } @Test - public void doesNoTemplatingWhenEntityNameSpelIsNotPresent() { + void doesNoTemplatingWhenEntityNameSpelIsNotPresent() { StringQuery query = new ExpressionBasedStringQuery("select #{#entityName + 'Hallo'} from User u", metadata, SPEL_PARSER, false); @@ -194,7 +194,7 @@ public void doesNoTemplatingWhenEntityNameSpelIsNotPresent() { } @Test - public void doesTemplatingWhenEntityNameSpelIsPresentForBindParameter() { + void doesTemplatingWhenEntityNameSpelIsPresentForBindParameter() { StringQuery query = new ExpressionBasedStringQuery("select u from #{#entityName} u where name = :#{#something}", metadata, SPEL_PARSER, false); diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/StringQueryUnitTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/StringQueryUnitTests.java index 5e19aaddb9..a44267a7b0 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/StringQueryUnitTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/StringQueryUnitTests.java @@ -309,6 +309,56 @@ void allowsReuseOfParameterWithInAndRegularBinding() { assertNamedBinding(InParameterBinding.class, "foo_1", bindings.get(1)); } + @Test // GH-3126 + void countQueryDerivationRetainsNamedExpressionParameters() { + + StringQuery query = new StringQuery( + "select u from User u where foo = :#{bar} ORDER BY CASE WHEN (u.firstname >= :#{name}) THEN 0 ELSE 1 END", + false); + + DeclaredQuery countQuery = query.deriveCountQuery(null); + + assertThat(countQuery.getParameterBindings()).hasSize(1); + assertThat(countQuery.getParameterBindings()).extracting(ParameterBinding::getOrigin) + .extracting(ParameterOrigin::isExpression).isEqualTo(List.of(true)); + + query = new StringQuery( + "select u from User u where foo = :#{bar} and bar = :bar ORDER BY CASE WHEN (u.firstname >= :bar) THEN 0 ELSE 1 END", + false); + + countQuery = query.deriveCountQuery(null); + + assertThat(countQuery.getParameterBindings()).hasSize(2); + assertThat(countQuery.getParameterBindings()) // + .extracting(ParameterBinding::getOrigin) // + .extracting(ParameterOrigin::isExpression).contains(true, false); + } + + @Test // GH-3126 + void countQueryDerivationRetainsIndexedExpressionParameters() { + + StringQuery query = new StringQuery( + "select u from User u where foo = ?#{bar} ORDER BY CASE WHEN (u.firstname >= ?#{name}) THEN 0 ELSE 1 END", + false); + + DeclaredQuery countQuery = query.deriveCountQuery(null); + + assertThat(countQuery.getParameterBindings()).hasSize(1); + assertThat(countQuery.getParameterBindings()).extracting(ParameterBinding::getOrigin) + .extracting(ParameterOrigin::isExpression).isEqualTo(List.of(true)); + + query = new StringQuery( + "select u from User u where foo = ?#{bar} and bar = ?1 ORDER BY CASE WHEN (u.firstname >= ?1) THEN 0 ELSE 1 END", + false); + + countQuery = query.deriveCountQuery(null); + + assertThat(countQuery.getParameterBindings()).hasSize(2); + assertThat(countQuery.getParameterBindings()) // + .extracting(ParameterBinding::getOrigin) // + .extracting(ParameterOrigin::isExpression).contains(true, false); + } + @Test // DATAJPA-461 void detectsMultiplePositionalInParameterBindings() { diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/sample/UserRepository.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/sample/UserRepository.java index eec409f62d..4a88310b46 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/sample/UserRepository.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/sample/UserRepository.java @@ -82,9 +82,8 @@ public interface UserRepository extends JpaRepository, JpaSpecifi java.util.Optional findById(Integer primaryKey); /** - * Redeclaration of {@link CrudRepository#deleteById(java.lang.Object)}. to make sure the transaction - * configuration of the original method is considered if the redeclaration does not carry a {@link Transactional} - * annotation. + * Redeclaration of {@link CrudRepository#deleteById(java.lang.Object)}. to make sure the transaction configuration of + * the original method is considered if the redeclaration does not carry a {@link Transactional} annotation. */ @Override void deleteById(Integer id); // DATACMNS-649 @@ -416,7 +415,8 @@ Window findTop3ByFirstnameStartingWithOrderByFirstnameAscEmailAddressAsc(S @Query("select u from User u where u.firstname = ?#{[0]} and u.firstname = ?1 and u.lastname like %?#{[1]}% and u.lastname like %?2%") List findByFirstnameAndLastnameWithSpelExpression(String firstname, String lastname); - @Query(value = "select * from SD_User", countQuery = "select count(1) from SD_User u where u.lastname = :#{#lastname}", nativeQuery = true) + @Query(value = "select * from SD_User", + countQuery = "select count(1) from SD_User u where u.lastname = :#{#lastname}", nativeQuery = true) Page findByWithSpelParameterOnlyUsedForCountQuery(String lastname, Pageable page); // DATAJPA-564 @@ -563,26 +563,23 @@ List findUsersByFirstnameForSpELExpressionWithParameterIndexOnlyWithEntity @Query("SELECT u FROM User u where u.firstname >= ?1 and u.lastname = '000:1'") List queryWithIndexedParameterAndColonFollowedByIntegerInString(String firstname); - /** - * TODO: ORDER BY CASE appears to only with Hibernate. The examples attempting to do this through pure JPQL don't - * appear to work with Hibernate, so we must set them aside until we can implement HQL. - */ - // // DATAJPA-1233 - // @Query(value = "SELECT u FROM User u ORDER BY CASE WHEN (u.firstname >= :name) THEN 0 ELSE 1 END, u.firstname") - // Page findAllOrderedBySpecialNameSingleParam(@Param("name") String name, Pageable page); - // - // // DATAJPA-1233 - // @Query( - // value = "SELECT u FROM User u WHERE :other = 'x' ORDER BY CASE WHEN (u.firstname >= :name) THEN 0 ELSE 1 END, - // u.firstname") - // Page findAllOrderedBySpecialNameMultipleParams(@Param("name") String name, @Param("other") String other, - // Pageable page); - // - // // DATAJPA-1233 - // @Query( - // value = "SELECT u FROM User u WHERE ?2 = 'x' ORDER BY CASE WHEN (u.firstname >= ?1) THEN 0 ELSE 1 END, - // u.firstname") - // Page findAllOrderedBySpecialNameMultipleParamsIndexed(String other, String name, Pageable page); + @Query(value = "SELECT u FROM User u ORDER BY CASE WHEN (u.firstname >= :name) THEN 0 ELSE 1 END, u.firstname") + Page findAllOrderedByNamedParam(@Param("name") String name, Pageable page); + + @Query(value = "SELECT u FROM User u ORDER BY CASE WHEN (u.firstname >= ?1) THEN 0 ELSE 1 END, u.firstname") + Page findAllOrderedByIndexedParam(String name, Pageable page); + + @Query( + value = "SELECT u FROM User u WHERE :other = 'x' ORDER BY CASE WHEN (u.firstname >= :name) THEN 0 ELSE 1 END, u.firstname") + Page findAllOrderedBySpecialNameMultipleParams(@Param("name") String name, @Param("other") String other, + Pageable page); + + // Note that parameters used in the order-by statement are just cut off, so we must declare a query that parameter + // label order remains valid even after truncating the order by part. (i.e. WHERE ?2 = 'x' ORDER BY CASE WHEN + // (u.firstname >= ?1) isn't going to work). + @Query( + value = "SELECT u FROM User u WHERE ?1 = 'x' ORDER BY CASE WHEN (u.firstname >= ?2) THEN 0 ELSE 1 END, u.firstname") + Page findAllOrderedBySpecialNameMultipleParamsIndexed(String other, String name, Pageable page); // DATAJPA-928 Page findByNativeNamedQueryWithPageable(Pageable pageable); From d2fc62edebc8db656b7adb0bbb345b7bc840cefd Mon Sep 17 00:00:00 2001 From: Mark Paluch Date: Fri, 31 Jan 2025 10:35:51 +0100 Subject: [PATCH 117/157] Remove duplicate plugin setup from parent pom. Closes #3474 --- pom.xml | 116 ---------------------------------------- spring-data-jpa/pom.xml | 49 +++++++++++++++-- 2 files changed, 46 insertions(+), 119 deletions(-) diff --git a/pom.xml b/pom.xml index 40c2f37da5..94e4c701a5 100755 --- a/pom.xml +++ b/pom.xml @@ -118,43 +118,6 @@ - - all-dbs - - - - org.apache.maven.plugins - maven-surefire-plugin - - - mysql-test - test - - test - - - - **/MySql*IntegrationTests.java - - - - - postgres-test - test - - test - - - - **/Postgres*IntegrationTests.java - - - - - - - - eclipselink-next @@ -185,85 +148,6 @@ - - - - org.apache.maven.plugins - maven-surefire-plugin - - - org.springframework - spring-instrument - ${spring} - runtime - - - - - - default-test - - - **/* - - - - - unit-test - - test - - test - - - **/*UnitTests.java - - - - - integration-test - - test - - test - - - **/*IntegrationTests.java - **/*Tests.java - - - **/*UnitTests.java - **/OpenJpa* - **/EclipseLink* - **/MySql* - **/Postgres* - - - -javaagent:${settings.localRepository}/org/springframework/spring-instrument/${spring}/spring-instrument-${spring}.jar - - - - - eclipselink-test - - test - - test - - - **/EclipseLink*Tests.java - - - -javaagent:${settings.localRepository}/org/eclipse/persistence/org.eclipse.persistence.jpa/${eclipselink}/org.eclipse.persistence.jpa-${eclipselink}.jar - -javaagent:${settings.localRepository}/org/springframework/spring-instrument/${spring}/spring-instrument-${spring}.jar - - - - - - - - diff --git a/spring-data-jpa/pom.xml b/spring-data-jpa/pom.xml index 535be983a4..bb7b1fc440 100644 --- a/spring-data-jpa/pom.xml +++ b/spring-data-jpa/pom.xml @@ -1,6 +1,7 @@ - + 4.0.0 @@ -336,7 +337,8 @@ generate-sources true - ${project.basedir}/src/main/antlr4 + ${project.basedir}/src/main/antlr4 + @@ -427,4 +429,45 @@ + + + all-dbs + + + + org.apache.maven.plugins + maven-surefire-plugin + + + mysql-test + test + + test + + + + **/MySql*IntegrationTests.java + + + + + postgres-test + test + + test + + + + **/Postgres*IntegrationTests.java + + + + + + + + + + + From fef40437e4b3c3e62ce49a6f33e571ac6b3b86f8 Mon Sep 17 00:00:00 2001 From: Mark Paluch Date: Fri, 31 Jan 2025 10:58:58 +0100 Subject: [PATCH 118/157] Refine performance requirements on derived delete queries. Closes #3177 --- src/main/antora/modules/ROOT/pages/jpa/query-methods.adoc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/main/antora/modules/ROOT/pages/jpa/query-methods.adoc b/src/main/antora/modules/ROOT/pages/jpa/query-methods.adoc index 81eee4ecb1..cfa3039570 100644 --- a/src/main/antora/modules/ROOT/pages/jpa/query-methods.adoc +++ b/src/main/antora/modules/ROOT/pages/jpa/query-methods.adoc @@ -601,6 +601,9 @@ To make sure lifecycle queries are actually invoked, an invocation of `deleteByR In fact, a derived delete query is a shortcut for running the query and then calling `CrudRepository.delete(Iterable users)` on the result and keeping behavior in sync with the implementations of other `delete(…)` methods in `CrudRepository`. +NOTE: When deleting a lot of objects you will need to consider the performance implications to ensure sufficient memory availability. +All resulting objects are loaded into memory before being deleted and are held in the session until flushing or completing the transaction. + [[jpa.query-hints]] == Applying Query Hints To apply JPA query hints to the queries declared in your repository interface, you can use the `@QueryHints` annotation. It takes an array of JPA `@QueryHint` annotations plus a boolean flag to potentially disable the hints applied to the additional count query triggered when applying pagination, as shown in the following example: From 346cc6dc30b8c17140a9db214b2debd6c268c720 Mon Sep 17 00:00:00 2001 From: Mark Paluch Date: Tue, 11 Feb 2025 15:22:24 +0100 Subject: [PATCH 119/157] Update CI Properties. See #3746 --- .mvn/extensions.xml | 2 +- .mvn/jvm.config | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 .mvn/jvm.config diff --git a/.mvn/extensions.xml b/.mvn/extensions.xml index 1e3bb355f5..e0857eaa25 100644 --- a/.mvn/extensions.xml +++ b/.mvn/extensions.xml @@ -3,6 +3,6 @@ io.spring.develocity.conventions develocity-conventions-maven-extension - 0.0.19 + 0.0.22 diff --git a/.mvn/jvm.config b/.mvn/jvm.config new file mode 100644 index 0000000000..32599cefea --- /dev/null +++ b/.mvn/jvm.config @@ -0,0 +1,10 @@ +--add-exports jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED +--add-exports jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED +--add-exports jdk.compiler/com.sun.tools.javac.main=ALL-UNNAMED +--add-exports jdk.compiler/com.sun.tools.javac.model=ALL-UNNAMED +--add-exports jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED +--add-exports jdk.compiler/com.sun.tools.javac.processing=ALL-UNNAMED +--add-exports jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED +--add-exports jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED +--add-opens jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED +--add-opens jdk.compiler/com.sun.tools.javac.comp=ALL-UNNAMED From d0aeea8c76ed000a0a3a138c25884f396f2c5c83 Mon Sep 17 00:00:00 2001 From: Mark Paluch Date: Fri, 14 Feb 2025 09:49:40 +0100 Subject: [PATCH 120/157] Prepare 3.3.9 (2024.0.9). See #3746 --- pom.xml | 20 ++++---------------- 1 file changed, 4 insertions(+), 16 deletions(-) diff --git a/pom.xml b/pom.xml index 94e4c701a5..47dc495bd5 100755 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ org.springframework.data.build spring-data-parent - 3.3.9-SNAPSHOT + 3.3.9 @@ -42,7 +42,7 @@ 4.9 9.1.0 42.7.4 - 3.3.9-SNAPSHOT + 3.3.9 0.10.3 org.hibernate @@ -170,20 +170,8 @@ - - spring-snapshot - https://repo.spring.io/snapshot - - true - - - false - - - - spring-milestone - https://repo.spring.io/milestone - + + From cfcdc9f88c4b9a40b75c9f2a23c2442740397c6c Mon Sep 17 00:00:00 2001 From: Mark Paluch Date: Fri, 14 Feb 2025 09:50:00 +0100 Subject: [PATCH 121/157] Release version 3.3.9 (2024.0.9). See #3746 --- pom.xml | 2 +- spring-data-envers/pom.xml | 4 ++-- spring-data-jpa-distribution/pom.xml | 2 +- spring-data-jpa/pom.xml | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/pom.xml b/pom.xml index 47dc495bd5..46952c0b06 100755 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ org.springframework.data spring-data-jpa-parent - 3.3.9-SNAPSHOT + 3.3.9 pom Spring Data JPA Parent diff --git a/spring-data-envers/pom.xml b/spring-data-envers/pom.xml index 2f269425fb..0b2f46dbcf 100755 --- a/spring-data-envers/pom.xml +++ b/spring-data-envers/pom.xml @@ -5,12 +5,12 @@ org.springframework.data spring-data-envers - 3.3.9-SNAPSHOT + 3.3.9 org.springframework.data spring-data-jpa-parent - 3.3.9-SNAPSHOT + 3.3.9 ../pom.xml diff --git a/spring-data-jpa-distribution/pom.xml b/spring-data-jpa-distribution/pom.xml index 48b5f543da..32831cfa97 100644 --- a/spring-data-jpa-distribution/pom.xml +++ b/spring-data-jpa-distribution/pom.xml @@ -14,7 +14,7 @@ org.springframework.data spring-data-jpa-parent - 3.3.9-SNAPSHOT + 3.3.9 ../pom.xml diff --git a/spring-data-jpa/pom.xml b/spring-data-jpa/pom.xml index bb7b1fc440..576b3ec148 100644 --- a/spring-data-jpa/pom.xml +++ b/spring-data-jpa/pom.xml @@ -7,7 +7,7 @@ org.springframework.data spring-data-jpa - 3.3.9-SNAPSHOT + 3.3.9 Spring Data JPA Spring Data module for JPA repositories. @@ -16,7 +16,7 @@ org.springframework.data spring-data-jpa-parent - 3.3.9-SNAPSHOT + 3.3.9 ../pom.xml From d827e7710148b84f1fba272d32e64783a4b1e9b0 Mon Sep 17 00:00:00 2001 From: Mark Paluch Date: Fri, 14 Feb 2025 09:52:49 +0100 Subject: [PATCH 122/157] Prepare next development iteration. See #3746 --- pom.xml | 2 +- spring-data-envers/pom.xml | 4 ++-- spring-data-jpa-distribution/pom.xml | 2 +- spring-data-jpa/pom.xml | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/pom.xml b/pom.xml index 46952c0b06..4534ce21ef 100755 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ org.springframework.data spring-data-jpa-parent - 3.3.9 + 3.3.10-SNAPSHOT pom Spring Data JPA Parent diff --git a/spring-data-envers/pom.xml b/spring-data-envers/pom.xml index 0b2f46dbcf..ffe1040fd4 100755 --- a/spring-data-envers/pom.xml +++ b/spring-data-envers/pom.xml @@ -5,12 +5,12 @@ org.springframework.data spring-data-envers - 3.3.9 + 3.3.10-SNAPSHOT org.springframework.data spring-data-jpa-parent - 3.3.9 + 3.3.10-SNAPSHOT ../pom.xml diff --git a/spring-data-jpa-distribution/pom.xml b/spring-data-jpa-distribution/pom.xml index 32831cfa97..7e3a48e9c2 100644 --- a/spring-data-jpa-distribution/pom.xml +++ b/spring-data-jpa-distribution/pom.xml @@ -14,7 +14,7 @@ org.springframework.data spring-data-jpa-parent - 3.3.9 + 3.3.10-SNAPSHOT ../pom.xml diff --git a/spring-data-jpa/pom.xml b/spring-data-jpa/pom.xml index 576b3ec148..bc982ad22b 100644 --- a/spring-data-jpa/pom.xml +++ b/spring-data-jpa/pom.xml @@ -7,7 +7,7 @@ org.springframework.data spring-data-jpa - 3.3.9 + 3.3.10-SNAPSHOT Spring Data JPA Spring Data module for JPA repositories. @@ -16,7 +16,7 @@ org.springframework.data spring-data-jpa-parent - 3.3.9 + 3.3.10-SNAPSHOT ../pom.xml From d56bb754d7ad807f309dd5e1369a7dcce64e7f0d Mon Sep 17 00:00:00 2001 From: Mark Paluch Date: Fri, 14 Feb 2025 09:52:50 +0100 Subject: [PATCH 123/157] After release cleanups. See #3746 --- pom.xml | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/pom.xml b/pom.xml index 4534ce21ef..719bd279e7 100755 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ org.springframework.data.build spring-data-parent - 3.3.9 + 3.3.10-SNAPSHOT @@ -42,7 +42,7 @@ 4.9 9.1.0 42.7.4 - 3.3.9 + 3.3.10-SNAPSHOT 0.10.3 org.hibernate @@ -170,8 +170,20 @@ - - + + spring-snapshot + https://repo.spring.io/snapshot + + true + + + false + + + + spring-milestone + https://repo.spring.io/milestone + From 11be12c8d06562454af70250036ce9eab72b50f4 Mon Sep 17 00:00:00 2001 From: birariro Date: Wed, 19 Jun 2024 18:35:31 +0900 Subject: [PATCH 124/157] Apply sort from unpaged Pageable to query. This commit makes sure to pass on a given Sort from an unpaged Pageable to the actual query. Closes: #3476 Original Pull Request: #3517 --- .../jpa/repository/support/SimpleJpaRepository.java | 12 ++---------- .../data/jpa/repository/UserRepositoryTests.java | 12 ++++++++++++ 2 files changed, 14 insertions(+), 10 deletions(-) diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/SimpleJpaRepository.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/SimpleJpaRepository.java index 8c69552c77..bdb73095b6 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/SimpleJpaRepository.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/SimpleJpaRepository.java @@ -430,11 +430,6 @@ public List findAll(Sort sort) { @Override public Page findAll(Pageable pageable) { - - if (pageable.isUnpaged()) { - return new PageImpl<>(findAll()); - } - return findAll((Specification) null, pageable); } @@ -728,9 +723,7 @@ protected Page readPage(TypedQuery query, final Class dom * @param pageable must not be {@literal null}. */ protected TypedQuery getQuery(@Nullable Specification spec, Pageable pageable) { - - Sort sort = pageable.isPaged() ? pageable.getSort() : Sort.unsorted(); - return getQuery(spec, getDomainClass(), sort); + return getQuery(spec, getDomainClass(), pageable.getSort()); } /** @@ -743,8 +736,7 @@ protected TypedQuery getQuery(@Nullable Specification spec, Pageable pagea protected TypedQuery getQuery(@Nullable Specification spec, Class domainClass, Pageable pageable) { - Sort sort = pageable.isPaged() ? pageable.getSort() : Sort.unsorted(); - return getQuery(spec, domainClass, sort); + return getQuery(spec, domainClass, pageable.getSort()); } /** diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/UserRepositoryTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/UserRepositoryTests.java index 98b1334957..b7d8f504db 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/UserRepositoryTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/UserRepositoryTests.java @@ -2896,6 +2896,18 @@ void existsByExampleNegative() { assertThat(exists).isFalse(); } + @Test // GH-3476 + void unPagedSortedQuery() { + + flushTestUsers(); + + Sort sort = Sort.by(DESC, "firstname"); + Page firstPage = repository.findAll(PageRequest.of(0, 10, sort)); + Page secondPage = repository.findAll(Pageable.unpaged(sort)); + assertThat(firstPage.getContent()).isEqualTo(secondPage.getContent()); + } + + @Test // DATAJPA-905 void executesPagedSpecificationSettingAnOrder() { From ad4317abccc59410a49bdf1291444d196b01f1a7 Mon Sep 17 00:00:00 2001 From: Mark Paluch Date: Wed, 5 Feb 2025 08:54:33 +0100 Subject: [PATCH 125/157] Consider sort order for unpaged Pageable in Querydsl. We now apply sorting using Querydsl for Pageable that is sorted but not paged. Closes #3761 --- .../data/jpa/repository/support/Querydsl.java | 9 ++++----- .../data/jpa/repository/support/SimpleJpaRepository.java | 1 - .../support/QuerydslJpaPredicateExecutorUnitTests.java | 8 +++++++- 3 files changed, 11 insertions(+), 7 deletions(-) diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/Querydsl.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/Querydsl.java index cd3945bd14..d895d4717a 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/Querydsl.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/Querydsl.java @@ -108,12 +108,11 @@ public JPQLQuery applyPagination(Pageable pageable, JPQLQuery query) { Assert.notNull(pageable, "Pageable must not be null"); Assert.notNull(query, "JPQLQuery must not be null"); - if (pageable.isUnpaged()) { - return query; - } + if (pageable.isPaged()) { - query.offset(pageable.getOffset()); - query.limit(pageable.getPageSize()); + query.offset(pageable.getOffset()); + query.limit(pageable.getPageSize()); + } return applySorting(pageable.getSort(), query); } diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/SimpleJpaRepository.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/SimpleJpaRepository.java index bdb73095b6..3ee2c7736f 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/SimpleJpaRepository.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/SimpleJpaRepository.java @@ -735,7 +735,6 @@ protected TypedQuery getQuery(@Nullable Specification spec, Pageable pagea */ protected TypedQuery getQuery(@Nullable Specification spec, Class domainClass, Pageable pageable) { - return getQuery(spec, domainClass, pageable.getSort()); } diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/QuerydslJpaPredicateExecutorUnitTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/QuerydslJpaPredicateExecutorUnitTests.java index 559bc0f2af..ef8d1c6c87 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/QuerydslJpaPredicateExecutorUnitTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/QuerydslJpaPredicateExecutorUnitTests.java @@ -282,9 +282,15 @@ void shouldSupportFindAllWithPredicateAndSort() { assertThat(users).contains(carter, dave, oliver); } - @Test // DATAJPA-585 + @Test // DATAJPA-585, 3761 void worksWithUnpagedPageable() { + assertThat(predicateExecutor.findAll(user.dateOfBirth.isNull(), Pageable.unpaged()).getContent()).hasSize(3); + + Page users = predicateExecutor.findAll(user.dateOfBirth.isNull(), + Pageable.unpaged(Sort.by(Direction.ASC, "firstname"))); + + assertThat(users).containsExactly(carter, dave, oliver); } @Test // DATAJPA-912 From d83bfac77eb7caad05cbaff76c1db4dbc7442b5a Mon Sep 17 00:00:00 2001 From: Mark Paluch Date: Mon, 24 Feb 2025 11:57:43 +0100 Subject: [PATCH 126/157] Refine count-query derivation parameter post-processing. We've now expanded parameter post-processing for derived count queries to consider binding types (in, like) and to correctly retain invocation parameter redirects instead of assuming an exact mapping of parameter positions in the final query to the actual invocation argument names/indices. Closes #3784 --- .../repository/query/ParameterBinding.java | 14 +++ .../jpa/repository/query/StringQuery.java | 8 +- .../query/StringQueryUnitTests.java | 102 ++++++++++++++++++ 3 files changed, 122 insertions(+), 2 deletions(-) diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/ParameterBinding.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/ParameterBinding.java index efa1b8b1ea..4c2a1e06c1 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/ParameterBinding.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/ParameterBinding.java @@ -155,6 +155,10 @@ public Object prepare(@Nullable Object valueToBind) { */ public boolean bindsTo(ParameterBinding other) { + if (getIdentifier().equals(other.getIdentifier())) { + return true; + } + if (identifier.hasName() && other.identifier.hasName()) { if (identifier.getName().equals(other.identifier.getName())) { return true; @@ -502,6 +506,16 @@ static Expression ofExpression(String expression) { return new Expression(expression); } + /** + * Creates a {@link MethodInvocationArgument} object for {@code name} + * + * @param name the parameter name from the method invocation. + * @return {@link MethodInvocationArgument} object for {@code name}. + */ + static MethodInvocationArgument ofParameter(String name) { + return ofParameter(name, null); + } + /** * Creates a {@link MethodInvocationArgument} object for {@code name} and {@code position}. Either the name or the * position must be given. diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/StringQuery.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/StringQuery.java index 1a26f381fd..05ccf64c25 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/StringQuery.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/StringQuery.java @@ -23,6 +23,7 @@ import java.util.function.BiFunction; import java.util.function.Consumer; import java.util.function.Function; +import java.util.function.Predicate; import java.util.regex.Matcher; import java.util.regex.Pattern; @@ -121,8 +122,11 @@ public DeclaredQuery deriveCountQuery(@Nullable String countQueryProjection) { for (ParameterBinding binding : bindings) { - if (binding.getOrigin().isExpression() && derivedBindings - .removeIf(it -> !it.getOrigin().isExpression() && it.getIdentifier().equals(binding.getIdentifier()))) { + Predicate identifier = binding::bindsTo; + Predicate notCompatible = Predicate.not(binding::isCompatibleWith); + + // replace incompatible bindings + if (derivedBindings.removeIf(it -> identifier.test(it) && notCompatible.test(it))) { derivedBindings.add(binding); } } diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/StringQueryUnitTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/StringQueryUnitTests.java index a44267a7b0..7052c1eb82 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/StringQueryUnitTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/StringQueryUnitTests.java @@ -160,6 +160,66 @@ void rewritesNamedLikeToUniqueParametersIfNecessary() { assertThat(((MethodInvocationArgument) parameterBinding.getOrigin()).identifier().getName()).isEqualTo("firstname"); } + @Test // GH-3784 + void rewritesNamedLikeToUniqueParametersRetainingCountQuery() { + + DeclaredQuery query = new StringQuery( + "select u from User u where u.firstname like %:firstname or u.firstname like :firstname% or u.firstname = :firstname", + false).deriveCountQuery(null); + + assertThat(query.getQueryString()) // + .isEqualTo( + "select count(u) from User u where u.firstname like :firstname or u.firstname like :firstname_1 or u.firstname = :firstname_2"); + + List bindings = query.getParameterBindings(); + assertThat(bindings).hasSize(3); + + LikeParameterBinding binding = (LikeParameterBinding) bindings.get(0); + assertThat(binding).isNotNull(); + assertThat(binding.getOrigin()).isEqualTo(ParameterOrigin.ofParameter("firstname")); + assertThat(binding.getName()).isEqualTo("firstname"); + assertThat(binding.getType()).isEqualTo(Type.ENDING_WITH); + + binding = (LikeParameterBinding) bindings.get(1); + assertThat(binding).isNotNull(); + assertThat(binding.getOrigin()).isEqualTo(ParameterOrigin.ofParameter("firstname")); + assertThat(binding.getName()).isEqualTo("firstname_1"); + assertThat(binding.getType()).isEqualTo(Type.STARTING_WITH); + + ParameterBinding parameterBinding = bindings.get(2); + assertThat(parameterBinding).isNotNull(); + assertThat(parameterBinding.getOrigin()).isEqualTo(ParameterOrigin.ofParameter("firstname")); + assertThat(parameterBinding.getName()).isEqualTo("firstname_2"); + assertThat(((MethodInvocationArgument) parameterBinding.getOrigin()).identifier().getName()).isEqualTo("firstname"); + } + + @Test // GH-3784 + void rewritesExpressionsLikeToUniqueParametersRetainingCountQuery() { + + DeclaredQuery query = new StringQuery( + "select u from User u where u.firstname like %:#{firstname} or u.firstname like :#{firstname}%", false) + .deriveCountQuery(null); + + assertThat(query.getQueryString()) // + .isEqualTo( + "select count(u) from User u where u.firstname like :__$synthetic$__1 or u.firstname like :__$synthetic$__2"); + + List bindings = query.getParameterBindings(); + assertThat(bindings).hasSize(2); + + LikeParameterBinding binding = (LikeParameterBinding) bindings.get(0); + assertThat(binding).isNotNull(); + assertThat(binding.getOrigin()).isEqualTo(ParameterOrigin.ofExpression("firstname")); + assertThat(binding.getName()).isEqualTo("__$synthetic$__1"); + assertThat(binding.getType()).isEqualTo(Type.ENDING_WITH); + + binding = (LikeParameterBinding) bindings.get(1); + assertThat(binding).isNotNull(); + assertThat(binding.getOrigin()).isEqualTo(ParameterOrigin.ofExpression("firstname")); + assertThat(binding.getName()).isEqualTo("__$synthetic$__2"); + assertThat(binding.getType()).isEqualTo(Type.STARTING_WITH); + } + @Test // GH-3041 void rewritesPositionalLikeToUniqueParametersIfNecessary() { @@ -263,6 +323,48 @@ void detectsMultipleNamedInParameterBindings() { assertNamedBinding(ParameterBinding.class, "bar", bindings.get(2)); } + @Test // GH-3784 + void deriveCountQueryWithNamedInRetainsOrigin() { + + String queryString = "select u from User u where (:logins) IS NULL OR LOWER(u.login) IN (:logins)"; + DeclaredQuery query = new StringQuery(queryString, false).deriveCountQuery(null); + + assertThat(query.getQueryString()) + .isEqualTo("select count(u) from User u where (:logins) IS NULL OR LOWER(u.login) IN (:logins_1)"); + + List bindings = query.getParameterBindings(); + assertThat(bindings).hasSize(2); + + assertNamedBinding(ParameterBinding.class, "logins", bindings.get(0)); + assertThat((MethodInvocationArgument) bindings.get(0).getOrigin()).extracting(MethodInvocationArgument::identifier) + .extracting(BindingIdentifier::getName).isEqualTo("logins"); + + assertNamedBinding(InParameterBinding.class, "logins_1", bindings.get(1)); + assertThat((MethodInvocationArgument) bindings.get(1).getOrigin()).extracting(MethodInvocationArgument::identifier) + .extracting(BindingIdentifier::getName).isEqualTo("logins"); + } + + @Test // GH-3784 + void deriveCountQueryWithPositionalInRetainsOrigin() { + + String queryString = "select u from User u where (?1) IS NULL OR LOWER(u.login) IN (?1)"; + DeclaredQuery query = new StringQuery(queryString, false).deriveCountQuery(null); + + assertThat(query.getQueryString()) + .isEqualTo("select count(u) from User u where (?1) IS NULL OR LOWER(u.login) IN (?2)"); + + List bindings = query.getParameterBindings(); + assertThat(bindings).hasSize(2); + + assertPositionalBinding(ParameterBinding.class, 1, bindings.get(0)); + assertThat((MethodInvocationArgument) bindings.get(0).getOrigin()).extracting(MethodInvocationArgument::identifier) + .extracting(BindingIdentifier::getPosition).isEqualTo(1); + + assertPositionalBinding(InParameterBinding.class, 2, bindings.get(1)); + assertThat((MethodInvocationArgument) bindings.get(1).getOrigin()).extracting(MethodInvocationArgument::identifier) + .extracting(BindingIdentifier::getPosition).isEqualTo(1); + } + @Test // DATAJPA-461 void detectsPositionalInParameterBindings() { From 72a347f3abe14681b96a742361f4e05733f0f9bd Mon Sep 17 00:00:00 2001 From: Mark Paluch Date: Mon, 3 Mar 2025 11:55:55 +0100 Subject: [PATCH 127/157] Refine entity state detection wording using primitive versions. Closes #3798 --- src/main/antora/modules/ROOT/pages/jpa/entity-persistence.adoc | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main/antora/modules/ROOT/pages/jpa/entity-persistence.adoc b/src/main/antora/modules/ROOT/pages/jpa/entity-persistence.adoc index 0c8392585e..c5f8cb8de5 100644 --- a/src/main/antora/modules/ROOT/pages/jpa/entity-persistence.adoc +++ b/src/main/antora/modules/ROOT/pages/jpa/entity-persistence.adoc @@ -18,6 +18,7 @@ Spring Data JPA offers the following strategies to detect whether an entity is n Without such a Version-property Spring Data JPA inspects the identifier property of the given entity. If the identifier property is `null`, then the entity is assumed to be new. Otherwise, it is assumed to be not new. +In contrast to other Spring Data modules, JPA considers `0` (zero) as the first inserted version of an entity and therefore, a primitive version property cannot be used to determine whether an entity is new or not. 2. Implementing `Persistable`: If an entity implements `Persistable`, Spring Data JPA delegates the new detection to the `isNew(…)` method of the entity. See the link:$$https://docs.spring.io/spring-data/data-commons/docs/current/api/index.html?org/springframework/data/domain/Persistable.html$$[JavaDoc] for details. 3. Implementing `EntityInformation`: You can customize the `EntityInformation` abstraction used in the `SimpleJpaRepository` implementation by creating a subclass of `JpaRepositoryFactory` and overriding the `getEntityInformation(…)` method accordingly. You then have to register the custom implementation of `JpaRepositoryFactory` as a Spring bean. Note that this should be rarely necessary. See the javadoc:org.springframework.data.jpa.repository.support.JpaRepositoryFactory[JavaDoc] for details. From 0a1048592caeb76d4fd1d6fc46f49781c6ac72ac Mon Sep 17 00:00:00 2001 From: Mark Paluch Date: Fri, 14 Mar 2025 07:35:41 +0100 Subject: [PATCH 128/157] Prepare 3.3.10 (2024.0.10). See #3775 --- pom.xml | 20 ++++---------------- 1 file changed, 4 insertions(+), 16 deletions(-) diff --git a/pom.xml b/pom.xml index 719bd279e7..db3645aaba 100755 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ org.springframework.data.build spring-data-parent - 3.3.10-SNAPSHOT + 3.3.10 @@ -42,7 +42,7 @@ 4.9 9.1.0 42.7.4 - 3.3.10-SNAPSHOT + 3.3.10 0.10.3 org.hibernate @@ -170,20 +170,8 @@ - - spring-snapshot - https://repo.spring.io/snapshot - - true - - - false - - - - spring-milestone - https://repo.spring.io/milestone - + + From 996f2fad181cd5d49142594380d0e133965def59 Mon Sep 17 00:00:00 2001 From: Mark Paluch Date: Fri, 14 Mar 2025 07:35:59 +0100 Subject: [PATCH 129/157] Release version 3.3.10 (2024.0.10). See #3775 --- pom.xml | 2 +- spring-data-envers/pom.xml | 4 ++-- spring-data-jpa-distribution/pom.xml | 2 +- spring-data-jpa/pom.xml | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/pom.xml b/pom.xml index db3645aaba..6f0c26cde2 100755 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ org.springframework.data spring-data-jpa-parent - 3.3.10-SNAPSHOT + 3.3.10 pom Spring Data JPA Parent diff --git a/spring-data-envers/pom.xml b/spring-data-envers/pom.xml index ffe1040fd4..2cae3ae939 100755 --- a/spring-data-envers/pom.xml +++ b/spring-data-envers/pom.xml @@ -5,12 +5,12 @@ org.springframework.data spring-data-envers - 3.3.10-SNAPSHOT + 3.3.10 org.springframework.data spring-data-jpa-parent - 3.3.10-SNAPSHOT + 3.3.10 ../pom.xml diff --git a/spring-data-jpa-distribution/pom.xml b/spring-data-jpa-distribution/pom.xml index 7e3a48e9c2..bf07033f9c 100644 --- a/spring-data-jpa-distribution/pom.xml +++ b/spring-data-jpa-distribution/pom.xml @@ -14,7 +14,7 @@ org.springframework.data spring-data-jpa-parent - 3.3.10-SNAPSHOT + 3.3.10 ../pom.xml diff --git a/spring-data-jpa/pom.xml b/spring-data-jpa/pom.xml index bc982ad22b..c00ea57de6 100644 --- a/spring-data-jpa/pom.xml +++ b/spring-data-jpa/pom.xml @@ -7,7 +7,7 @@ org.springframework.data spring-data-jpa - 3.3.10-SNAPSHOT + 3.3.10 Spring Data JPA Spring Data module for JPA repositories. @@ -16,7 +16,7 @@ org.springframework.data spring-data-jpa-parent - 3.3.10-SNAPSHOT + 3.3.10 ../pom.xml From f19ca78691e8e589c4cbb90002118380a78da519 Mon Sep 17 00:00:00 2001 From: Mark Paluch Date: Fri, 14 Mar 2025 07:38:27 +0100 Subject: [PATCH 130/157] Prepare next development iteration. See #3775 --- pom.xml | 2 +- spring-data-envers/pom.xml | 4 ++-- spring-data-jpa-distribution/pom.xml | 2 +- spring-data-jpa/pom.xml | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/pom.xml b/pom.xml index 6f0c26cde2..c2facc60e8 100755 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ org.springframework.data spring-data-jpa-parent - 3.3.10 + 3.3.11-SNAPSHOT pom Spring Data JPA Parent diff --git a/spring-data-envers/pom.xml b/spring-data-envers/pom.xml index 2cae3ae939..4ec825c144 100755 --- a/spring-data-envers/pom.xml +++ b/spring-data-envers/pom.xml @@ -5,12 +5,12 @@ org.springframework.data spring-data-envers - 3.3.10 + 3.3.11-SNAPSHOT org.springframework.data spring-data-jpa-parent - 3.3.10 + 3.3.11-SNAPSHOT ../pom.xml diff --git a/spring-data-jpa-distribution/pom.xml b/spring-data-jpa-distribution/pom.xml index bf07033f9c..3feb1f35d8 100644 --- a/spring-data-jpa-distribution/pom.xml +++ b/spring-data-jpa-distribution/pom.xml @@ -14,7 +14,7 @@ org.springframework.data spring-data-jpa-parent - 3.3.10 + 3.3.11-SNAPSHOT ../pom.xml diff --git a/spring-data-jpa/pom.xml b/spring-data-jpa/pom.xml index c00ea57de6..c0b0a4e66f 100644 --- a/spring-data-jpa/pom.xml +++ b/spring-data-jpa/pom.xml @@ -7,7 +7,7 @@ org.springframework.data spring-data-jpa - 3.3.10 + 3.3.11-SNAPSHOT Spring Data JPA Spring Data module for JPA repositories. @@ -16,7 +16,7 @@ org.springframework.data spring-data-jpa-parent - 3.3.10 + 3.3.11-SNAPSHOT ../pom.xml From 1c06df8bbfaf4cc8abff8a3d7d58801ae880030b Mon Sep 17 00:00:00 2001 From: Mark Paluch Date: Fri, 14 Mar 2025 07:38:28 +0100 Subject: [PATCH 131/157] After release cleanups. See #3775 --- pom.xml | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/pom.xml b/pom.xml index c2facc60e8..2139687f76 100755 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ org.springframework.data.build spring-data-parent - 3.3.10 + 3.3.11-SNAPSHOT @@ -42,7 +42,7 @@ 4.9 9.1.0 42.7.4 - 3.3.10 + 3.3.11-SNAPSHOT 0.10.3 org.hibernate @@ -170,8 +170,20 @@ - - + + spring-snapshot + https://repo.spring.io/snapshot + + true + + + false + + + + spring-milestone + https://repo.spring.io/milestone + From 2ff51be3a124478a97bbbfe9c889aa411f66e7cc Mon Sep 17 00:00:00 2001 From: Mark Paluch Date: Tue, 8 Apr 2025 16:29:10 +0200 Subject: [PATCH 132/157] Support reserved word usage in EQL state field, single and collection-valued fields. Closes #3829 --- .../data/jpa/repository/query/Eql.g4 | 4 ++++ .../jpa/repository/query/EqlQueryRenderer.java | 16 ++++++++++++++++ .../jpa/repository/query/EqlComplianceTests.java | 4 ++++ 3 files changed, 24 insertions(+) diff --git a/spring-data-jpa/src/main/antlr4/org/springframework/data/jpa/repository/query/Eql.g4 b/spring-data-jpa/src/main/antlr4/org/springframework/data/jpa/repository/query/Eql.g4 index 3ed025efb5..f0ddbb90c3 100644 --- a/spring-data-jpa/src/main/antlr4/org/springframework/data/jpa/repository/query/Eql.g4 +++ b/spring-data-jpa/src/main/antlr4/org/springframework/data/jpa/repository/query/Eql.g4 @@ -705,18 +705,22 @@ subtype collection_valued_field : identification_variable + | reserved_word ; single_valued_object_field : identification_variable + | reserved_word ; state_field : identification_variable + | reserved_word ; collection_value_field : identification_variable + | reserved_word ; entity_name diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/EqlQueryRenderer.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/EqlQueryRenderer.java index 1412a0103b..5ab4f893db 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/EqlQueryRenderer.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/EqlQueryRenderer.java @@ -2469,21 +2469,37 @@ public List visitSubtype(EqlParser.SubtypeContext ctx) { @Override public List visitCollection_valued_field(EqlParser.Collection_valued_fieldContext ctx) { + + if (ctx.reserved_word() != null) { + return visit(ctx.reserved_word()); + } return visit(ctx.identification_variable()); } @Override public List visitSingle_valued_object_field(EqlParser.Single_valued_object_fieldContext ctx) { + + if (ctx.reserved_word() != null) { + return visit(ctx.reserved_word()); + } return visit(ctx.identification_variable()); } @Override public List visitState_field(EqlParser.State_fieldContext ctx) { + + if (ctx.reserved_word() != null) { + return visit(ctx.reserved_word()); + } return visit(ctx.identification_variable()); } @Override public List visitCollection_value_field(EqlParser.Collection_value_fieldContext ctx) { + + if (ctx.reserved_word() != null) { + return visit(ctx.reserved_word()); + } return visit(ctx.identification_variable()); } diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/EqlComplianceTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/EqlComplianceTests.java index 5ce1211785..1a3d205b82 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/EqlComplianceTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/EqlComplianceTests.java @@ -78,6 +78,7 @@ void selectClause() { assertQuery("SELECT COUNT(e) FROM Employee e"); assertQuery("SELECT MAX(e.salary) FROM Employee e"); + assertQuery("select sum(i.size.foo.bar.new) from Item i"); assertQuery("SELECT NEW com.acme.reports.EmpReport(e.firstName, e.lastName, e.salary) FROM Employee e"); } @@ -348,8 +349,11 @@ void specialOperators() { assertQuery("SELECT toDo FROM Employee e JOIN e.toDoList toDo WHERE INDEX(toDo) = 1"); assertQuery("SELECT p FROM Employee e JOIN e.priorities p WHERE KEY(p) = 'high'"); assertQuery("SELECT e FROM Employee e WHERE SIZE(e.managedEmployees) < 2"); + assertQuery("SELECT e FROM Employee e WHERE SIZE(e.managedEmployees.new) < 2"); assertQuery("SELECT e FROM Employee e WHERE e.managedEmployees IS EMPTY"); + assertQuery("SELECT e FROM Employee e WHERE e.managedEmployee.size.new IS EMPTY"); assertQuery("SELECT e FROM Employee e WHERE 'write code' MEMBER OF e.responsibilities"); + assertQuery("SELECT e FROM Employee e WHERE 'write code' MEMBER OF e.responsibilities.size"); assertQuery("SELECT p FROM Project p WHERE TYPE(p) = LargeProject"); /** From e101ce44404486b8ca67f3723a2fd998bb0913d0 Mon Sep 17 00:00:00 2001 From: Mark Paluch Date: Wed, 9 Apr 2025 09:03:06 +0200 Subject: [PATCH 133/157] Extend reserved word usage also to JPQL parser. Closes #3832 --- .../data/jpa/repository/query/Jpql.g4 | 4 ++++ .../repository/query/JpqlQueryRenderer.java | 19 +++++++++++++++++-- .../query/EqlQueryRendererTests.java | 9 +++++++++ .../query/HqlQueryRendererTests.java | 9 +++++++++ .../query/JpqlQueryRendererTests.java | 9 +++++++++ 5 files changed, 48 insertions(+), 2 deletions(-) diff --git a/spring-data-jpa/src/main/antlr4/org/springframework/data/jpa/repository/query/Jpql.g4 b/spring-data-jpa/src/main/antlr4/org/springframework/data/jpa/repository/query/Jpql.g4 index a7f319b793..c9e392a970 100644 --- a/spring-data-jpa/src/main/antlr4/org/springframework/data/jpa/repository/query/Jpql.g4 +++ b/spring-data-jpa/src/main/antlr4/org/springframework/data/jpa/repository/query/Jpql.g4 @@ -681,18 +681,22 @@ subtype collection_valued_field : identification_variable + | reserved_word ; single_valued_object_field : identification_variable + | reserved_word ; state_field : identification_variable + | reserved_word ; collection_value_field : identification_variable + | reserved_word ; entity_name diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/JpqlQueryRenderer.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/JpqlQueryRenderer.java index 3320c390d1..fceaae7973 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/JpqlQueryRenderer.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/JpqlQueryRenderer.java @@ -2164,7 +2164,7 @@ public List visitLiteral(JpqlParser.LiteralContext ctx) { tokens.add(new JpaQueryParsingToken(ctx.INTLITERAL())); } else if (ctx.FLOATLITERAL() != null) { tokens.add(new JpaQueryParsingToken(ctx.FLOATLITERAL())); - } else if(ctx.LONGLITERAL() != null) { + } else if (ctx.LONGLITERAL() != null) { tokens.add(new JpaQueryParsingToken(ctx.LONGLITERAL())); } else if (ctx.boolean_literal() != null) { tokens.addAll(visit(ctx.boolean_literal())); @@ -2226,7 +2226,7 @@ public List visitNumeric_literal(JpqlParser.Numeric_litera return List.of(new JpaQueryParsingToken(ctx.INTLITERAL())); } else if (ctx.FLOATLITERAL() != null) { return List.of(new JpaQueryParsingToken(ctx.FLOATLITERAL())); - } else if(ctx.LONGLITERAL() != null) { + } else if (ctx.LONGLITERAL() != null) { return List.of(new JpaQueryParsingToken(ctx.LONGLITERAL())); } else { return List.of(); @@ -2275,21 +2275,36 @@ public List visitSubtype(JpqlParser.SubtypeContext ctx) { @Override public List visitCollection_valued_field(JpqlParser.Collection_valued_fieldContext ctx) { + if (ctx.reserved_word() != null) { + return visit(ctx.reserved_word()); + } return visit(ctx.identification_variable()); } @Override public List visitSingle_valued_object_field(JpqlParser.Single_valued_object_fieldContext ctx) { + + if (ctx.reserved_word() != null) { + return visit(ctx.reserved_word()); + } return visit(ctx.identification_variable()); } @Override public List visitState_field(JpqlParser.State_fieldContext ctx) { + + if (ctx.reserved_word() != null) { + return visit(ctx.reserved_word()); + } return visit(ctx.identification_variable()); } @Override public List visitCollection_value_field(JpqlParser.Collection_value_fieldContext ctx) { + + if (ctx.reserved_word() != null) { + return visit(ctx.reserved_word()); + } return visit(ctx.identification_variable()); } diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/EqlQueryRendererTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/EqlQueryRendererTests.java index 4267925d5b..d0e6f125d5 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/EqlQueryRendererTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/EqlQueryRendererTests.java @@ -1031,4 +1031,13 @@ void lateralShouldBeAValidParameter() { assertQuery("select e from Employee e where e.lateral = :_lateral"); assertQuery("select te from TestEntity te where te.lateral = :lateral"); } + + @Test + void reservedWordsShouldWork() { + + assertQuery("select ie from ItemExample ie left join ie.object io where io.externalId = :externalId"); + assertQuery("select ie.object from ItemExample ie left join ie.object io where io.externalId = :externalId"); + assertQuery("select ie from ItemExample ie left join ie.object io where io.object = :externalId"); + assertQuery("select ie from ItemExample ie where ie.status = com.app.domain.object.Status.UP"); + } } diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/HqlQueryRendererTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/HqlQueryRendererTests.java index 72ce32c5b5..5b97963f6a 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/HqlQueryRendererTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/HqlQueryRendererTests.java @@ -1674,4 +1674,13 @@ void entityNameWithPackageContainingReservedWord(String reservedWord) { String source = "select new com.company.%s.thing.stuff.ClassName(e.id) from Experience e".formatted(reservedWord); assertQuery(source); } + + @Test + void reservedWordsShouldWork() { + + assertQuery("select ie from ItemExample ie left join ie.object io where io.externalId = :externalId"); + assertQuery("select ie.object from ItemExample ie left join ie.object io where io.externalId = :externalId"); + assertQuery("select ie from ItemExample ie left join ie.object io where io.object = :externalId"); + assertQuery("select ie from ItemExample ie where ie.status = com.app.domain.object.Status.UP"); + } } diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/JpqlQueryRendererTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/JpqlQueryRendererTests.java index 18a46691e2..5241bc2808 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/JpqlQueryRendererTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/JpqlQueryRendererTests.java @@ -1033,4 +1033,13 @@ void entityNameWithPackageContainingReservedWord(String reservedWord) { assertQuery(source); } + @Test + void reservedWordsShouldWork() { + + assertQuery("select ie from ItemExample ie left join ie.object io where io.externalId = :externalId"); + assertQuery("select ie.object from ItemExample ie left join ie.object io where io.externalId = :externalId"); + assertQuery("select ie from ItemExample ie left join ie.object io where io.object = :externalId"); + assertQuery("select ie from ItemExample ie where ie.status = com.app.domain.object.Status.UP"); + } + } From ac4c6e6b9cc6b235013587342cf8a62436c85559 Mon Sep 17 00:00:00 2001 From: Mark Paluch Date: Wed, 9 Apr 2025 15:30:19 +0200 Subject: [PATCH 134/157] Accept functions and paths with reserved words (string expressions) in EQL IN expressions. Closes #3834 --- .../org/springframework/data/jpa/repository/query/Eql.g4 | 2 +- .../org/springframework/data/jpa/repository/query/Jpql.g4 | 2 +- .../data/jpa/repository/query/EqlQueryRenderer.java | 4 ++-- .../data/jpa/repository/query/JpqlQueryRenderer.java | 4 ++-- .../data/jpa/repository/query/EqlQueryRendererTests.java | 5 ++++- .../data/jpa/repository/query/JpqlQueryRendererTests.java | 3 ++- 6 files changed, 12 insertions(+), 8 deletions(-) diff --git a/spring-data-jpa/src/main/antlr4/org/springframework/data/jpa/repository/query/Eql.g4 b/spring-data-jpa/src/main/antlr4/org/springframework/data/jpa/repository/query/Eql.g4 index f0ddbb90c3..c05013bb52 100644 --- a/spring-data-jpa/src/main/antlr4/org/springframework/data/jpa/repository/query/Eql.g4 +++ b/spring-data-jpa/src/main/antlr4/org/springframework/data/jpa/repository/query/Eql.g4 @@ -349,7 +349,7 @@ between_expression ; in_expression - : (state_valued_path_expression | type_discriminator) (NOT)? IN (('(' in_item (',' in_item)* ')') | ( '(' subquery ')') | collection_valued_input_parameter) + : (string_expression | type_discriminator) (NOT)? IN (('(' in_item (',' in_item)* ')') | ( '(' subquery ')') | collection_valued_input_parameter) ; in_item diff --git a/spring-data-jpa/src/main/antlr4/org/springframework/data/jpa/repository/query/Jpql.g4 b/spring-data-jpa/src/main/antlr4/org/springframework/data/jpa/repository/query/Jpql.g4 index c9e392a970..83bb506bc5 100644 --- a/spring-data-jpa/src/main/antlr4/org/springframework/data/jpa/repository/query/Jpql.g4 +++ b/spring-data-jpa/src/main/antlr4/org/springframework/data/jpa/repository/query/Jpql.g4 @@ -333,7 +333,7 @@ between_expression ; in_expression - : (state_valued_path_expression | type_discriminator) (NOT)? IN (('(' in_item (',' in_item)* ')') | ( '(' subquery ')') | collection_valued_input_parameter) + : (string_expression | type_discriminator) (NOT)? IN (('(' in_item (',' in_item)* ')') | ( '(' subquery ')') | collection_valued_input_parameter) ; in_item diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/EqlQueryRenderer.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/EqlQueryRenderer.java index 5ab4f893db..0561b04a87 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/EqlQueryRenderer.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/EqlQueryRenderer.java @@ -1228,8 +1228,8 @@ public List visitIn_expression(EqlParser.In_expressionCont List tokens = new ArrayList<>(); - if (ctx.state_valued_path_expression() != null) { - tokens.addAll(visit(ctx.state_valued_path_expression())); + if (ctx.string_expression() != null) { + tokens.addAll(visit(ctx.string_expression())); } if (ctx.type_discriminator() != null) { tokens.addAll(visit(ctx.type_discriminator())); diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/JpqlQueryRenderer.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/JpqlQueryRenderer.java index fceaae7973..4dab0ffb59 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/JpqlQueryRenderer.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/JpqlQueryRenderer.java @@ -1149,8 +1149,8 @@ public List visitIn_expression(JpqlParser.In_expressionCon List tokens = new ArrayList<>(); - if (ctx.state_valued_path_expression() != null) { - tokens.addAll(visit(ctx.state_valued_path_expression())); + if (ctx.string_expression() != null) { + tokens.addAll(visit(ctx.string_expression())); } if (ctx.type_discriminator() != null) { tokens.addAll(visit(ctx.type_discriminator())); diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/EqlQueryRendererTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/EqlQueryRendererTests.java index d0e6f125d5..81375d82ad 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/EqlQueryRendererTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/EqlQueryRendererTests.java @@ -37,6 +37,7 @@ * * @author Greg Turnquist * @author Christoph Strobl + * @author Mark Paluch */ class EqlQueryRendererTests { @@ -1032,12 +1033,14 @@ void lateralShouldBeAValidParameter() { assertQuery("select te from TestEntity te where te.lateral = :lateral"); } - @Test + @Test // GH-3834 void reservedWordsShouldWork() { assertQuery("select ie from ItemExample ie left join ie.object io where io.externalId = :externalId"); assertQuery("select ie.object from ItemExample ie left join ie.object io where io.externalId = :externalId"); assertQuery("select ie from ItemExample ie left join ie.object io where io.object = :externalId"); assertQuery("select ie from ItemExample ie where ie.status = com.app.domain.object.Status.UP"); + assertQuery("select f from FooEntity f where upper(f.name) IN :names"); + assertQuery("select f from FooEntity f where f.size IN :sizes"); } } diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/JpqlQueryRendererTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/JpqlQueryRendererTests.java index 5241bc2808..297c5a3cc4 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/JpqlQueryRendererTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/JpqlQueryRendererTests.java @@ -37,6 +37,7 @@ * * @author Greg Turnquist * @author Christoph Strobl + * @author Mark Paluch * @since 3.1 */ class JpqlQueryRendererTests { @@ -1033,7 +1034,7 @@ void entityNameWithPackageContainingReservedWord(String reservedWord) { assertQuery(source); } - @Test + @Test // GH-3834 void reservedWordsShouldWork() { assertQuery("select ie from ItemExample ie left join ie.object io where io.externalId = :externalId"); From 3d39d6e811f123ca69100cb014b4dd968570cafb Mon Sep 17 00:00:00 2001 From: Mark Paluch Date: Mon, 14 Apr 2025 08:50:46 +0200 Subject: [PATCH 135/157] Fix parsing of EQL/JPQL using string literals and enums in IN items. Closes #3835 --- .../data/jpa/repository/query/Eql.g4 | 5 +++++ .../data/jpa/repository/query/Jpql.g4 | 5 +++++ .../jpa/repository/query/EqlQueryRenderer.java | 18 +++++++++++++----- .../repository/query/JpqlQueryRenderer.java | 17 +++++++++++++---- .../query/EqlQueryRendererTests.java | 12 ++++++++++++ .../query/JpqlQueryRendererTests.java | 12 ++++++++++++ 6 files changed, 60 insertions(+), 9 deletions(-) diff --git a/spring-data-jpa/src/main/antlr4/org/springframework/data/jpa/repository/query/Eql.g4 b/spring-data-jpa/src/main/antlr4/org/springframework/data/jpa/repository/query/Eql.g4 index c05013bb52..272d679c54 100644 --- a/spring-data-jpa/src/main/antlr4/org/springframework/data/jpa/repository/query/Eql.g4 +++ b/spring-data-jpa/src/main/antlr4/org/springframework/data/jpa/repository/query/Eql.g4 @@ -354,7 +354,12 @@ in_expression in_item : literal + | string_expression + | boolean_literal + | numeric_literal + | date_time_timestamp_literal | single_valued_input_parameter + | conditional_expression ; like_expression diff --git a/spring-data-jpa/src/main/antlr4/org/springframework/data/jpa/repository/query/Jpql.g4 b/spring-data-jpa/src/main/antlr4/org/springframework/data/jpa/repository/query/Jpql.g4 index 83bb506bc5..a1c69583fd 100644 --- a/spring-data-jpa/src/main/antlr4/org/springframework/data/jpa/repository/query/Jpql.g4 +++ b/spring-data-jpa/src/main/antlr4/org/springframework/data/jpa/repository/query/Jpql.g4 @@ -338,7 +338,12 @@ in_expression in_item : literal + | string_expression + | boolean_literal + | numeric_literal + | date_time_timestamp_literal | single_valued_input_parameter + | conditional_expression ; like_expression diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/EqlQueryRenderer.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/EqlQueryRenderer.java index 0561b04a87..5bd453a816 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/EqlQueryRenderer.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/EqlQueryRenderer.java @@ -1270,15 +1270,23 @@ public List visitIn_expression(EqlParser.In_expressionCont @Override public List visitIn_item(EqlParser.In_itemContext ctx) { - List tokens = new ArrayList<>(); - if (ctx.literal() != null) { - tokens.addAll(visit(ctx.literal())); + return visit(ctx.literal()); + } else if (ctx.string_expression() != null) { + return visit(ctx.string_expression()); + } else if (ctx.boolean_literal() != null) { + return visit(ctx.boolean_literal()); + } else if (ctx.numeric_literal() != null) { + return visit(ctx.numeric_literal()); + } else if (ctx.date_time_timestamp_literal() != null) { + return visit(ctx.date_time_timestamp_literal()); } else if (ctx.single_valued_input_parameter() != null) { - tokens.addAll(visit(ctx.single_valued_input_parameter())); + return visit(ctx.single_valued_input_parameter()); + } else if (ctx.conditional_expression() != null) { + return visit(ctx.conditional_expression()); } - return tokens; + return new ArrayList<>(); } @Override diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/JpqlQueryRenderer.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/JpqlQueryRenderer.java index 4dab0ffb59..58f549ace5 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/JpqlQueryRenderer.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/JpqlQueryRenderer.java @@ -1191,15 +1191,24 @@ public List visitIn_expression(JpqlParser.In_expressionCon @Override public List visitIn_item(JpqlParser.In_itemContext ctx) { - List tokens = new ArrayList<>(); if (ctx.literal() != null) { - tokens.addAll(visit(ctx.literal())); + return visit(ctx.literal()); + } else if (ctx.string_expression() != null) { + return visit(ctx.string_expression()); + } else if (ctx.boolean_literal() != null) { + return visit(ctx.boolean_literal()); + } else if (ctx.numeric_literal() != null) { + return visit(ctx.numeric_literal()); + } else if (ctx.date_time_timestamp_literal() != null) { + return visit(ctx.date_time_timestamp_literal()); } else if (ctx.single_valued_input_parameter() != null) { - tokens.addAll(visit(ctx.single_valued_input_parameter())); + return visit(ctx.single_valued_input_parameter()); + } else if (ctx.conditional_expression() != null) { + return visit(ctx.conditional_expression()); } - return tokens; + return new ArrayList<>(); } @Override diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/EqlQueryRendererTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/EqlQueryRendererTests.java index 81375d82ad..9da99a1f9d 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/EqlQueryRendererTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/EqlQueryRendererTests.java @@ -561,6 +561,18 @@ WHERE TYPE(e) IN :empTypes """); } + @Test + void inClauseWithFunctionAndLiterals() { + + assertQuery(""" + select f from FooEntity f where upper(f.name) IN ('Y', 'Basic', 'Remit') + """); + assertQuery( + """ + select count(f) from FooEntity f where f.status IN (com.example.eql_bug_check.entity.FooStatus.FOO, com.example.eql_bug_check.entity.FooStatus.BAR) + """); + } + @Test void notEqualsForTypeShouldWork() { diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/JpqlQueryRendererTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/JpqlQueryRendererTests.java index 297c5a3cc4..af1ee9b0b9 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/JpqlQueryRendererTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/JpqlQueryRendererTests.java @@ -562,6 +562,18 @@ WHERE TYPE(e) IN :empTypes """); } + @Test + void inClauseWithFunctionAndLiterals() { + + assertQuery(""" + select f from FooEntity f where upper(f.name) IN ('Y', 'Basic', 'Remit') + """); + assertQuery( + """ + select count(f) from FooEntity f where f.status IN (com.example.eql_bug_check.entity.FooStatus.FOO, com.example.eql_bug_check.entity.FooStatus.BAR) + """); + } + @Test void notEqualsForTypeShouldWork() { From fd914b7b5ce697539035e330f6afa48b0031afbb Mon Sep 17 00:00:00 2001 From: Mark Paluch Date: Mon, 14 Apr 2025 16:48:32 +0200 Subject: [PATCH 136/157] Allow HQL HAVING without enforcing GROUP BY. Closes #3840 --- .../springframework/data/jpa/repository/query/Hql.g4 | 4 ++-- .../jpa/repository/query/EqlQueryRendererTests.java | 8 ++++++++ .../jpa/repository/query/HqlQueryRendererTests.java | 12 ++++++++++++ .../jpa/repository/query/JpqlQueryRendererTests.java | 8 ++++++++ 4 files changed, 30 insertions(+), 2 deletions(-) diff --git a/spring-data-jpa/src/main/antlr4/org/springframework/data/jpa/repository/query/Hql.g4 b/spring-data-jpa/src/main/antlr4/org/springframework/data/jpa/repository/query/Hql.g4 index 54a93e9ebf..a7034d862f 100644 --- a/spring-data-jpa/src/main/antlr4/org/springframework/data/jpa/repository/query/Hql.g4 +++ b/spring-data-jpa/src/main/antlr4/org/springframework/data/jpa/repository/query/Hql.g4 @@ -87,8 +87,8 @@ orderedQuery ; query - : selectClause fromClause? whereClause? (groupByClause havingClause?)? # SelectQuery - | fromClause whereClause? (groupByClause havingClause?)? selectClause? # FromQuery + : selectClause fromClause? whereClause? groupByClause? havingClause? # SelectQuery + | fromClause whereClause? groupByClause? havingClause? selectClause? # FromQuery ; queryOrder diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/EqlQueryRendererTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/EqlQueryRendererTests.java index 9da99a1f9d..1483625251 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/EqlQueryRendererTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/EqlQueryRendererTests.java @@ -603,6 +603,14 @@ SELECT c.country, COUNT(c) GROUP BY c.country HAVING COUNT(c) > 30 """); + + assertQuery(""" + SELECT COUNT(f) + FROM FooEntity f + WHERE f.name IN ('Y', 'Basic', 'Remit') + AND f.size = 10 + HAVING COUNT(f) > 0 + """); } @Test diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/HqlQueryRendererTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/HqlQueryRendererTests.java index 5b97963f6a..47568fc19e 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/HqlQueryRendererTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/HqlQueryRendererTests.java @@ -622,6 +622,18 @@ HAVING COUNT(o) >= 5 """); } + @Test + void shouldRenderHavingWithFunction() { + + assertQuery(""" + SELECT COUNT(f) + FROM FooEntity f + WHERE f.name IN ('Y', 'Basic', 'Remit') + AND f.size = 10 + HAVING COUNT(f) > 0 + """); + } + @Test void theRest8() { diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/JpqlQueryRendererTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/JpqlQueryRendererTests.java index af1ee9b0b9..12d254eed0 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/JpqlQueryRendererTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/JpqlQueryRendererTests.java @@ -604,6 +604,14 @@ SELECT c.country, COUNT(c) GROUP BY c.country HAVING COUNT(c) > 30 """); + + assertQuery(""" + SELECT COUNT(f) + FROM FooEntity f + WHERE f.name IN ('Y', 'Basic', 'Remit') + AND f.size = 10 + HAVING COUNT(f) > 0 + """); } @Test From 5ee6a09fdae2db624317cbe3210ede7719bdb1f3 Mon Sep 17 00:00:00 2001 From: SC Date: Thu, 17 Apr 2025 00:00:49 +0900 Subject: [PATCH 137/157] Clarify transaction boundary recommendation. Closes #3842 Original pull request: #3843 --- src/main/antora/modules/ROOT/pages/jpa/transactions.adoc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/main/antora/modules/ROOT/pages/jpa/transactions.adoc b/src/main/antora/modules/ROOT/pages/jpa/transactions.adoc index abd25d4f5f..c5625296f1 100644 --- a/src/main/antora/modules/ROOT/pages/jpa/transactions.adoc +++ b/src/main/antora/modules/ROOT/pages/jpa/transactions.adoc @@ -89,3 +89,7 @@ Typically, you want the `readOnly` flag to be set to `true`, as most of the quer You can use transactions for read-only queries and mark them as such by setting the `readOnly` flag. Doing so does not, however, act as a check that you do not trigger a manipulating query (although some databases reject `INSERT` and `UPDATE` statements inside a read-only transaction). The `readOnly` flag is instead propagated as a hint to the underlying JDBC driver for performance optimizations. Furthermore, Spring performs some optimizations on the underlying JPA provider. For example, when used with Hibernate, the flush mode is set to `NEVER` when you configure a transaction as `readOnly`, which causes Hibernate to skip dirty checks (a noticeable improvement on large object trees). ==== +[NOTE] +==== +While this example shows `@Transactional` on the repository interface, we generally recommend defining transaction boundaries at the service layer to reflect business logic units and ensure consistency. +==== \ No newline at end of file From 6cd68b7be46775e2713c75d8aee66c46b7eba4cd Mon Sep 17 00:00:00 2001 From: Mark Paluch Date: Thu, 17 Apr 2025 15:22:05 +0200 Subject: [PATCH 138/157] Polishing. Tweak wording. See #3842 Original pull request: #3843 --- src/main/antora/modules/ROOT/pages/jpa/transactions.adoc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/antora/modules/ROOT/pages/jpa/transactions.adoc b/src/main/antora/modules/ROOT/pages/jpa/transactions.adoc index c5625296f1..c3ca330b30 100644 --- a/src/main/antora/modules/ROOT/pages/jpa/transactions.adoc +++ b/src/main/antora/modules/ROOT/pages/jpa/transactions.adoc @@ -91,5 +91,5 @@ You can use transactions for read-only queries and mark them as such by setting [NOTE] ==== -While this example shows `@Transactional` on the repository interface, we generally recommend defining transaction boundaries at the service layer to reflect business logic units and ensure consistency. -==== \ No newline at end of file +While examples discuss `@Transactional` usage on the repository, we generally recommend declaring transaction boundaries when starting a unit of work to ensure proper consistency and desired transaction participation. +==== From f5446452fdf895c7c3affd51f33b679e2beb39f7 Mon Sep 17 00:00:00 2001 From: Mark Paluch Date: Tue, 22 Apr 2025 09:58:20 +0200 Subject: [PATCH 139/157] Prepare 3.3.11 (2024.0.11). See #3779 --- pom.xml | 20 ++++---------------- 1 file changed, 4 insertions(+), 16 deletions(-) diff --git a/pom.xml b/pom.xml index 2139687f76..9ad77e8cd2 100755 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ org.springframework.data.build spring-data-parent - 3.3.11-SNAPSHOT + 3.3.11 @@ -42,7 +42,7 @@ 4.9 9.1.0 42.7.4 - 3.3.11-SNAPSHOT + 3.3.11 0.10.3 org.hibernate @@ -170,20 +170,8 @@ - - spring-snapshot - https://repo.spring.io/snapshot - - true - - - false - - - - spring-milestone - https://repo.spring.io/milestone - + + From e48c0c576aafbaa49dcafd2e92c6f7c7a33b9135 Mon Sep 17 00:00:00 2001 From: Mark Paluch Date: Tue, 22 Apr 2025 09:58:40 +0200 Subject: [PATCH 140/157] Release version 3.3.11 (2024.0.11). See #3779 --- pom.xml | 2 +- spring-data-envers/pom.xml | 4 ++-- spring-data-jpa-distribution/pom.xml | 2 +- spring-data-jpa/pom.xml | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/pom.xml b/pom.xml index 9ad77e8cd2..b7e97d77f6 100755 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ org.springframework.data spring-data-jpa-parent - 3.3.11-SNAPSHOT + 3.3.11 pom Spring Data JPA Parent diff --git a/spring-data-envers/pom.xml b/spring-data-envers/pom.xml index 4ec825c144..812632ffbb 100755 --- a/spring-data-envers/pom.xml +++ b/spring-data-envers/pom.xml @@ -5,12 +5,12 @@ org.springframework.data spring-data-envers - 3.3.11-SNAPSHOT + 3.3.11 org.springframework.data spring-data-jpa-parent - 3.3.11-SNAPSHOT + 3.3.11 ../pom.xml diff --git a/spring-data-jpa-distribution/pom.xml b/spring-data-jpa-distribution/pom.xml index 3feb1f35d8..d21d7d6f25 100644 --- a/spring-data-jpa-distribution/pom.xml +++ b/spring-data-jpa-distribution/pom.xml @@ -14,7 +14,7 @@ org.springframework.data spring-data-jpa-parent - 3.3.11-SNAPSHOT + 3.3.11 ../pom.xml diff --git a/spring-data-jpa/pom.xml b/spring-data-jpa/pom.xml index c0b0a4e66f..e1715b53a5 100644 --- a/spring-data-jpa/pom.xml +++ b/spring-data-jpa/pom.xml @@ -7,7 +7,7 @@ org.springframework.data spring-data-jpa - 3.3.11-SNAPSHOT + 3.3.11 Spring Data JPA Spring Data module for JPA repositories. @@ -16,7 +16,7 @@ org.springframework.data spring-data-jpa-parent - 3.3.11-SNAPSHOT + 3.3.11 ../pom.xml From 8dec731b8168051ea94b080661e670d11b2e5914 Mon Sep 17 00:00:00 2001 From: Mark Paluch Date: Tue, 22 Apr 2025 10:01:23 +0200 Subject: [PATCH 141/157] Prepare next development iteration. See #3779 --- pom.xml | 2 +- spring-data-envers/pom.xml | 4 ++-- spring-data-jpa-distribution/pom.xml | 2 +- spring-data-jpa/pom.xml | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/pom.xml b/pom.xml index b7e97d77f6..36a7bdf859 100755 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ org.springframework.data spring-data-jpa-parent - 3.3.11 + 3.3.12-SNAPSHOT pom Spring Data JPA Parent diff --git a/spring-data-envers/pom.xml b/spring-data-envers/pom.xml index 812632ffbb..e83bf47dbe 100755 --- a/spring-data-envers/pom.xml +++ b/spring-data-envers/pom.xml @@ -5,12 +5,12 @@ org.springframework.data spring-data-envers - 3.3.11 + 3.3.12-SNAPSHOT org.springframework.data spring-data-jpa-parent - 3.3.11 + 3.3.12-SNAPSHOT ../pom.xml diff --git a/spring-data-jpa-distribution/pom.xml b/spring-data-jpa-distribution/pom.xml index d21d7d6f25..30d33d4966 100644 --- a/spring-data-jpa-distribution/pom.xml +++ b/spring-data-jpa-distribution/pom.xml @@ -14,7 +14,7 @@ org.springframework.data spring-data-jpa-parent - 3.3.11 + 3.3.12-SNAPSHOT ../pom.xml diff --git a/spring-data-jpa/pom.xml b/spring-data-jpa/pom.xml index e1715b53a5..e59c4eb4d7 100644 --- a/spring-data-jpa/pom.xml +++ b/spring-data-jpa/pom.xml @@ -7,7 +7,7 @@ org.springframework.data spring-data-jpa - 3.3.11 + 3.3.12-SNAPSHOT Spring Data JPA Spring Data module for JPA repositories. @@ -16,7 +16,7 @@ org.springframework.data spring-data-jpa-parent - 3.3.11 + 3.3.12-SNAPSHOT ../pom.xml From 01befb19d36a5bc775c0d5f5dd76025dc5c9f137 Mon Sep 17 00:00:00 2001 From: Mark Paluch Date: Tue, 22 Apr 2025 10:01:25 +0200 Subject: [PATCH 142/157] After release cleanups. See #3779 --- pom.xml | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/pom.xml b/pom.xml index 36a7bdf859..21911d4e6b 100755 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ org.springframework.data.build spring-data-parent - 3.3.11 + 3.3.12-SNAPSHOT @@ -42,7 +42,7 @@ 4.9 9.1.0 42.7.4 - 3.3.11 + 3.3.12-SNAPSHOT 0.10.3 org.hibernate @@ -170,8 +170,20 @@ - - + + spring-snapshot + https://repo.spring.io/snapshot + + true + + + false + + + + spring-milestone + https://repo.spring.io/milestone + From 74071a60df085e60f9e16158064a2713ea5f0e3c Mon Sep 17 00:00:00 2001 From: SWQXDBA <983110853@qq.com> Date: Wed, 23 Apr 2025 20:03:17 +0800 Subject: [PATCH 143/157] Fix handling of `null` predicate in `Specification.not()`. When toPredicate() returns null, Specification.not() now returns builder.disjunction() instead of builder.not(null). This change ensures proper handling of null predicates in negated specifications. Closes #3849 Original pull request: #3856 Signed-off-by: SWQXDBA <983110853@qq.com> --- .../data/jpa/domain/Specification.java | 8 +++++++- .../data/jpa/domain/SpecificationUnitTests.java | 11 +++++++++++ 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/domain/Specification.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/domain/Specification.java index ea626af591..249da08157 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/domain/Specification.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/domain/Specification.java @@ -55,7 +55,13 @@ static Specification not(@Nullable Specification spec) { return spec == null // ? (root, query, builder) -> null // - : (root, query, builder) -> builder.not(spec.toPredicate(root, query, builder)); + : (root, query, builder) -> { + Predicate predicate = spec.toPredicate(root, query, builder); + if(predicate != null) { + return builder.not(predicate); + } + return builder.disjunction(); + }; } /** diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/SpecificationUnitTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/SpecificationUnitTests.java index 96f193b425..992ecdd51c 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/SpecificationUnitTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/SpecificationUnitTests.java @@ -214,6 +214,17 @@ void orCombinesSpecificationsInOrder() { verify(builder).or(firstPredicate, secondPredicate); } + @Test // #3849 + void notWithNullPredicate() { + Specification spec = (r, q, cb) -> null; + + Specification notSpec = Specification.not(spec); + + notSpec.toPredicate(root, query, builder); + + verify(builder).disjunction(); + } + static class SerializableSpecification implements Serializable, Specification { @Override From 83f70ffae6873ee899170145708a165c5cd429b2 Mon Sep 17 00:00:00 2001 From: Mark Paluch Date: Mon, 5 May 2025 14:13:17 +0200 Subject: [PATCH 144/157] Polishing. Reformat code. Refine tests. See #3849 Original pull request: #3856 --- .../data/jpa/domain/Specification.java | 6 ++---- .../data/jpa/domain/SpecificationUnitTests.java | 11 +++++------ 2 files changed, 7 insertions(+), 10 deletions(-) diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/domain/Specification.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/domain/Specification.java index 249da08157..78a6974a6b 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/domain/Specification.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/domain/Specification.java @@ -56,11 +56,9 @@ static Specification not(@Nullable Specification spec) { return spec == null // ? (root, query, builder) -> null // : (root, query, builder) -> { + Predicate predicate = spec.toPredicate(root, query, builder); - if(predicate != null) { - return builder.not(predicate); - } - return builder.disjunction(); + return predicate != null ? builder.not(predicate) : builder.disjunction(); }; } diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/SpecificationUnitTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/SpecificationUnitTests.java index 992ecdd51c..a888c238a6 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/SpecificationUnitTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/domain/SpecificationUnitTests.java @@ -206,7 +206,6 @@ void orCombinesSpecificationsInOrder() { Predicate secondPredicate = mock(Predicate.class); Specification first = ((root1, query1, criteriaBuilder) -> firstPredicate); - Specification second = ((root1, query1, criteriaBuilder) -> secondPredicate); first.or(second).toPredicate(root, query, builder); @@ -214,14 +213,14 @@ void orCombinesSpecificationsInOrder() { verify(builder).or(firstPredicate, secondPredicate); } - @Test // #3849 + @Test // GH-3849 void notWithNullPredicate() { - Specification spec = (r, q, cb) -> null; - Specification notSpec = Specification.not(spec); + when(builder.disjunction()).thenReturn(mock(Predicate.class)); + + Specification notSpec = Specification.not((r, q, cb) -> null); - notSpec.toPredicate(root, query, builder); - + assertThat(notSpec.toPredicate(root, query, builder)).isNotNull(); verify(builder).disjunction(); } From 24a20cc4b147ca9a68df9dc4fe44b17eabf83958 Mon Sep 17 00:00:00 2001 From: w3n9 Date: Wed, 30 Apr 2025 23:31:26 +0800 Subject: [PATCH 145/157] Makes manually assigned id example simpler to understand. The old version was still valid but a little confusing. Original pull request #3865 Signed-off-by: w3n9 Commit message changed by Jens Schauder --- src/main/antora/modules/ROOT/pages/jpa/entity-persistence.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/antora/modules/ROOT/pages/jpa/entity-persistence.adoc b/src/main/antora/modules/ROOT/pages/jpa/entity-persistence.adoc index c5f8cb8de5..990c959441 100644 --- a/src/main/antora/modules/ROOT/pages/jpa/entity-persistence.adoc +++ b/src/main/antora/modules/ROOT/pages/jpa/entity-persistence.adoc @@ -40,7 +40,7 @@ public abstract class AbstractEntity implements Persistable { return isNew; <2> } - @PrePersist <3> + @PostPersist <3> @PostLoad void markNotNew() { this.isNew = false; From 41431d83d7f848aa01ed7d4c4b9cc0cc7ae807d5 Mon Sep 17 00:00:00 2001 From: Mark Paluch Date: Fri, 9 May 2025 10:26:27 +0200 Subject: [PATCH 146/157] Use dynamic copyright years in documentation, adopt to feature flags. See #3853 --- src/main/antora/modules/ROOT/pages/index.adoc | 3 +-- .../modules/ROOT/pages/repositories/query-methods-details.adoc | 1 + src/main/antora/resources/antora-resources/antora.yml | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main/antora/modules/ROOT/pages/index.adoc b/src/main/antora/modules/ROOT/pages/index.adoc index 4f9d18adce..37753da700 100644 --- a/src/main/antora/modules/ROOT/pages/index.adoc +++ b/src/main/antora/modules/ROOT/pages/index.adoc @@ -2,7 +2,6 @@ = Spring Data JPA :revnumber: {version} :revdate: {localdate} -:feature-scroll: true _Spring Data JPA provides repository support for the Jakarta Persistence API (JPA). It eases development of applications with a consistent programming model that need to access JPA data sources._ @@ -15,7 +14,7 @@ Upgrade Notes, Supported Versions, additional cross-version information. Oliver Gierke, Thomas Darimont, Christoph Strobl, Mark Paluch, Jay Bryant, Greg Turnquist -(C) 2008-2025 VMware, Inc. +(C) 2008-{copyright-year} VMware, Inc. Copies of this document may be made for your own use and for distribution to others, provided that you do not charge any fee for such copies and further provided that each copy contains this Copyright Notice, whether distributed in print or electronically. diff --git a/src/main/antora/modules/ROOT/pages/repositories/query-methods-details.adoc b/src/main/antora/modules/ROOT/pages/repositories/query-methods-details.adoc index dfe4814955..614da0b059 100644 --- a/src/main/antora/modules/ROOT/pages/repositories/query-methods-details.adoc +++ b/src/main/antora/modules/ROOT/pages/repositories/query-methods-details.adoc @@ -1 +1,2 @@ +:feature-scroll: include::{commons}@data-commons::page$repositories/query-methods-details.adoc[] diff --git a/src/main/antora/resources/antora-resources/antora.yml b/src/main/antora/resources/antora-resources/antora.yml index ed14d8c6d8..eedc4999e3 100644 --- a/src/main/antora/resources/antora-resources/antora.yml +++ b/src/main/antora/resources/antora-resources/antora.yml @@ -4,6 +4,7 @@ prerelease: ${antora-component.prerelease} asciidoc: attributes: version: ${project.version} + copyright-year: ${current.year} springversionshort: ${spring.short} springversion: ${spring} attribute-missing: 'warn' From 0d5fd5a0ba03fb09300f2a8b292f25883cc25a7a Mon Sep 17 00:00:00 2001 From: Mark Paluch Date: Mon, 12 May 2025 08:59:48 +0200 Subject: [PATCH 147/157] Update CI Properties. See #3851 --- .mvn/jvm.config | 4 ++++ ci/pipeline.properties | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.mvn/jvm.config b/.mvn/jvm.config index 32599cefea..e27f6e8f5e 100644 --- a/.mvn/jvm.config +++ b/.mvn/jvm.config @@ -8,3 +8,7 @@ --add-exports jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED --add-opens jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED --add-opens jdk.compiler/com.sun.tools.javac.comp=ALL-UNNAMED +--add-opens=java.base/java.util=ALL-UNNAMED +--add-opens=java.base/java.lang.reflect=ALL-UNNAMED +--add-opens=java.base/java.text=ALL-UNNAMED +--add-opens=java.desktop/java.awt.font=ALL-UNNAMED diff --git a/ci/pipeline.properties b/ci/pipeline.properties index 6dff72206e..81d1e2904b 100644 --- a/ci/pipeline.properties +++ b/ci/pipeline.properties @@ -1,5 +1,5 @@ # Java versions -java.main.tag=17.0.13_11-jdk-focal +java.main.tag=17.0.15_6-jdk-focal java.next.tag=22.0.2_9-jdk-jammy # Docker container images - standard From 8e95f2e5bed90fe8be31dba55aac08075c6caaaa Mon Sep 17 00:00:00 2001 From: Mark Paluch Date: Mon, 12 May 2025 09:54:51 +0200 Subject: [PATCH 148/157] Fix EQL and JPQL LIKE with ESCAPE clause parsing. Closes #3873 --- .../springframework/data/jpa/repository/query/Eql.g4 | 3 ++- .../springframework/data/jpa/repository/query/Jpql.g4 | 5 +++-- .../data/jpa/repository/query/EqlQueryRenderer.java | 11 ++++++++++- .../data/jpa/repository/query/JpqlQueryRenderer.java | 11 ++++++++++- .../jpa/repository/query/EqlQueryRendererTests.java | 8 ++++++++ .../jpa/repository/query/HqlQueryRendererTests.java | 3 +++ .../jpa/repository/query/JpqlQueryRendererTests.java | 8 ++++++++ 7 files changed, 44 insertions(+), 5 deletions(-) diff --git a/spring-data-jpa/src/main/antlr4/org/springframework/data/jpa/repository/query/Eql.g4 b/spring-data-jpa/src/main/antlr4/org/springframework/data/jpa/repository/query/Eql.g4 index 272d679c54..f321eaaf4f 100644 --- a/spring-data-jpa/src/main/antlr4/org/springframework/data/jpa/repository/query/Eql.g4 +++ b/spring-data-jpa/src/main/antlr4/org/springframework/data/jpa/repository/query/Eql.g4 @@ -677,7 +677,8 @@ entity_type_literal escape_character : CHARACTER - | character_valued_input_parameter // + | string_literal + | character_valued_input_parameter ; numeric_literal diff --git a/spring-data-jpa/src/main/antlr4/org/springframework/data/jpa/repository/query/Jpql.g4 b/spring-data-jpa/src/main/antlr4/org/springframework/data/jpa/repository/query/Jpql.g4 index a1c69583fd..c44f3495f6 100644 --- a/spring-data-jpa/src/main/antlr4/org/springframework/data/jpa/repository/query/Jpql.g4 +++ b/spring-data-jpa/src/main/antlr4/org/springframework/data/jpa/repository/query/Jpql.g4 @@ -653,7 +653,8 @@ entity_type_literal escape_character : CHARACTER - | character_valued_input_parameter // + | string_literal + | character_valued_input_parameter ; numeric_literal @@ -949,7 +950,7 @@ NOT_EQUAL : '<>' | '!=' ; CHARACTER : '\'' (~ ('\'' | '\\')) '\'' ; IDENTIFICATION_VARIABLE : ('a' .. 'z' | 'A' .. 'Z' | '\u0080' .. '\ufffe' | '$' | '_') ('a' .. 'z' | 'A' .. 'Z' | '\u0080' .. '\ufffe' | '0' .. '9' | '$' | '_')* ; -STRINGLITERAL : '\'' (~ ('\'' | '\\'))* '\'' ; +STRINGLITERAL : '\'' (~ ('\'' | '\\')|'\\')* '\'' ; JAVASTRINGLITERAL : '"' ( ('\\' [btnfr"']) | ~('"'))* '"'; FLOATLITERAL : ('0' .. '9')* '.' ('0' .. '9')+ (E ('0' .. '9')+)* (F|D)?; INTLITERAL : ('0' .. '9')+ ; diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/EqlQueryRenderer.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/EqlQueryRenderer.java index 5bd453a816..836b0b372a 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/EqlQueryRenderer.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/EqlQueryRenderer.java @@ -2418,7 +2418,16 @@ public List visitEntity_type_literal(EqlParser.Entity_type @Override public List visitEscape_character(EqlParser.Escape_characterContext ctx) { - return List.of(new JpaQueryParsingToken(ctx.CHARACTER())); + + if (ctx.CHARACTER() != null) { + return List.of(new JpaQueryParsingToken(ctx.CHARACTER())); + } else if (ctx.character_valued_input_parameter() != null) { + return visit(ctx.character_valued_input_parameter()); + } else if (ctx.string_literal() != null) { + return visit(ctx.string_literal()); + } + + return List.of(); } @Override diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/JpqlQueryRenderer.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/JpqlQueryRenderer.java index 58f549ace5..74ec8a7905 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/JpqlQueryRenderer.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/JpqlQueryRenderer.java @@ -2225,7 +2225,16 @@ public List visitEntity_type_literal(JpqlParser.Entity_typ @Override public List visitEscape_character(JpqlParser.Escape_characterContext ctx) { - return List.of(new JpaQueryParsingToken(ctx.CHARACTER())); + + if (ctx.CHARACTER() != null) { + return List.of(new JpaQueryParsingToken(ctx.CHARACTER())); + } else if (ctx.character_valued_input_parameter() != null) { + return visit(ctx.character_valued_input_parameter()); + } else if (ctx.string_literal() != null) { + return visit(ctx.string_literal()); + } + + return List.of(); } @Override diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/EqlQueryRendererTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/EqlQueryRendererTests.java index 1483625251..f744f17561 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/EqlQueryRendererTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/EqlQueryRendererTests.java @@ -1038,6 +1038,14 @@ void signedExpressionsShouldWork(String query) { assertQuery(query); } + @Test // GH-3873 + void escapeClauseShouldWork() { + assertQuery("select t.name from SomeDbo t where t.name LIKE :name escape '\\\\'"); + assertQuery("SELECT e FROM SampleEntity e WHERE LOWER(e.label) LIKE LOWER(?1) ESCAPE '\\\\'"); + assertQuery("SELECT e FROM SampleEntity e WHERE LOWER(e.label) LIKE LOWER(?1) ESCAPE ?1"); + assertQuery("SELECT e FROM SampleEntity e WHERE LOWER(e.label) LIKE LOWER(?1) ESCAPE :param"); + } + @ParameterizedTest // GH-3451 @MethodSource("reservedWords") void entityNameWithPackageContainingReservedWord(String reservedWord) { diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/HqlQueryRendererTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/HqlQueryRendererTests.java index 47568fc19e..dd24a883ea 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/HqlQueryRendererTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/HqlQueryRendererTests.java @@ -1569,6 +1569,9 @@ void binaryLiteralsShouldWork() { @Test // GH-3040 void escapeClauseShouldWork() { assertQuery("select t.name from SomeDbo t where t.name LIKE :name escape '\\\\'"); + assertQuery("SELECT e FROM SampleEntity e WHERE LOWER(e.label) LIKE LOWER(?1) ESCAPE '\\\\'"); + assertQuery("SELECT e FROM SampleEntity e WHERE LOWER(e.label) LIKE LOWER(?1) ESCAPE ?1"); + assertQuery("SELECT e FROM SampleEntity e WHERE LOWER(e.label) LIKE LOWER(?1) ESCAPE :param"); } @Test // GH-3062, GH-3056 diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/JpqlQueryRendererTests.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/JpqlQueryRendererTests.java index 12d254eed0..bbec335017 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/JpqlQueryRendererTests.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/JpqlQueryRendererTests.java @@ -1046,6 +1046,14 @@ void signedExpressionsShouldWork(String query) { assertQuery(query); } + @Test // GH-3873 + void escapeClauseShouldWork() { + assertQuery("select t.name from SomeDbo t where t.name LIKE :name escape '\\\\'"); + assertQuery("SELECT e FROM SampleEntity e WHERE LOWER(e.label) LIKE LOWER(?1) ESCAPE '\\\\'"); + assertQuery("SELECT e FROM SampleEntity e WHERE LOWER(e.label) LIKE LOWER(?1) ESCAPE ?1"); + assertQuery("SELECT e FROM SampleEntity e WHERE LOWER(e.label) LIKE LOWER(?1) ESCAPE :param"); + } + @ParameterizedTest // GH-3451 @MethodSource("reservedWords") void entityNameWithPackageContainingReservedWord(String reservedWord) { From daa751390cf0876eb30ab50c5bd5f4e833a50564 Mon Sep 17 00:00:00 2001 From: Mark Paluch Date: Fri, 16 May 2025 10:05:33 +0200 Subject: [PATCH 149/157] Prepare 3.3.12 (2024.0.12). See #3851 --- pom.xml | 20 ++++---------------- 1 file changed, 4 insertions(+), 16 deletions(-) diff --git a/pom.xml b/pom.xml index 21911d4e6b..a7dbd6c3ac 100755 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ org.springframework.data.build spring-data-parent - 3.3.12-SNAPSHOT + 3.3.12 @@ -42,7 +42,7 @@ 4.9 9.1.0 42.7.4 - 3.3.12-SNAPSHOT + 3.3.12 0.10.3 org.hibernate @@ -170,20 +170,8 @@ - - spring-snapshot - https://repo.spring.io/snapshot - - true - - - false - - - - spring-milestone - https://repo.spring.io/milestone - + + From 5d7bb3a9c82b8f43893f1c57e3b98497b68c1041 Mon Sep 17 00:00:00 2001 From: Mark Paluch Date: Fri, 16 May 2025 10:05:54 +0200 Subject: [PATCH 150/157] Release version 3.3.12 (2024.0.12). See #3851 --- pom.xml | 2 +- spring-data-envers/pom.xml | 4 ++-- spring-data-jpa-distribution/pom.xml | 2 +- spring-data-jpa/pom.xml | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/pom.xml b/pom.xml index a7dbd6c3ac..4d549722d2 100755 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ org.springframework.data spring-data-jpa-parent - 3.3.12-SNAPSHOT + 3.3.12 pom Spring Data JPA Parent diff --git a/spring-data-envers/pom.xml b/spring-data-envers/pom.xml index e83bf47dbe..3843ada73a 100755 --- a/spring-data-envers/pom.xml +++ b/spring-data-envers/pom.xml @@ -5,12 +5,12 @@ org.springframework.data spring-data-envers - 3.3.12-SNAPSHOT + 3.3.12 org.springframework.data spring-data-jpa-parent - 3.3.12-SNAPSHOT + 3.3.12 ../pom.xml diff --git a/spring-data-jpa-distribution/pom.xml b/spring-data-jpa-distribution/pom.xml index 30d33d4966..1067c0f629 100644 --- a/spring-data-jpa-distribution/pom.xml +++ b/spring-data-jpa-distribution/pom.xml @@ -14,7 +14,7 @@ org.springframework.data spring-data-jpa-parent - 3.3.12-SNAPSHOT + 3.3.12 ../pom.xml diff --git a/spring-data-jpa/pom.xml b/spring-data-jpa/pom.xml index e59c4eb4d7..84ce16416d 100644 --- a/spring-data-jpa/pom.xml +++ b/spring-data-jpa/pom.xml @@ -7,7 +7,7 @@ org.springframework.data spring-data-jpa - 3.3.12-SNAPSHOT + 3.3.12 Spring Data JPA Spring Data module for JPA repositories. @@ -16,7 +16,7 @@ org.springframework.data spring-data-jpa-parent - 3.3.12-SNAPSHOT + 3.3.12 ../pom.xml From 3a78ef06487bc01347b23fa8d0aebcf155b7332e Mon Sep 17 00:00:00 2001 From: Mark Paluch Date: Fri, 16 May 2025 10:08:24 +0200 Subject: [PATCH 151/157] Prepare next development iteration. See #3851 --- pom.xml | 2 +- spring-data-envers/pom.xml | 4 ++-- spring-data-jpa-distribution/pom.xml | 2 +- spring-data-jpa/pom.xml | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/pom.xml b/pom.xml index 4d549722d2..cb168e01c0 100755 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ org.springframework.data spring-data-jpa-parent - 3.3.12 + 3.3.13-SNAPSHOT pom Spring Data JPA Parent diff --git a/spring-data-envers/pom.xml b/spring-data-envers/pom.xml index 3843ada73a..bb36c7c6b6 100755 --- a/spring-data-envers/pom.xml +++ b/spring-data-envers/pom.xml @@ -5,12 +5,12 @@ org.springframework.data spring-data-envers - 3.3.12 + 3.3.13-SNAPSHOT org.springframework.data spring-data-jpa-parent - 3.3.12 + 3.3.13-SNAPSHOT ../pom.xml diff --git a/spring-data-jpa-distribution/pom.xml b/spring-data-jpa-distribution/pom.xml index 1067c0f629..29fb3907db 100644 --- a/spring-data-jpa-distribution/pom.xml +++ b/spring-data-jpa-distribution/pom.xml @@ -14,7 +14,7 @@ org.springframework.data spring-data-jpa-parent - 3.3.12 + 3.3.13-SNAPSHOT ../pom.xml diff --git a/spring-data-jpa/pom.xml b/spring-data-jpa/pom.xml index 84ce16416d..24f8c7a312 100644 --- a/spring-data-jpa/pom.xml +++ b/spring-data-jpa/pom.xml @@ -7,7 +7,7 @@ org.springframework.data spring-data-jpa - 3.3.12 + 3.3.13-SNAPSHOT Spring Data JPA Spring Data module for JPA repositories. @@ -16,7 +16,7 @@ org.springframework.data spring-data-jpa-parent - 3.3.12 + 3.3.13-SNAPSHOT ../pom.xml From 6e37f7bae1ffee29bc00699ad0616c3956ac63a9 Mon Sep 17 00:00:00 2001 From: Mark Paluch Date: Fri, 16 May 2025 10:08:26 +0200 Subject: [PATCH 152/157] After release cleanups. See #3851 --- pom.xml | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/pom.xml b/pom.xml index cb168e01c0..271ec1b8a0 100755 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ org.springframework.data.build spring-data-parent - 3.3.12 + 3.3.13-SNAPSHOT @@ -42,7 +42,7 @@ 4.9 9.1.0 42.7.4 - 3.3.12 + 3.3.13-SNAPSHOT 0.10.3 org.hibernate @@ -170,8 +170,20 @@ - - + + spring-snapshot + https://repo.spring.io/snapshot + + true + + + false + + + + spring-milestone + https://repo.spring.io/milestone + From 2f616383885dd9f59a4c75be466aa2d2e534be63 Mon Sep 17 00:00:00 2001 From: hoyeon Jang Date: Sat, 7 Jun 2025 10:08:35 +0900 Subject: [PATCH 153/157] Fix typos in query-methods.adoc. Signed-off-by: hoyeon Jang Closes #3912 --- src/main/antora/modules/ROOT/pages/jpa/query-methods.adoc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/antora/modules/ROOT/pages/jpa/query-methods.adoc b/src/main/antora/modules/ROOT/pages/jpa/query-methods.adoc index cfa3039570..cada2512f7 100644 --- a/src/main/antora/modules/ROOT/pages/jpa/query-methods.adoc +++ b/src/main/antora/modules/ROOT/pages/jpa/query-methods.adoc @@ -74,7 +74,7 @@ NOTE: `In` and `NotIn` also take any subclass of `Collection` as a parameter as ==== `DISTINCT` can be tricky and not always producing the results you expect. For example, `select distinct u from User u` will produce a complete different result than `select distinct u.lastname from User u`. -In the first case, since you are including `User.id`, nothing will duplicated, hence you'll get the whole table, and it would be of `User` objects. +In the first case, since you are including `User.id`, nothing will be duplicated, hence you'll get the whole table, and it would be of `User` objects. However, that latter query would narrow the focus to just `User.lastname` and find all unique last names for that table. This would also yield a `List` result set instead of a `List` result set. @@ -83,7 +83,7 @@ This would also yield a `List` result set instead of a `List` resu `countDistinctByLastname(String lastname)` can also produce unexpected results. Spring Data JPA will derive `select count(distinct u.id) from User u where u.lastname = ?1`. Again, since `u.id` won't hit any duplicates, this query will count up all the users that had the binding last name. -Which would the same as `countByLastname(String lastname)`! +Which would be the same as `countByLastname(String lastname)`! What is the point of this query anyway? To find the number of people with a given last name? To find the number of _distinct_ people with that binding last name? To find the number of _distinct last names_? (That last one is an entirely different query!) @@ -390,7 +390,7 @@ You have multiple options to consume large query results: You have learned in the previous chapter about `Pageable` and `PageRequest`. 2. <>. This is a lighter variant than paging because it does not require the total result count. -3. <>. +3. <>. This method avoids https://use-the-index-luke.com/no-offset[the shortcomings of offset-based result retrieval by leveraging database indexes]. Read more on <> for your particular arrangement. From 0d9387b10bed81d0f603165ebaf2ce8c7291d406 Mon Sep 17 00:00:00 2001 From: Mark Paluch Date: Fri, 13 Jun 2025 10:15:41 +0200 Subject: [PATCH 154/157] Prepare 3.3.13 (2024.0.13). See #3889 --- pom.xml | 20 ++++---------------- 1 file changed, 4 insertions(+), 16 deletions(-) diff --git a/pom.xml b/pom.xml index 271ec1b8a0..309fae8cd3 100755 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ org.springframework.data.build spring-data-parent - 3.3.13-SNAPSHOT + 3.3.13 @@ -42,7 +42,7 @@ 4.9 9.1.0 42.7.4 - 3.3.13-SNAPSHOT + 3.3.13 0.10.3 org.hibernate @@ -170,20 +170,8 @@ - - spring-snapshot - https://repo.spring.io/snapshot - - true - - - false - - - - spring-milestone - https://repo.spring.io/milestone - + + From 9f8536fc37b5291031fd31d45285da657e8dc444 Mon Sep 17 00:00:00 2001 From: Mark Paluch Date: Fri, 13 Jun 2025 10:16:00 +0200 Subject: [PATCH 155/157] Release version 3.3.13 (2024.0.13). See #3889 --- pom.xml | 2 +- spring-data-envers/pom.xml | 4 ++-- spring-data-jpa-distribution/pom.xml | 2 +- spring-data-jpa/pom.xml | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/pom.xml b/pom.xml index 309fae8cd3..5fa657dc86 100755 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ org.springframework.data spring-data-jpa-parent - 3.3.13-SNAPSHOT + 3.3.13 pom Spring Data JPA Parent diff --git a/spring-data-envers/pom.xml b/spring-data-envers/pom.xml index bb36c7c6b6..f71a85fad8 100755 --- a/spring-data-envers/pom.xml +++ b/spring-data-envers/pom.xml @@ -5,12 +5,12 @@ org.springframework.data spring-data-envers - 3.3.13-SNAPSHOT + 3.3.13 org.springframework.data spring-data-jpa-parent - 3.3.13-SNAPSHOT + 3.3.13 ../pom.xml diff --git a/spring-data-jpa-distribution/pom.xml b/spring-data-jpa-distribution/pom.xml index 29fb3907db..9c51316ced 100644 --- a/spring-data-jpa-distribution/pom.xml +++ b/spring-data-jpa-distribution/pom.xml @@ -14,7 +14,7 @@ org.springframework.data spring-data-jpa-parent - 3.3.13-SNAPSHOT + 3.3.13 ../pom.xml diff --git a/spring-data-jpa/pom.xml b/spring-data-jpa/pom.xml index 24f8c7a312..ade65cd44c 100644 --- a/spring-data-jpa/pom.xml +++ b/spring-data-jpa/pom.xml @@ -7,7 +7,7 @@ org.springframework.data spring-data-jpa - 3.3.13-SNAPSHOT + 3.3.13 Spring Data JPA Spring Data module for JPA repositories. @@ -16,7 +16,7 @@ org.springframework.data spring-data-jpa-parent - 3.3.13-SNAPSHOT + 3.3.13 ../pom.xml From 2acd0d6431f51d4cd1876e42575dc81abe5b8a81 Mon Sep 17 00:00:00 2001 From: Mark Paluch Date: Fri, 13 Jun 2025 10:18:22 +0200 Subject: [PATCH 156/157] Prepare next development iteration. See #3889 --- pom.xml | 2 +- spring-data-envers/pom.xml | 4 ++-- spring-data-jpa-distribution/pom.xml | 2 +- spring-data-jpa/pom.xml | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/pom.xml b/pom.xml index 5fa657dc86..12f5c5dad0 100755 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ org.springframework.data spring-data-jpa-parent - 3.3.13 + 3.3.14-SNAPSHOT pom Spring Data JPA Parent diff --git a/spring-data-envers/pom.xml b/spring-data-envers/pom.xml index f71a85fad8..327df80e6f 100755 --- a/spring-data-envers/pom.xml +++ b/spring-data-envers/pom.xml @@ -5,12 +5,12 @@ org.springframework.data spring-data-envers - 3.3.13 + 3.3.14-SNAPSHOT org.springframework.data spring-data-jpa-parent - 3.3.13 + 3.3.14-SNAPSHOT ../pom.xml diff --git a/spring-data-jpa-distribution/pom.xml b/spring-data-jpa-distribution/pom.xml index 9c51316ced..71e4cf59fb 100644 --- a/spring-data-jpa-distribution/pom.xml +++ b/spring-data-jpa-distribution/pom.xml @@ -14,7 +14,7 @@ org.springframework.data spring-data-jpa-parent - 3.3.13 + 3.3.14-SNAPSHOT ../pom.xml diff --git a/spring-data-jpa/pom.xml b/spring-data-jpa/pom.xml index ade65cd44c..ad1e1562a1 100644 --- a/spring-data-jpa/pom.xml +++ b/spring-data-jpa/pom.xml @@ -7,7 +7,7 @@ org.springframework.data spring-data-jpa - 3.3.13 + 3.3.14-SNAPSHOT Spring Data JPA Spring Data module for JPA repositories. @@ -16,7 +16,7 @@ org.springframework.data spring-data-jpa-parent - 3.3.13 + 3.3.14-SNAPSHOT ../pom.xml From 1373571dbafb5efe77f64719eb75c3cdd836faa3 Mon Sep 17 00:00:00 2001 From: Mark Paluch Date: Fri, 13 Jun 2025 10:18:24 +0200 Subject: [PATCH 157/157] After release cleanups. See #3889 --- pom.xml | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/pom.xml b/pom.xml index 12f5c5dad0..f977c08a8f 100755 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ org.springframework.data.build spring-data-parent - 3.3.13 + 3.3.14-SNAPSHOT @@ -42,7 +42,7 @@ 4.9 9.1.0 42.7.4 - 3.3.13 + 3.3.14-SNAPSHOT 0.10.3 org.hibernate @@ -170,8 +170,20 @@ - - + + spring-snapshot + https://repo.spring.io/snapshot + + true + + + false + + + + spring-milestone + https://repo.spring.io/milestone +