Commit Graph

3045 Commits

Author SHA1 Message Date
Mark Paluch
b2e45c3204 Release version 3.4 RC1 (2024.1.0).
See #3151
2024-10-18 12:47:01 +02:00
Mark Paluch
5e0a2505f2 Prepare 3.4 RC1 (2024.1.0).
See #3151
2024-10-18 12:46:43 +02:00
Mark Paluch
38e862d339 Polishing.
Remove unnecessary static keywords.

See #3178
2024-10-17 15:26:19 +02:00
serv-inc
3b20d71193 Fix typo in EnableSpringDataWebSupport.
Closes #3178
2024-10-17 15:26:07 +02:00
Mark Paluch
089e470332 Polishing.
Add DDD context. Explain identifier to domain object relationship. Tweak wording.

See #3173
Original pull request: #3174
2024-10-17 15:23:01 +02:00
Christoph Strobl
f736636f62 Update documentation.
Add section on reserved method names within repository interfaces.

Closes #3173
Original pull request: #3174
2024-10-17 15:22:45 +02:00
Mark Paluch
b17bdec034 Polishing.
Avoid nullability in RepositoryMethodContextHolder.getContext(). Introduce shortcut in RepositoryMethodContext to obtain the current thread-local context. Update documentation.

See #3175.
Original pull request: #3176
2024-10-16 10:59:02 +02:00
Christoph Strobl
24c31bfd65 Move responsibility for storing method context to dedicated component.
See #3175.
Original pull request: #3176
2024-10-16 10:58:54 +02:00
Oliver Drotbohm
323aa60808 Move RepositoryMethodContext to repository.core package.
RepositoryMethodContext are now made available for dependency injection via RepositoryConfigurationExtensionSupport.registerBeansForRoot(…). Moved RMC into repository.core package (previously repository.core.support) and only expose factory methods on DefaultRepositoryMethodContext. DRMC also exposes a injection proxy lookup method that creates a proxy equipped with a TargetSource delegating to DRMC.getInstance() (previously ….getContext()). An additional, static DRMC.forMethod(…) allows the creation of a default instance for testing purposes.

Rename getRepository() to getMetadata() on RMC.

Fixes #3175.
Original pull request: #3176
2024-10-16 10:58:41 +02:00
Hosam Aly
55afe84b44 Fix typo in query-methods-details.adoc.
Fix a typo: Priced => Product

Closes #3172
2024-10-14 08:49:38 +02:00
imcb
15aa855690 Fix typo in definition.adoc.
Closes #3147
2024-10-11 10:39:04 +02:00
Mark Paluch
69e8e3f432 Use Docker in Docker CI setup.
See #3151
2024-10-09 14:01:06 +02:00
Mark Paluch
096836ee80 Add ValueExpression infrastructure for query methods.
Introduce ValueExpressionQueryRewriter as replacement for SpelQueryContext and QueryMethodValueEvaluationContextAccessor to encapsulate common ValueExpression functionality for Spring Data modules wanting to resolve Value Expressions in query methods.

Reduce dependencies in RepositoryFactoryBeanSupport and RepositoryFactorySupport to EvaluationContextProvider instead of QueryMethodEvaluationContextProvider to simplify dependencies.

Deprecate QueryMethodEvaluationContextProvider and its reactive variant for future removal.

Closes #3049
Original pull request: #3050
2024-10-09 13:37:04 +02:00
Christoph Strobl
e9ae6c7673 Fix native image hints for web support.
This commit adds a required native image reflection hint to allow Jackson object mapping to resolve and invoke the constructor of PageMetadata.
It also fixes an issue that surfaced after changing the bean constructor argument for SpringDataWebSettings leading to failures during the native compilation.

Closes: #3171
2024-10-07 11:19:48 +02:00
Mark Paluch
960b539069 Polishing.
See #3167
2024-09-30 09:31:48 +02:00
Mark Paluch
8ef195feed Introduce BasicPropertyDescriptor to KotlinBeanInfoFactory to bypass early property type validation.
Closes #3167
2024-09-30 09:31:48 +02:00
Tran Ngoc Nhan
f67cb87bf8 Polishing.
Add missing Override annotations. Use instanceof pattern variables, use diamond operator where possible.

Closes #3162
2024-09-26 11:27:29 +02:00
Mark Paluch
737502c4e4 Polishing.
See #3160
2024-09-26 10:59:46 +02:00
Mikhail2048
4a620ed9a0 Added Lazy wrapper for ReturnType#isDto.
Closes #3160
2024-09-26 10:59:37 +02:00
Mark Paluch
5df841b386 Consider projections without input properties open ones.
Closes #3164
2024-09-25 09:58:53 +02:00
Mark Paluch
4633380ae4 Polishing.
Add missing Override annotations. Eagerly compute input properties.

See #3163
2024-09-24 16:05:58 +02:00
Mark Paluch
22066eced3 Expose ReturnedType factory method.
Closes #3163
2024-09-24 15:59:23 +02:00
Jens Schauder
f305308a21 After release cleanups.
See #3098
2024-09-13 12:42:28 +02:00
Jens Schauder
5e9b7d00b0 Prepare next development iteration.
See #3098
2024-09-13 12:42:27 +02:00
Jens Schauder
82fb995ac4 Release version 3.4 M1 (2024.1.0).
See #3098
2024-09-13 12:39:32 +02:00
Jens Schauder
ee5e272348 Prepare 3.4 M1 (2024.1.0).
See #3098
2024-09-13 12:39:13 +02:00
Christoph Strobl
d9bdd2b550 Polishing.
Update documentation.
Additional logging for repository bootstrap procedure.
Limit usage of Optional in RepositoryFragment.

