Commit Graph

2258 Commits

Author SHA1 Message Date
Mark Paluch
3d08c10158 Avoid warn logging for custom converters using Collection.
If the collection type is not a store-native type, we no longer issue a warn log. Converters can be registered for List or Collection types and convert into a different, non-collection type while being a support converter instead of forcing a specific write type.

This is e.g. the case for MongoDB where a List of numbers is converted to the Vector type.

Closes #3306
2025-06-03 17:12:35 +02:00
Mark Paluch
d114269a12 Polishing.
Add unit tests.

See #3304
2025-06-03 11:51:54 +02:00
Yanming Zhou
115bebafda Use mutable list to collect items from Stream for reversal.
>> There are no guarantees on the type, mutability, serializability, or thread-safety of the List returned

`Collector.toList()` doesn't guarantee mutability, then passing it to `Collections.reverse()` is not safe.

Signed-off-by: Yanming Zhou <zhouyanming@gmail.com>
Closes #3304
2025-06-03 11:51:45 +02:00
Mark Paluch
b26dc1d370 Prepare 4.0 M3 (2025.1.0).
See #3276
2025-05-16 14:15:55 +02:00
Mark Paluch
857ccceb37 Add support for ConfigurationSource and Dynamic Projections.
See: #3279
Original Pull Request: #3289
2025-05-16 12:04:48 +02:00
Mark Paluch
368fe71e48 Refine customization of EntityInformation.
We now provide a getEntityInformation(RepositoryMetadata) customization hook for EntityInformation creation as several modules require access to RepositoryMetadata details (such as the Id type).

Closes #3288
2025-05-16 12:04:29 +02:00
Mark Paluch
732e1c5516 Polishing.
Add missing nullable annotation.

See #3170
2025-05-16 12:04:29 +02:00
Mark Paluch
adf8828560 Fix Javadoc.
Java 24 has stricter Javadoc checks.

See #3276
2025-05-16 12:04:29 +02:00
Mark Paluch
2b5c5975f5 Polishing.
Add missing documentation.

See #3285
2025-05-16 12:04:29 +02:00
Mark Paluch
a8c779c26b Reduce API surface, expose interfaces only.
See #3270
Original pull request: #3271
2025-05-16 12:04:29 +02:00
Mark Paluch
79c625d543 Polishing.
Refine local variable handling to logical and physical naming where the logical name is used in AOT contributor code while the physical name is rendered.

See #3270
Original pull request: #3271
2025-05-16 12:04:29 +02:00
Christoph Strobl
6360ef83b4 Add LocalVariableNameFactory.
Add a variable name factory that considers predefined names and resolves name clashes.
Expose variable name clash resolution via the generation context of a single method.

Closes #3270
Original pull request: #3271
2025-05-16 12:04:28 +02:00
Mark Paluch
3bc89bb221 Polishing.
Reformat code. Simplify flow. Add ticket reference to test.

See #3287
Original pull request: #3219
2025-05-16 12:04:28 +02:00
xeounxzxu
77b9cbd5b2 Avoid multiple DeferredRepositoryInitializationListener registrations in RepositoryConfigurationDelegate.
Closes #3287
Original pull request: #3219
2025-05-16 12:04:28 +02:00
Christoph Strobl
9a7ea62b2e Polishing.
Turn newly introduced methods on ParameterAccessor into default ones allowing modules to pick up changes at their own pace.
Add issue references and missing documentation.
Align Search- and GeoResults toString method with Page.

Original Pull Request: #3285
2025-05-16 12:04:28 +02:00
Mark Paluch
ecb2592493 Introduce SearchResult, SearchResults, Score and Similarity.
Closes: #3285
2025-05-16 12:04:28 +02:00
Christoph Strobl
00325610e8 Polishing.
Fix nullability warnings and update copyright header.

Original Pull Request: #3282
2025-05-16 12:04:28 +02:00
Mark Paluch
5f5e33c5e7 Polishing.
Original Pull Request: #3282
2025-05-16 12:04:28 +02:00
Mark Paluch
17a61f70d9 Polishing.
Introduce dedicated contributor interfaces to AotRepositoryBuilder.

See: #3279
Original Pull Request: #3282
2025-05-16 12:04:27 +02:00
Mark Paluch
5800600470 Refine AOT composition detection.
Associate Repository Bean Definition with RepositoryConfiguration and RepositoryConfigurationExtension attributes to capture configuration details such as the module name or the configuration source.

Introduce RepositoryFragmentsContributor to provide an abstraction for structural fragment implementation allowing to describe the implementation type instead of requiring the implementation object.

Obtain repository fragments from a RepositoryFragmentsContributor (either the configured one or one from a RepositoryFactoryBean).

Closes: #3279
Original Pull Request: #3282
2025-05-16 12:04:27 +02:00
Christoph Strobl
2dd6e74193 Polishing.
Ignore warnings for already checked constructs null away does not understand.

Original Pull Request: #3282
2025-05-16 12:04:27 +02:00
Christoph Strobl
9c966376a7 Refine Repository Composition retrieval during AOT.
Add module identifier and base repository implementation properties.
Fix fragment function previously overriding already set property due to name clash.
Extend tests for bean definition resolution and code block creation.

See: #3279
Original Pull Request: #3282
2025-05-16 12:04:27 +02:00
Mark Paluch
6f6470feb0 Prepare 4.0 M2 (2025.1.0).
See #3239
2025-05-16 12:04:26 +02:00
Mark Paluch
b10fd8f1c1 Polishing.
Introduce Environment to AotContext.
Move JSON classes to aot/generate package.

