Commit Graph

3076 Commits

Author SHA1 Message Date
lanicc
062258768f Fix the JDK version documented to build the source code.
Closes: #2671
Original pull request: #2672.
2022-08-02 09:26:36 +02:00
Mark Paluch
42dadd89b4 Use CompletableFuture instead of deprecated ListenableFuture.
Closes #2669
2022-07-29 14:33:11 +02:00
Mark Paluch
7e1712a5de Refine @PageableDefault and @SortDefault annotations.
We now use MergedAnnotations to evaluate annotation attributes and to use aliasing across attributes. Also, SortDefault is not repeatable.

Closes #2657
2022-07-27 09:46:39 +02:00
Jens Schauder
3a6b04dfe1 Make reference to XML namespace optional.
Not all modules have a XML namespace.
Therefore it is now possible to exclude parts that reference the XML namespace from the documentation

By default the parts referring to the XML namespace are included just as before.
But they will get skipped if the `index.adoc` of the module defines the attribute `include-xml-namespaces` as `false` by including

```
:include-xml-namespaces: false
```

Closes #2662
See https://github.com/spring-projects/spring-data-relational/issues/1290
Original pull request #2664
2022-07-26 10:12:46 +02:00
Christoph Strobl
0a67a14fe6 After release cleanups.
See #2632
2022-07-15 15:30:53 +02:00
Christoph Strobl
c4e5c10c7d Prepare next development iteration.
See #2632
2022-07-15 15:30:45 +02:00
Christoph Strobl
46f2bc2395 Release version 3.0 M5 (2022.0.0).
See #2632
2022-07-15 15:18:29 +02:00
Christoph Strobl
24dae96204 Prepare 3.0 M5 (2022.0.0).
See #2632
2022-07-15 15:17:56 +02:00
Jens Schauder
0bf62a8a74 Polishing.
Incorporating feedback.

Original pull request #2655
See #2654
See #2228
2022-07-14 09:12:03 +02:00
Jens Schauder
b1aeec1576 Add documentation for the fluent API for Query By Example.
Closes #2654
Original pull request #2655
See #2228
2022-07-14 09:12:03 +02:00
Christoph Strobl
74e52612bf Use ManagedType BeanDefinition for AOT processing when possible.
We now try to read the types directly from the bean definition arguments first, before attempting to resolve the actual bean instance.
If resolving the bean fails, we currently only log an info message. This arrangement needs to be revisited.

See: #2593
2022-07-13 12:18:18 +02:00
John Blum
cfac78867e Adapt to the repackaging of the AOT RuntimeHintsPredicate.
Closes #2653.
2022-07-12 17:17:00 -07:00
Christoph Strobl
0905c77e5f Add factory method to Reactive-/AuditingHandler.
By providing a factory method that accepts the MappingContext we can avoid the creation of additional support beans during the configuration phase for store modules implementing auditing.

See: #2593
2022-07-11 12:14:38 +02:00
Christoph Strobl
fb07ad9b2e Add factory method to Reactive-/IsNewAwareAuditingHandler.
By providing a factory method that accepts the MappingContext we can avoid the creation of additional support beans during the configuration phase for store modules implementing auditing.

See: #2593
2022-07-08 08:32:27 +02:00
Mark Paluch
9c3696d335 Polishing.
Improve factory methods. Integrate auditing hints in AuditingBeanRegistrationAotProcessor. Reduce visibility, improve naming.

Original Pull Request: #2624
2022-07-04 14:22:08 +02:00
John Blum
7aafe577e2 Simplify logic in SpringDataBeanFactoryInitializationAotProcessor.
Original Pull Request: #2624
2022-07-04 14:22:08 +02:00
Mark Paluch
2d16692f51 Use constant fields for Reactive Wrapper Converters guards.
Enables reachability analysis. Previously, the presence checks were using method invocations and the AOT processing isn't following the methods.

Original Pull Request: #2624
2022-07-04 14:22:07 +02:00
Mark Paluch
e71f7c2bd6 Simplify field and method filter creation.
Update javadoc and reformat aot.factories.

