This commit drops support for projections if a parameter (or the parameter type)
is not explicitly annotated with `@ProjectedPayload`. A warning is still logged
in these cases to help user understand why the parameter is not being projected.
Also, simplify tests.
Closes#3301
Original pull request: #3453
Related ticket: #3298
Kotlin 2 now no longer implements serializable lambdas for SAM bridging through Java's writeReplace mechanism producing SerializedLambda but rather through a SAM class that captures the function object we're looking for.
Also, skip intrinsics calls when introspecting Kotlin classfiles.
Also, use ReflectJvmMapping instead of internal KPropertyImpl types as these will be removed with Kotlin 2.3.
Closes#3451
Remove MethodParameter.initParameterNameDiscovery(…) calls using DefaultParameterNameDiscoverer as MethodParameter uses the shared DefaultParameterNameDiscoverer instance already.
See #3431
Original pull request: #3432
We now deferr input properties lookup to avoid eager parameter introspection and therefore potentially logging of missing property names even in case these are not required.
Also, introduce isDtoProjection() and isInterfaceProjection() methods to simplify calling code typically introspecting ReturnedType.getReturnType().isInterface().
Closes#3410
Restoring bean registration while keeping the optional nature of AuditorAware in the Reactive-/AuditingHandler.
The changes done previously caused AOT code generation to fail with:
org.springframework.aot.generate.UnsupportedTypeValueCodeGenerationException: Code generation does not support org.springframework.beans.factory.config.AutowiredPropertyMarker
See: #3177
Our domain types Sort and ExampleMatcher were designed to use property paths forming a conceptual cycle between the mapping and domain package.
By moving PropertyPath support and related types (TypeInformation, wrapper and collection infrastructure) into a newly created core package we're resolving the design cycles resulting in an improved design reflecting the actual intended dependencies.
Types moved from org.springframework.data.mapping to org.springframework.data.core:
* PropertyPath
* PropertyReferenceException
Types moved from org.springframework.data.util to org.springframework.data.core:
* CustomCollections and CustomCollectionRegistrar
* NullableWrapper
* NullableWrapperConverters
* ReactiveWrappers
* TypeInformation
Closes#3393
Use autowired properties for AuditorAware and DateTimeProvider when explicit references are not provided
Closes: #3177
Original pull request: #3385
Signed-off-by: JaeYeon Kim <ghgh415263@naver.com>
Attempt two-pass constructor detection in KotlinInstantiationDelegate to detect private constructors that are not synthetic ones.
See #3389
Original pull request: #3390
Add two test cases to demonstrate a bug in Kotlin constructor resolution when dealing with private constructors.
Closes#3389
Original pull request: #3390
Signed-off-by: Edward Poot <edwardmp@gmail.com>
Make sure to use the raw type or java.lang.Object for unresolvable generic method parameters while retaining the type variable in the method signature.
See: #3374
Decouple RepositoryRegistrationAotContribution and RepositoryRegistrationAotProcessor, introduce support class for AotRepositoryContext implementations to better protect AotRepositoryContext implementations from changes to AotContext.
Remove contribute method from AotTypeConfiguration and move contribution code to AotContext.
Deprecate introspection methods for removal with only a single use in Commons and no usage in other modules.
Add more fine-grained customization hooks to RepositoryRegistrationAotProcessor and remove superfluous context objects that aren't necessary in their context.
Closes: #3267
Original Pull Request: #3367
Add tests, refine API contracts and reflect it in the documentation, remove methods that seem useful but are rather polluting the API.
Original Pull Request: #3357
Add opinionated builders for return statements and invocations, add introspection type for MethodReturns to reduce checks for e.g. `Optional` and `void` and utilities to construct type names.
Closes: #3357
Throw MappingException referring to the entity type for easier debugging of the property creation chain.
Add exclusion for properties starting with $$_ (synthetic Hibernate fields). Exclude java.util and javax types from AOT entity processing as well as arrays.
See #2595
Original Pull Request: #3318
Move off TypeReference for known and loaded classes for easier handling. Introduce configuration for enabled and include/exclude filters. Refactor configuration to functional style.
Original Pull Request: #3318
We now pre-initialize ClassGeneratingPropertyAccessorFactory and ClassGeneratingEntityInstantiator infrastructure to generate bytecode for their respective classes so that we include the generated code for the target AOT package. Also, we check for presence of these types to conditionally load generated classes if these are on the classpath.
This change required a stable class name therefore, we're hashing the fully-qualified class name and have aligned the class name from _Accessor to __Accessor (two underscores instead of one, same for Instantiator).
Closes: #2595
Original Pull Request: #3318
Prior to this change regenerating repository instances for eg. test execution caused trouble when trying to override existing json metadata files. We now back off in case of existing files and added an explicit config flag for users to opt out of having the metadata file being present in the target resources.
Original pull request: #3355Closes#3354