Commit Graph

23 Commits

Author SHA1 Message Date
Mark Paluch
14919995ad Extend license header copyright years to 2023.
See #2756
2023-01-02 09:53:28 +01:00
Christoph Strobl
016e8c2779 Register reflection hints for Querydsl Q types.
This commit introduced support for registering GraalVM native reflection type hints for Querydsl Q types that target domain types used in the repository interface declaration.

At this point we only do a simple lookup for Q types based in the very same package that implement EntityPath.
More advanced configuration (eg. base package and type prefix), potentially available via EntityPathResolver are not taken into account as this would require eager bean resolution from the application context, which is likely to trigger additional infrastructure. In this case the user is required to register Q types manually.

Closes: #2721
Original pull request: #2743.
2022-12-12 10:37:56 +01:00
Mark Paluch
6190baa3db Move ReactiveWrappers into o.s.d.util package.
ReactiveWrappers is not tied to repositories so it does not need to reside in the repository.util package. This utility is now located in the data.util package for a better module design and to prevent package cycles.

See #2708
2022-11-02 10:52:11 +01:00
Christoph Strobl
8d424855da Resolve package cycle between repository.config and repository.aot.
Closes #2708
2022-11-02 10:51:26 +01:00
Mark Paluch
103d41f7f4 Resolve package cycle between repository and aot packages.
Closes #2707
2022-10-11 11:44:45 +02:00
Mark Paluch
0fe04e37f8 Polishing.
Refine control flow.

See #2704
Original pull request: #2705.
2022-10-10 13:47:37 +02:00
Christoph Strobl
529f88cf4c Use explicit type declarations for generated code.
See #2704
Original pull request: #2705.
2022-10-10 13:47:32 +02:00
Christoph Strobl
1fde452ab9 Fix AOT code generation for managed types.
Closes #2704
Original pull request: #2705.
2022-10-10 13:47:12 +02:00
Christoph Strobl
c5e95c251b Follow API changes in Spring Framework.
Closes: #2698
See: spring-projects/spring-data-build#1809
2022-10-05 11:06:59 +02:00
Christoph Strobl
9e9ddbf334 Use BindingReflectionHintsRegistrar to add reflection hints on types.
Closes: #2683
Original pull request: #2684.
2022-10-05 09:02:31 +02:00
Mark Paluch
9c993e22f5 Polishing.
Reformat code and reorder methods according to visibility. Reduce type and method visibility where applicable.

See #2680
Original pull request: #2682.
2022-10-04 15:46:14 +02:00
Christoph Strobl
e7cc9a6104 Generate custom bean initialization code for types exposed via ManagedTypes during AOT.
We now replace ManagedTypes bean definitions with generated code that contain the discovered types to avoid class path scaning.

Closes: #2680
Original pull request: #2682.
2022-10-04 15:46:14 +02:00
Christoph Strobl
f157eff53c Remove usage of RuntimeHintsUtils & SynthesizedAnnotation.
Closes: #2685
2022-09-06 17:48:36 +02:00
Christoph Strobl
74e52612bf Use ManagedType BeanDefinition for AOT processing when possible.
We now try to read the types directly from the bean definition arguments first, before attempting to resolve the actual bean instance.
If resolving the bean fails, we currently only log an info message. This arrangement needs to be revisited.

See: #2593
2022-07-13 12:18:18 +02:00
Mark Paluch
9c3696d335 Polishing.
Improve factory methods. Integrate auditing hints in AuditingBeanRegistrationAotProcessor. Reduce visibility, improve naming.

Original Pull Request: #2624
2022-07-04 14:22:08 +02:00
John Blum
7aafe577e2 Simplify logic in SpringDataBeanFactoryInitializationAotProcessor.
Original Pull Request: #2624
2022-07-04 14:22:08 +02:00
Mark Paluch
e71f7c2bd6 Simplify field and method filter creation.
Update javadoc and reformat aot.factories.

Original Pull Request: #2624
2022-07-04 14:22:07 +02:00
Christoph Strobl
423edd21ea Use BeanRegistrationAotProcessor to provide hints for auditing.
This avoids having to touch modules to add something like ImportRuntimeHints(AuditingHints.ReactiveAuditingRuntimeHints.class) to the enabled auditing annotations.

Original Pull Request: #2624
2022-07-04 14:22:06 +02:00
Mark Paluch
0a423ac3f5 Open up AuditingBeanDefinitionRegistrarSupport.registerAuditHandlerBeanDefinition(…) to allow additional bean registrations.
Original Pull Request: #2624
2022-07-04 14:22:06 +02:00
Christoph Strobl
4e23153816 Move runtime hints into another package
Original Pull Request: #2624
2022-07-04 14:22:05 +02:00
Christoph Strobl
0262380d29 Add native image runtime hints.
We provide an initial set of runtime hints required to spin up data repositories on GraalVM native image.
Additionally we skip synthetic types during type inspection.

Original Pull Request: #2624
2022-07-04 14:22:04 +02:00
John Blum
d8118de90f Review, refactor and polish Spring Data AOT infrastructure classes.
* Refactored logic in AOT infrastructure classes.
* Annotated AOT API with Spring's @NonNull and @Nullable annotations.
* Edited Javadoc.
* Introduced PredicateUtils abstract utility class encapsulating common Predicates on types and class members.
* Added comments for review and clarification.

Original Pull Request: #2624
2022-07-04 14:22:04 +02:00
Christoph Strobl
21ff2a7e34 Introduce infrastructure for AOT processing of repository declarations
This commit introduces initial support for framework 6 bases ahead of time processing of data components and adds extension points for module implementations.

See: #2593
Original Pull Request: #2624
2022-07-04 14:22:03 +02:00