Original Pull Request: #2624
2022-07-04 14:22:07 +02:00
Christoph Strobl
423edd21ea Use BeanRegistrationAotProcessor to provide hints for auditing.
This avoids having to touch modules to add something like ImportRuntimeHints(AuditingHints.ReactiveAuditingRuntimeHints.class) to the enabled auditing annotations.

Original Pull Request: #2624
2022-07-04 14:22:06 +02:00
Mark Paluch
0a423ac3f5 Open up AuditingBeanDefinitionRegistrarSupport.registerAuditHandlerBeanDefinition(…) to allow additional bean registrations.
Original Pull Request: #2624
2022-07-04 14:22:06 +02:00
Christoph Strobl
4e23153816 Move runtime hints into another package
Original Pull Request: #2624
2022-07-04 14:22:05 +02:00
Mark Paluch
51cda9993f Introduce PropertiesBasedNamedQueriesFactoryBean to reduce bean indirections.
We now provide PropertiesBasedNamedQueriesFactoryBean to create PropertiesBasedNamedQueries directly bypassing indirections through PropertiesFactoryBean and PropertiesBasedNamedQueries.

Original Pull Request: #2624
2022-07-04 14:22:05 +02:00
Christoph Strobl
0262380d29 Add native image runtime hints.
We provide an initial set of runtime hints required to spin up data repositories on GraalVM native image.
Additionally we skip synthetic types during type inspection.

Original Pull Request: #2624
2022-07-04 14:22:04 +02:00
John Blum
d8118de90f Review, refactor and polish Spring Data AOT infrastructure classes.
* Refactored logic in AOT infrastructure classes.
* Annotated AOT API with Spring's @NonNull and @Nullable annotations.
* Edited Javadoc.
* Introduced PredicateUtils abstract utility class encapsulating common Predicates on types and class members.
* Added comments for review and clarification.

Original Pull Request: #2624
2022-07-04 14:22:04 +02:00
Christoph Strobl
21ff2a7e34 Introduce infrastructure for AOT processing of repository declarations
This commit introduces initial support for framework 6 bases ahead of time processing of data components and adds extension points for module implementations.

See: #2593
Original Pull Request: #2624
2022-07-04 14:22:03 +02:00
Mark Paluch
8b560f96c3 Upgrade to Kotlin 1.7.
Adopt to stricter nullability checks.

Closes #2648
2022-06-24 11:52:08 +02:00
Florian Cramer
2a299b2ff2 Use TypeFilterUtils to create TypeFilters.
Original pull request: #2647.
Closes #2481
2022-06-23 13:59:02 +02:00
Oliver Drotbohm
dfc3060ed7 Polishing.
See #2644.
2022-06-20 17:18:45 +02:00
Oliver Drotbohm
75387bb8ae Add RepositoryConfiurationExtension.getModuleIdentifier().
We're now unifying the lookup of a unique identifier for a Spring Data module in the RepositoryConfigurationExtension interface. Previous users of getModulePrefix() in subclasses of RCE should rather call getModuleIdentifier(). Implementations of RCE that previously implemented getModulePrefix() directly should rather switch to implementing getModuleName() and additionally getModuleIdentifier() in case the default implementations derivation of the identifier from the name doesn't produce the results intended.

RepositoryConfigurationExtensionSupport.getDefaultNamedQueryLocation() was changed to rather use the identifier to calculate the name of the named query location instead of the prefix.

Fixes #2644.
2022-06-20 17:18:45 +02:00
Mark Paluch
09558d77d8 Revert exposing getModulePrefix() on RepositoryConfigurationExtension.
This is a breaking change as many modules implement a protected method. We're going to change this later with #2644.

Original pull request: #2635.
See #2634.
2022-06-14 10:01:49 +02:00
Mark Paluch
35dbda7144 Polishing.
Add assertions, refine Javadoc.

Original pull request: #2635.
See #2634.
2022-06-14 10:01:49 +02:00
Christoph Strobl
02bf260d6d Introduce ManagedTypes.
We now provide an abstraction to describe a collection of entity types that can be provided to the mapping context as improvement over `Set<Class>` for easier context setup.

