Commit Graph

2124 Commits

Author SHA1 Message Date
Mark Paluch
a8a67c3c01 Polishing.
Remove unnecessary static keywords.

See #3178
2024-10-17 15:26:27 +02:00
serv-inc
a84821f2a4 Fix typo in EnableSpringDataWebSupport.
Closes #3178
2024-10-17 15:26:27 +02:00
Mark Paluch
4518779232 Polishing.
Add DDD context. Explain identifier to domain object relationship. Tweak wording.

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

Closes #3173
Original pull request: #3174
2024-10-17 15:23:14 +02:00
Hosam Aly
2aaa809b64 Fix typo in query-methods-details.adoc.
Fix a typo: Priced => Product

Closes #3172
2024-10-14 08:49:57 +02:00
imcb
3b29a2ba6f Fix typo in definition.adoc.
Closes #3147
2024-10-11 10:39:36 +02:00
Christoph Strobl
ca462e733e 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:38:18 +02:00
Mark Paluch
fb978b8220 Polishing.
See #3167
2024-09-30 09:31:31 +02:00
Mark Paluch
4ada6b9aaa Introduce BasicPropertyDescriptor to KotlinBeanInfoFactory to bypass early property type validation.
Closes #3167
2024-09-30 09:31:30 +02:00
Tran Ngoc Nhan
4645ac3b97 Polishing.
Add missing Override annotations. Use instanceof pattern variables, use diamond operator where possible.

Closes #3162
2024-09-26 11:27:59 +02:00
Mark Paluch
f065f405f8 Polishing.
See #3160
2024-09-26 10:59:55 +02:00
Mikhail2048
15afbff9e0 Added Lazy wrapper for ReturnType#isDto.
Closes #3160
2024-09-26 10:59:55 +02:00
Mark Paluch
7ff224b350 Consider projections without input properties open ones.
Closes #3164
2024-09-25 09:58:58 +02:00
Mark Paluch
d8c8054a41 Polishing.
Add missing Override annotations. Eagerly compute input properties.

See #3163
2024-09-24 16:04:48 +02:00
Mark Paluch
14eb7beb58 Expose ReturnedType factory method.
Closes #3163
2024-09-24 15:59:32 +02:00
Jens Schauder
1d96d57342 Prepare 3.3.4 (2024.0.4).
See #3139
2024-09-13 11:36:34 +02:00
Mark Paluch
e3c9b01827 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:48 +02:00
Mark Paluch
53dfd0263f Split projections document fragment into multiple subfragments.
Closes #3144
2024-08-29 09:58:34 +02:00
Oliver Drotbohm
7721c6eadd Polishing.
Related ticket GH-2937.
2024-08-28 22:24:24 +02:00
Oliver Drotbohm
5619b7d2c3 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:24:20 +02:00
Oliver Drotbohm
d50d9b6263 Polishing.
Related ticket GH-3054.
2024-08-27 12:52:17 +02:00
Yanming Zhou
e70532770f 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:52:02 +02:00
Jens Schauder
615a01e340 Prepare 3.3.3 (2024.0.3).
See #3123
2024-08-16 10:05:38 +02:00
Kuyho Chung
9f42a3a963 Corrected the definition of coroutines.
Closes #3136
2024-08-15 14:21:33 +02:00
Oliver Drotbohm
619ccd4c4a 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:38 +02:00
Mark Paluch
5ddede10b0 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:25 +02:00
Oliver Drotbohm
a9767599c5 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:03:15 +02:00
Christoph Strobl
ce62224c17 Add missing native image runtime hints for Jackson Page serialization.
Closes #3117
Original pull request: #3119
2024-08-05 14:53:22 +02:00
Christoph Strobl
9343f31fb9 Fix property lookup for projections on Kotlin types.
This commit makes sure to use the target objects method to determine the property used for the projection.

Closes: #3127
Original pull request: #3129
2024-08-01 11:43:37 +02:00
Mark Paluch
9804c75893 Bundle Javadoc with Antora documentation site.
Closes #3128
2024-07-31 09:27:20 +02:00
Mark Paluch
24f8d90b92 Revise Repositories initialization.
We now no longer declare cacheRepositoryFactory as synchronized to avoid locking. Additionally, simplify the flow and reuse computed values as much as possible.