Original Pull Request: #3145
2024-09-04 10:49:22 +02:00
Mark Paluch
f7895eb306 Add RepositoryMetadataAccess.
Repositories that detect fragment implementations implementing RepositoryMetadataAccess enable metadata exposure regardless of the exposeMetadata flag.

See: #3090
Original Pull Request: #3145
2024-09-04 10:35:57 +02:00
Mark Paluch
b99db0cf01 Specialize Kotlin property accessors in KotlinBeanInfoFactory.
We now attempt to detect property accessors for properties declared in Kotlin that do not have a Kotlin-style accessor but one that instead comes from an interface.

Also, we specialize accessor methods that are inherited from a Java superclass but override accessors in the Kotlin realm.

Closes #3140
Closes #3146
2024-09-02 14:36:05 +02:00
Mark Paluch
3e75581336 Split projections document fragment into multiple subfragments.
Closes #3144
2024-08-29 09:58:26 +02:00
Oliver Drotbohm
32d2e5fc5f Polishing.
Related ticket GH-2937.
2024-08-28 22:15:04 +02:00
Oliver Drotbohm
480aa52d1b ProxyHandlerMethodArgumentResolver now avoids matching parameters annotated with Spring annotation.
We now explicitly do not match handler method parameters that are annotated with anything but @ModelAttribute or @ProjectedPayload. This prevents us accidentally opting into parameter handling for annotated parameters that use interfaces for their declaration and are supposed to be handled by some other infrastructure.

Fixes GH-2937.
2024-08-28 22:14:46 +02:00
Oliver Drotbohm
a9fd0d0377 Polishing.
Related ticket GH-3054.
2024-08-27 12:50:44 +02:00
Yanming Zhou
e074fcc2dd Avoid registering a SpringDataWebSettings bean by default.
We now refrain from registering a SpringDataWebSettings instance as bean in the ApplicationContext if @EnableSpringDataWebSupport is used without an explicit declaration of pageSerializationMode. This allows Spring Boot to use the annotation, but allow the attribute value to be configured via a property at the same time.

See https://github.com/spring-projects/spring-boot/pull/39797#discussion_r1508396169 for details.

Fixes GH-3054.
2024-08-27 12:50:29 +02:00
Mark Paluch
e994f6b60f Update GitHub Actions.
See #3098
2024-08-21 09:28:21 +02:00
Kuyho Chung
98c22d09aa Corrected the definition of coroutines.
Closes #3136
2024-08-15 14:21:04 +02:00
Oliver Drotbohm
ecc40056c0 Avoid affecting serialization of custom Page implementations in legacy mode.
Registering a StdConverter with Jackson to log a warning  about the Page serialization mode causes the target serializer to be only built for Page losing additional properties defined on extensions. We now instead register a no-op BeanSerializerModifier that issues the warning and doesn't affect the serializer selection.

Fixes GH-3137.
2024-08-15 08:38:21 +02:00
Christoph Strobl
2cc8d04c92 Update code snippet in documentation.
Original Pull Request: #3093
2024-08-08 13:52:55 +02:00
Mark Paluch
22fa3c6506 Polishing.
Refine grammar, line breaks, typos.

Original Pull Request: #3093
2024-08-08 13:51:48 +02:00
Christoph Strobl
3b667b90be Update documentation and fix nullable annotations.
Original Pull Request: #3093
2024-08-08 13:50:52 +02:00
Mark Paluch
658c04d00e Rename RepositoryMethodMetadata and move it to an interceptor.
Rename RepositoryMethodMetadata to RepositoryMethodContext.
Add flags to enable method metadata exposure.

See: #3090
Original Pull Request: #3093
2024-08-08 13:49:06 +02:00
Christoph Strobl
647d9fd949 Provide RepositoryMethodMetadata during method invocation.
Provide context during repository method invocation to potential consumers.

See: #3090
Original Pull Request: #3093
2024-08-08 13:46:55 +02:00
Mark Paluch
4df7a164e9 Consider fragments and repository contributions via spring.factories.
Closes: #3090
Original Pull Request: #3093
2024-08-08 13:45:01 +02:00
Mark Paluch
201657e78a Polishing.
Update javadoc and fix formatting.

Original Pull Request: #3093
2024-08-08 13:44:05 +02:00
Mark Paluch
b6262b212e Upgrade to Maven Wrapper 3.9.8.
See #3134
2024-08-08 10:22:00 +02:00
Mark Paluch
43e0dc1da1 Update CI properties.
See #3098
2024-08-08 10:20:10 +02:00
Mark Paluch
1cdfb2e533 Fix KotlinCopyMethod detection for single-association property classes.
KotlinCopyMethod.shouldUsePublicCopyMethod(…) now considers single-association arrangements. Also, the method now early exists if pre-conditions aren't met.

Closes #3131
2024-08-06 15:14:35 +02:00
Oliver Drotbohm
0ba3937617 Explicitly reject invalid aggregate event registrations during publishing.
We now detect that the consumption of the events published during a persistence operation has produced new event instances that would go unpublished and raise an explaining exception. Previously such a scenario would've resulted in a ConcurrentModificationException.

We primarily reject such a scenario as handling the additional event would extend our convenience mechanism over the publishing scope a direct 1:1 replacement with ApplicationEventPublisher would've achieved.

Fixes GH-3116.
2024-08-06 09:02:18 +02:00
Christoph Strobl
1f347dce69 Add missing native image runtime hints for Jackson Page serialization.
Closes #3117
Original pull request: #3119
2024-08-05 14:53:03 +02:00
Eric Haag
d5608934b7 Migrate build to Spring Develocity Conventions extension.
* Migrate build to Spring Develocity Conventions extension.

* Adopt Develocity environment variables.

Closes #3130
2024-08-01 11:45:49 +02:00