Original pull request: #2635.
Closes #2634.
2022-06-14 10:01:49 +02:00
Oliver Drotbohm
2a1a8f387f Additional refinements in TypeInformation reimplementation.
Slight refinements in TypeDiscoverer.equals(…) / hashCode() that are still not completely valid, are different enough to work for differentiating use cases but not 100% efficient for cache cases. Captured outstanding work in spring-projects/spring-data-commons#2643.

Reimplemented ….repository.query.Parameter.isDynamicProjectParameter(…) to bild on TypeInformation completely and properly unwrapp *all* wrapper types for type comparison.

Related ticket #2312.
2022-06-13 16:04:08 +02:00
Christoph Strobl
18a9f3aa13 Expose RepositoryFragments as infrastructure bean.
We now expose RepositoryFragments as a bean to be referenced when creating the actual repository.

Original Pull Request: #2596
2022-06-13 11:02:51 +02:00
Mark Paluch
712477bf36 Introduce PropertiesBasedNamedQueriesFactoryBean to reduce bean indirections.
We now provide PropertiesBasedNamedQueriesFactoryBean to create PropertiesBasedNamedQueries directly bypassing indirections through PropertiesFactoryBean and PropertiesBasedNamedQueries.

Resolves: #2584
Original Pull Request: #2596
2022-06-13 10:52:34 +02:00
Oliver Drotbohm
0f85f1c720 Prefer explicitly declared generic parameter over Iterable in TypeDiscoverer.getComponentType().
Related ticket: #2312.
2022-06-10 22:12:37 +02:00
Oliver Drotbohm
07342cffb5 Polishing.
Move all primary interaction API into TypeInformation to prepare making all implementations package protected. Adapt all deprecated API usage in Spring Data Commons to the new one.

Benchmark results look as follows:

2.7
                                                                                                Mode  Cnt          Score          Error  Units
TypicalEntityReaderBenchmark.hasReadTarget                                                     thrpt   10   81982861,995 ±   269948,368  ops/s
TypicalEntityReaderBenchmark.kotlinDataClass                                                   thrpt   10   18472975,689 ±   161234,912  ops/s
TypicalEntityReaderBenchmark.kotlinDataClassWithDefaulting                                     thrpt   10    4029631,568 ±    18990,863  ops/s
TypicalEntityReaderBenchmark.simpleEntityGeneratedConstructorAndField                          thrpt   10   11495517,933 ±   209269,454  ops/s
TypicalEntityReaderBenchmark.simpleEntityGeneratedConstructorAndProperty                       thrpt   10   11192152,036 ±   249721,563  ops/s
TypicalEntityReaderBenchmark.simpleEntityGeneratedConstructorArgsCreation                      thrpt   10   18835101,279 ±    81895,338  ops/s
TypicalEntityReaderBenchmark.simpleEntityGeneratedFieldAccess                                  thrpt   10   16309896,939 ±    80376,406  ops/s
TypicalEntityReaderBenchmark.simpleEntityGeneratedPropertyAccess                               thrpt   10   15471691,537 ±    52426,121  ops/s
TypicalEntityReaderBenchmark.simpleEntityReflectiveConstructorAndField                         thrpt   10   12080159,283 ±    49922,326  ops/s
TypicalEntityReaderBenchmark.simpleEntityReflectiveConstructorAndProperty                      thrpt   10   12166160,066 ±   173876,051  ops/s
TypicalEntityReaderBenchmark.simpleEntityReflectiveConstructorArgsCreation                     thrpt   10   13548906,437 ±   485944,886  ops/s
TypicalEntityReaderBenchmark.simpleEntityReflectiveFieldAccess                                 thrpt   10   16457347,670 ±    64170,567  ops/s
TypicalEntityReaderBenchmark.simpleEntityReflectivePropertyAccess                              thrpt   10   14115878,948 ±    57491,268  ops/s
TypicalEntityReaderBenchmark.simpleEntityReflectivePropertyAccessWithCustomConversionRegistry  thrpt   10   15137904,257 ±    51148,726  ops/s

