Commit Graph

2938 Commits

Author SHA1 Message Date
Mark Paluch e32b2668a1 Polishing.
Handle warnings. Remove redundant code in DefaultReactiveEntityCallbacks.

Original pull request: #3053
See #3055
2024-03-01 11:47:40 +01:00
mawen12 939c6143c1 Remove redundant code in DefaultEntityCallbacks#callback.
Original pull request: #3053
Closes #3055
2024-03-01 11:45:43 +01:00
Mark Paluch f7a1066143 Consider nested generics in TypeDiscoverer equality comparison.
We now compare nested generics wrapped into TypeInformation to consider type equality for deeply parametrized types.

Previously, we resolved type parameters to Class so Foo<List<String>> was considered equal to Foo<List<Map>> as the type parameter of the first nesting level was erased.

Closes #3051
2024-02-27 11:18:29 +01:00
Mark Paluch 047b6be83f Polishing.
Tiny naming tweaks.

See #3041
Original pull request: #3048
2024-02-21 14:19:51 +01:00
Christoph Strobl 9d73853244 Default generic type arguments when resolving KType from a Class.
We now fill up missing KTypeProjection arguments with star because the Kotlin Reflection.typeOf resolution fails if arguments are not provided.

Closes #3041
Original pull request: #3048
2024-02-21 14:19:51 +01:00
Mark Paluch 75728ac0be Fix Javadoc build.
Remove package-info for package without sources.

See #3045
2024-02-19 16:12:38 +01:00
Christoph Strobl 684f418fba After release cleanups.
See #2981
2024-02-16 14:41:25 +01:00
Christoph Strobl 1a11eba8d6 Prepare next development iteration.
See #2981
2024-02-16 14:41:23 +01:00
Christoph Strobl 033738e4be Release version 3.3 M1 (2024.0.0).
See #2981
3.3.0-M1
2024-02-16 14:37:37 +01:00
Christoph Strobl b90c8853cb Prepare 3.3 M1 (2024.0.0).
See #2981
2024-02-16 14:36:59 +01:00
Mark Paluch c02ff121d7 Force update on CI build.
See #2981
2024-02-16 09:46:17 +01:00
Mark Paluch 9563f637fd Document converter types supported by CustomConversions.
Closes #3040
2024-02-14 09:24:50 +01:00
Mark Paluch 67163d02e3 Evolve ValueExpressionParser.
Introduce literal, expression and placeholder variants. Add parser for composite expressions.

Closes #2369
Original pull request: #3036
2024-02-12 15:35:19 +01:00
Christoph Strobl 9f13e5450d Add support for Value Expressions.
We now support Value Expressions such as `#{1+1}-${spring.application.name:fallback-value}` that are composed of SpEL expressions, literals and Property Placeholders.

See #2369
Original pull request: #3036
2024-02-12 15:35:18 +01:00
Eric Haag 5ec3c609f6 Update Revved up by Develocity badge.
Closes #3032
2024-02-08 10:57:37 +01:00
Mark Paluch f6eacd208a Polishing.
Add additional tests, add Javadoc to explain isEnclosingClassParameter() behavior.

See #3038
Original pull request: #3039
2024-02-08 10:25:21 +01:00
Christoph Strobl 45b810a83c Use enclosing class constructor parameter only for non-static inner classes.
Closes #3038
Original pull request: #3039
2024-02-08 10:25:21 +01:00
Mark Paluch eb4b0b4309 Refine Artifactory build name.
See #2981
2024-01-31 15:10:19 +01:00
Mark Paluch 098d779177 Polishing.
Javadoc, static imports.

See #3033
Original pull request: #3034
2024-01-24 16:18:19 +01:00
Christoph Strobl 18386c8b40 Guard AOT registration of PageModule.
This commit makes sure to only register runtime hints for PageModule if Jackson is present.
Use newly introduced ClassPathExclusions instead of manually creating the ClassLoader.

Closes #3033
Original pull request: #3034
2024-01-24 16:18:17 +01:00
Mark Paluch 36d6a78ded Polishing.
Simplify test arrangement, remove tests testing framework functionality.

See #3028
2024-01-22 09:52:52 +01:00
Yanming Zhou b62bb535f1 Add more integration tests for PageSerializationMode configuration.
Closes #3028
2024-01-22 09:52:39 +01:00
Mark Paluch 09ea4426c5 Polishing.
Move hints into AOT package to align with other hints. Reduce visibility.

See: #3025
Original pull request: #3026
2024-01-22 09:22:02 +01:00
Christoph Strobl 3f2f013522 Add missing runtime hit for Unpaged required by PageModule.
The PageModule is loading the Unpaged type via its name which requires additional reflection configuration for native images.

Closes: #3025
Original pull request: #3026
2024-01-22 09:22:02 +01:00
Christoph Strobl 391ef3ea83 Polishing.
Remove unused imports.

See: #3025
Original pull request: #3026
2024-01-22 09:22:02 +01:00
Oliver Drotbohm fe885b3b9b Fixing Javadoc.
Related: GH-3024.
2024-01-12 21:49:50 +01:00
Oliver Drotbohm 2c0ef666fe Polishing.
Related GH-3023.
2024-01-12 21:49:50 +01:00
Oliver Drotbohm 12efa9ae78 Fix potential IllegalStateException in Limit.
Fixes GH-3023.
2024-01-12 21:49:50 +01:00
Oliver Drotbohm 5dd7b322b6 Support for simplified rendering of Page instances via PagedModel.
This commits all necessary infrastructure to produce simplified JSON representation rendering for Page instances to make sure the representations stay stable and do not expose unnecessary implementation details. The support consists of the following elements:

- PagedModel, a stripped down variant of the Spring HATEOAS counterpart to produce an equivalent JSON representation but without the hypermedia elements. This allows a gradual migration to Spring HATEOAS if needed. Page instances can be wrapped into PagedModel once and returned from controller methods to create the new, simplified JSON representation.

- @EnableSpringDataWeb support now contains a pageSerializationMode attribute set to an enum with two possible values: DIRECT, which is the default for backwards compatibility reasons. It serializes Page instances directly but issues a warning that either the newly introduced support here or the Spring HATEOAS support should be used to avoid accidentally breaking representations. The other value, VIA_DTO causes all PageImpl instances to be rendered being wrapped in a PagedModel automatically by registering a Jackson StdConverter applying the wrapping transparently.

Internally, the configuration of @EnableSpringDataWebSupport is translated into a bean definition of a newly introduced type SpringDataWebSettings and wired into the web configuration for consideration within a Jackson module, customizing the serialization for PageImpl.

Fixes GH-3024.
2024-01-12 21:49:50 +01:00
Oliver Drotbohm 4ebe9361ed Issue a warning log when serializing PageImpl to JSON directly.
We now issue a one-time warning log if Jackson gets handed a PageImpl to serialize as the Jackson structure might need to change for arbitrary other reasons.

Fixes GH-2987.
2024-01-12 21:49:49 +01:00
Oliver Drotbohm 3f14df6562 Fix broken serialization of Unpaged instances.
We now reinstantiate the serialization of Unpaged instances as plain INSTANCE strings as they were rendered before Unpaged was changed from an enum into a class.

Note, that we still strongly advise, not to serialize Page instances directly as it's a domain type, its Jackson-level surface is subject to change if we need to change the type's API for unrelated reasons.

Fixes: GH-2987.
2024-01-12 21:49:49 +01:00
Mark Paluch 989af7dcf7 Document Window<T> as a query return type.
Closes #3019
2024-01-11 14:19:01 +01:00
Mark Paluch 34b24a5c22 Consider enclosing class for dynamic projection parameter detection.
We now consider the enclosing class to determine correct generic typing.

Closes #3020
2024-01-11 11:04:46 +01:00
Mark Paluch 20d150f95e Polishing.
Add missing override annotations. Refactor TypeFilterFunction into function to avoid additional property references.
Move off deprecated code.

Closes #3016
2024-01-09 14:41:41 +01:00
Yanming Zhou ac967e2753 Remove unused code.
Closes #3002
2024-01-09 14:25:47 +01:00
Mark Paluch 98d265f91c Extend license header copyright years to 2024.
See #3015
2024-01-02 14:41:38 +01:00
Mark Paluch 565fc99596 Polishing.
Fix letter casing.

See #3006
Original pull request: #3007
2023-12-15 09:20:16 +01:00
Christoph Strobl d470c98877 Add Limit parameter to section in reference documentation.
Closes #3006
Original pull request: #3007
2023-12-15 09:20:09 +01:00
Mark Paluch 24151566d4 Resolve generics for Kotlin Value Boxing inspection.
To introspect value boxing rules, we now resolve Kotlin type parameters.

Closes #2986
2023-12-14 14:56:27 +01:00
Mark Paluch ff1abf0970 Polishing.
Use IdentityHashMap for parameter lookup.

See #3000
2023-12-14 14:35:32 +01:00
leeyohan93 e0cddb13f7 Enhance Kotlin Class Conversion by Minimizing Equals Comparisons.
Closes #3000
2023-12-14 14:35:31 +01:00
Mark Paluch 58ee0e6281 Update CI properties.
See #2981
2023-12-14 08:50:30 +01:00
Mark Paluch 3ad1b888b2 Upgrade to Maven Wrapper 3.9.6.
See #3005
2023-12-14 08:40:35 +01:00
Mark Paluch f3e92b0eba Polishing.
Fix Javadoc reference. Reorder tags.

See #2531
2023-12-13 08:46:19 +01:00
Oliver Drotbohm afc2ea80a3 Adapt SortHandlerMethodArgumentResolver after changes to sort parameter.
Since the introduction of 6e22ffd, the sort parameter has been rendered as composite parameter which will cause the comma used to delimit property from direction potentially be encoded by clients following the URI template RFC. Thus, we need to defensively decode the source parameter value before parsing.

Related ticket: GH-2531.
2023-12-12 22:09:06 +01:00
Rajesh Anthari ee64329267 Remove extra /api path segement in reference documentation.
Closes #2998
2023-12-11 10:33:37 +01:00
Mark Paluch d7732182ee Remove deprecated methods.
See #2996
Closes #2995
2023-12-08 11:06:10 +01:00
Mark Paluch bd05ed1dda Introduce ParametersSource to Parameters.
We now provide a ParametersSource object to create MethodParameter objects associated with the enclosing class so parameters can resolve generics properly.

Closes #2996
2023-12-08 11:04:54 +01:00
Oliver Drotbohm 0cf2538f97 Avoid records as cache keys for performance reasons.
Fixes GH-2997.
2023-12-05 14:17:11 +01:00
Julien Béti 6e22ffd103 Properly render sort variable variable as composite.
HateoasSortHandlerMethodArgumentResolver now renders the sort template variable as composite to properly indicate that it can be submitted multiple times.

Fixes GH-2531.
Original pull request GH-2945.
2023-12-01 21:26:03 +01:00