Refine exposed API.

See #3265
2025-05-16 12:04:26 +02:00
Christoph Strobl
0e5bfcfd06 Allow arguments to be used without creating a field.
See #3265
2025-05-16 12:04:26 +02:00
Mark Paluch
a25a1bd206 Polishing.
Fix fragment method order lookup. Lazify ProjectionFactory retrieval on DefaultFragmentCreationContext.

See #3265
2025-05-16 12:04:26 +02:00
Mark Paluch
9c37a13c25 Add support for repository JSON metadata.
See #3265
2025-05-16 12:04:26 +02:00
Mark Paluch
3596bcc996 Refactor RepositoryFactoryBeanSupport fragments setters.
Introduce RepositoryFragmentsFunction and a collection of functions to provide a well-formed contract.

Use RepositoryMetadata from initialized RepositoryFactoryBean.

See #3265
2025-05-16 12:04:25 +02:00
Christoph Strobl
281f186411 Add support for AOT generated repository implementations and wire fragments in BeanDefinition AOT code.
We now provide infrastructure to generate AOT repository method code that implements Query method behavior.

No longer use spring.factories but write some custom bean config code so that one of the properties can provide an instance of the generated repository.

Closes #3265
2025-05-16 12:04:25 +02:00
Mark Paluch
65257d983b Introduce CustomConversions.getRequiredValueConverter(…).
Provide convenience method to simplify flow in calling code.

See #3170
2025-05-16 12:04:25 +02:00
Mark Paluch
5b96fb480d Polishing.
Refine wording around Environment and EvaluationContext presence.

See #3170
2025-05-16 12:04:25 +02:00
Mark Paluch
9e2b7fe5c2 Polishing.
Add missing Nullable annotations, simplify generated bean name creation.

See #3170
2025-05-16 12:04:25 +02:00
Mark Paluch
30457ac4ed Migrate to JSpecify annotations for nullability constraints.
Closes #3170
2025-05-16 12:04:25 +02:00
Christoph Strobl
2b48fbc44c Prepare 4.0 M1 (2025.1.0).
See #3206
2025-05-16 12:04:09 +02:00
Mark Paluch
7c80c5da18 Use Spring's Nullness utility to determine JSpecify nullness.
We now use Nullness.forMethodParameter(…) to introspect method return types and argument types for nullness in addition to Spring's NonNullApi and JSR-305 annotations.

Closes #3100
2025-05-16 12:03:50 +02:00
Mark Paluch
17a71c9725 Move off deprecated API.
See #3218
2025-05-16 12:03:50 +02:00
Mark Paluch
8b0673fa08 Polishing.
Refine deprecations.

See #3208
2025-05-16 12:03:50 +02:00
Mark Paluch
d6e2f8ab98 Add @Contract and @CheckReturnValue annotations.
Closes: #3195
Original pull request: #3210
2025-05-16 12:03:50 +02:00
Mark Paluch
f1604b89b4 Remove ListenableFuture support.
Closes #3232
2025-05-16 12:03:49 +02:00
Mark Paluch
3417cb6dbb Remove @Deprecated API.
See #3208
2025-05-16 12:03:49 +02:00
Mark Paluch
3ef1bffb5c Revise ClassUtils and ReflectionUtils.
We deprecated `ClassUtils` in the repo.utils package and introduced a slimmer variant in o.s.d.util. Also, ReflectionUtils hosts now several methods that have been in ClassUtils along with an improved method naming (find vs. get in combination with return value semantics).

CastUtils is deprecated as we do not widely use it.
2025-05-16 12:03:49 +02:00
Mark Paluch
7db177e3cd Remove @Deprecated API.
Closes #3208
2025-05-16 12:03:49 +02:00
Mark Paluch
d32113bd43 Prepare 3.5 GA (2025.0.0).
See #3275
2025-05-16 11:28:09 +02:00
Mark Paluch
ecfe77c40f Polishing.
Reformat code, refine Javadoc.

See #3258
Original pull request: #3277
2025-05-16 09:35:09 +02:00
Chris Bono
39618faf01 Avoid matching multipart parameters annotated with @ModelAttribute
The ProxyHandlerMethodArgumentResolver now avoids matching multipart parameters annotated with @ModelAttribute. This allows multipart parameters to be handled by RequestParamMethodArgumentResolver which properly handles multipart arguments.

Also, the `@ProjectedPayload` annotation can now be used on parameters. This prepares for the upcoming removal of support for non-annotated projections.

Fixes #3258
Related tickets #2937
Original pull request: #3277

Signed-off-by: Chris Bono <chris.bono@broadcom.com>
2025-05-16 09:34:36 +02:00
Mark Paluch
cefc9232d1 Polishing.
Add missing Antora property.

See #3262
2025-05-09 11:31:26 +02:00
Mark Paluch
41c8a5080f Polishing.
Reformat code. Simplify flow. Add ticket reference to test.

See #3287
Original pull request: #3219
2025-05-09 11:08:00 +02:00
xeounxzxu
f9d5369ff1 Avoid multiple DeferredRepositoryInitializationListener registrations in RepositoryConfigurationDelegate.
Closes #3287
Original pull request: #3219
2025-05-09 11:07:39 +02:00
Oscar Hernandez
4ea94056cc Fix NPE in CrudRepositoryExtensions.
Closes #3187
2025-05-09 10:49:13 +02:00
Yanming Zhou
b4d2391cdb Use List.of() and Set.of() where feasible.
Closes #3231
2025-05-09 10:45:18 +02:00