DefaultTypeMapperBenchmark.readTyped                                                           thrpt   10  146820080,682 ± 13254238,407  ops/s
DefaultTypeMapperBenchmark.readTypedWithBaseType                                               thrpt   10   55420351,827 ±  1888634,217  ops/s
DefaultTypeMapperBenchmark.readUntyped                                                         thrpt   10  193934847,273 ±   442867,276  ops/s
DefaultTypeMapperBenchmark.readUntypedWithBaseType                                             thrpt   10  192032977,366 ±  4300192,665  ops/s

3.0 – Before this change
                                                                                                Mode  Cnt          Score         Error  Units
TypicalEntityReaderBenchmark.hasReadTarget                                                     thrpt   10   81124249,138 ±  174095,495  ops/s
TypicalEntityReaderBenchmark.kotlinDataClass                                                   thrpt   10   18685936,220 ±  243939,063  ops/s
TypicalEntityReaderBenchmark.kotlinDataClassWithDefaulting                                     thrpt   10    4125709,048 ±   17615,890  ops/s
TypicalEntityReaderBenchmark.simpleEntityGeneratedConstructorAndField                          thrpt   10   12277837,989 ±   96973,908  ops/s
TypicalEntityReaderBenchmark.simpleEntityGeneratedConstructorAndProperty                       thrpt   10   12419978,391 ±   45780,658  ops/s
TypicalEntityReaderBenchmark.simpleEntityGeneratedConstructorArgsCreation                      thrpt   10   18744593,010 ±   71655,735  ops/s
TypicalEntityReaderBenchmark.simpleEntityGeneratedFieldAccess                                  thrpt   10   16497286,465 ±   41150,718  ops/s
TypicalEntityReaderBenchmark.simpleEntityGeneratedPropertyAccess                               thrpt   10   15639640,554 ±   69758,391  ops/s
TypicalEntityReaderBenchmark.simpleEntityReflectiveConstructorAndField                         thrpt   10   11715068,503 ±   66085,900  ops/s
TypicalEntityReaderBenchmark.simpleEntityReflectiveConstructorAndProperty                      thrpt   10   12159285,083 ±   58171,950  ops/s
TypicalEntityReaderBenchmark.simpleEntityReflectiveConstructorArgsCreation                     thrpt   10   13711647,512 ±   66496,271  ops/s
TypicalEntityReaderBenchmark.simpleEntityReflectiveFieldAccess                                 thrpt   10   16287057,838 ±   54826,532  ops/s
TypicalEntityReaderBenchmark.simpleEntityReflectivePropertyAccess                              thrpt   10   13847665,634 ±  127834,292  ops/s
TypicalEntityReaderBenchmark.simpleEntityReflectivePropertyAccessWithCustomConversionRegistry  thrpt   10   15099300,270 ±   89030,403  ops/s

DefaultTypeMapperBenchmark.readTyped                                                           thrpt   10  151893972,774 ±  494555,250  ops/s
DefaultTypeMapperBenchmark.readTypedWithBaseType                                               thrpt   10   55869432,892 ±  389099,409  ops/s
DefaultTypeMapperBenchmark.readUntyped                                                         thrpt   10  192661151,755 ± 1075079,924  ops/s
DefaultTypeMapperBenchmark.readUntypedWithBaseType                                             thrpt   10  192315554,269 ± 3061160,314  ops/s

3.0 – After this change
                                                                                                Mode  Cnt          Score         Error  Units