Closes #3126
2024-07-26 10:35:32 +02:00
Mark Paluch
b6d38255b4 Polishing.
Simplify assertions.

See #3125
2024-07-23 11:35:27 +02:00
Mark Paluch
de4013a4c5 Consider declaring class when evaluating method return type for query method post-processing.
We now consider the declaring class to properly resolve type variable references for the result post-processing of a query method result.

Previously, we attempted to resolve the return type without considering the actual repository class resolving always Object instead of the type parameter.

Closes #3125
2024-07-23 11:35:27 +02:00
Jens Schauder
982112cd12 Prepare 3.3.2 (2024.0.2).
See #3107
2024-07-12 19:09:00 +02:00
Mark Paluch
05dcd72904 Filter delegated properties for Kotlin data classes.
We now filter delegated properties (such as lazy) from being managed as persistent properties.

Closes #3112
2024-06-24 11:49:10 +02:00
Mark Paluch
82e810423c Ignore getters for Kotlin types deviating from Java Beans spec.
We now ignore Kotlin getters that are either static methods or would require additional arguments.

Closes #3109
2024-06-18 11:35:34 +02:00
Mark Paluch
23439bf9c4 Prepare 3.3.1 (2024.0.1).
See #3097
2024-06-14 10:45:23 +02:00
Mark Paluch
146b352f64 Populate DTO projection properties that are considered associations.
We now populate DTO properties whose are identified as associations. While uncommon, as typically entities declare assocations using entities, associations can be identified as types and so these are now considered when populating properties.

Closes #3104
2024-06-10 14:58:17 +02:00
Oliver Drotbohm
d748e866d0 Use legacy page serialization mode if no SpringDataWebSettings are present.
Fixes GH-3101.
2024-05-30 23:41:49 +02:00
Mark Paluch
147f46d940 Prepare 3.3 GA (2024.0.0).
See #3079
2024-05-17 11:49:10 +02:00
Oliver Drotbohm
b09c503480 Polishing.
Ternary ifs and less nesting.

Related: GH-3094
Original pull request: GH-2865
2024-05-14 11:38:36 +02:00
Yanming Zhou
ae76d08403 Use Pageable.unpaged(sort) for sorted unpaged pageable.
The (Reactive)PageableHandlerMethodArgumentResolver now falls back to a unpaged Pageable instance with a resolved sort if the the resolved Pageable is unpaged.

Fixes: GH-3094
Original pull request: GH-2865
2024-05-14 11:38:04 +02:00
Alessandro Rubino
c2a475b42c Update links to direct section links.
Closes #3095
2024-05-14 09:54:43 +02:00
Mark Paluch
2f43bd593e Limit generics length to declared length.
Also, rename method to reflect what it actually returns.
Document generic usage constraints in RepositoryFactoryBeanSupport subclasses.

Closes #3089
2024-05-08 09:54:09 +02:00
Mark Paluch
18d31ec61d Document how projection types relate to the entity type hierarchy.
Closes #3092
2024-05-07 15:17:43 +02:00
Mark Paluch
b1a5fc460b Apply Kotlin Value Class unboxing to generated Property Accessors.
Unwrap wrapped value types if necessary when using generated property accessors.

Closes #3087
2024-04-29 09:12:57 +02:00
Mark Paluch
00d03c595b Polishing.
Add missing Javadoc and Serial annotations. Simplify code.

See #3081
2024-04-24 09:38:51 +02:00
Jan Kurella
7bac883930 Avoid NullPointerException´ and IllegalArgumentException for control flow in Sort`.
Checking for null explicitly is cheap and prevents two unnecessary Exception
objects creations.

Closes #3081
2024-04-24 09:38:15 +02:00
Mark Paluch
027b8c2ad2 Fix StackOverflowError in TypeDiscoverer comparison.
We now resort to String-based comparison if a generic cannot be resolved. Previously, unresolved generics caused an infinite recursion.

Closes #3084
2024-04-23 10:17:53 +02:00
Alexander Münch
2f9427a94b Fix typo in object-mapping.adoc.
Closes #3076
2024-04-15 15:15:16 +02:00