TypicalEntityReaderBenchmark.hasReadTarget                                                     thrpt   10   82650245,236 ±  321384,577  ops/s
TypicalEntityReaderBenchmark.kotlinDataClass                                                   thrpt   10   21304680,430 ±  396764,834  ops/s
TypicalEntityReaderBenchmark.kotlinDataClassWithDefaulting                                     thrpt   10    4422187,275 ±   35088,721  ops/s
TypicalEntityReaderBenchmark.simpleEntityGeneratedConstructorAndField                          thrpt   10   13345503,496 ±  180490,423  ops/s
TypicalEntityReaderBenchmark.simpleEntityGeneratedConstructorAndProperty                       thrpt   10   13911653,366 ±  266028,886  ops/s
TypicalEntityReaderBenchmark.simpleEntityGeneratedConstructorArgsCreation                      thrpt   10   21192316,261 ±  356534,938  ops/s
TypicalEntityReaderBenchmark.simpleEntityGeneratedFieldAccess                                  thrpt   10   17533419,173 ±   49226,408  ops/s
TypicalEntityReaderBenchmark.simpleEntityGeneratedPropertyAccess                               thrpt   10   17393382,078 ±  114774,442  ops/s
TypicalEntityReaderBenchmark.simpleEntityReflectiveConstructorAndField                         thrpt   10   12867285,952 ±   62870,980  ops/s
TypicalEntityReaderBenchmark.simpleEntityReflectiveConstructorAndProperty                      thrpt   10   13208453,130 ±  272795,070  ops/s
TypicalEntityReaderBenchmark.simpleEntityReflectiveConstructorArgsCreation                     thrpt   10   14998467,714 ±   84265,782  ops/s
TypicalEntityReaderBenchmark.simpleEntityReflectiveFieldAccess                                 thrpt   10   17365982,413 ±  115287,403  ops/s
TypicalEntityReaderBenchmark.simpleEntityReflectivePropertyAccess                              thrpt   10   15503841,949 ±  123631,592  ops/s
TypicalEntityReaderBenchmark.simpleEntityReflectivePropertyAccessWithCustomConversionRegistry  thrpt   10   15716685,449 ±   64686,646  ops/s

DefaultTypeMapperBenchmark.readTyped                                                           thrpt   10  154433835,941 ± 1391455,835  ops/s
DefaultTypeMapperBenchmark.readTypedWithBaseType                                               thrpt   10   77919886,633 ±  438244,738  ops/s
DefaultTypeMapperBenchmark.readUntyped                                                         thrpt   10  194435210,217 ±  936274,571  ops/s
DefaultTypeMapperBenchmark.readUntypedWithBaseType                                             thrpt   10  193768718,043 ±  475103,167  ops/s

Original pull request: #2572.
Related ticket: #2312.
2022-06-10 20:50:24 +02:00
Christoph Strobl
1d6331ccb6 Use ResolvableType to back TypeInformation.
Reworked the implementation of the TypeInformation type hierarchy to be based on Spring's ResolvableType for most of the heavy-lifting.

Original pull request: #2572.
Related ticket: #2312.
2022-06-10 17:36:21 +02:00
John Blum
8721ab4170 Polish for Exception message punctuation cleanup.
Closes #2603.
2022-06-07 13:04:18 -07:00
jo
6a23723f07 Remove punctuation in all exception messages.
Closes #2603.
2022-06-07 12:53:13 -07:00
Mark Paluch
6e9a3cdccf Update CI properties.
See #2632
2022-06-03 09:34:21 +02:00
Mark Paluch
ed5579ed8e Upgrade to Maven Wrapper 3.8.5.
See #2639
2022-06-03 09:32:43 +02:00
Mark Paluch
70b4d14907 Include links to release notes in the readme.
Closes #2637
2022-05-24 15:38:37 +02:00
John Blum
c12b692f7c Remove Docker Registry login.
Closes #2633.
2022-05-16 08:51:56 -07:00
Arend v. Reinersdorff
8e96dce0ac Add missing space in reference documentation.
Closes #2628
2022-05-16 15:53:03 +02:00
Greg L. Turnquist
d364afdeb6 Fix typo in repository documentation.
Original issue: https://github.com/spring-projects/spring-data-jpa/issues/1761

Closes #2629.
2022-05-13 17:13:06 -05:00
Christoph Strobl
286fa5532a Fix pom.xml formatting.
This commit reverts formatting changes introduced via b3dace6dba.

See #2582
2022-05-13 13:54:32 +02:00
Christoph Strobl
476a518daf After release cleanups.
See #2582
2022-05-13 10:53:25 +02:00
Christoph Strobl
416a3d04fa Prepare next development iteration.
See #2582
2022-05-13 10:53:23 +02:00
Christoph Strobl
b2c7875b97 Release version 3.0 M4 (2022.0.0).
See #2582
2022-05-13 10:43:58 +02:00