-
Notifications
You must be signed in to change notification settings - Fork 694
Include generated PersistentPropertyAccessorFactory
and EntityInstantiator
classes during AOT processing
#3318
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
+1,289
−226
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
646e077
to
6ac5cf8
Compare
…ityInstantiator classes. 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).
Update tests and add convenience API for registering configurations required to interact with certain types.
Move off TypeReference for known and loaded classes for easier handling. Introduce configuration for enabled and include/exclude filters. Refactor configuration to functional style. # Conflicts: # src/main/java/org/springframework/data/aot/AotContext.java # src/main/java/org/springframework/data/aot/AotMappingContext.java # src/main/java/org/springframework/data/aot/DefaultAotContext.java # src/main/java/org/springframework/data/aot/ManagedTypesBeanRegistrationAotProcessor.java # src/main/java/org/springframework/data/repository/config/RepositoryRegistrationAotContribution.java # src/main/java/org/springframework/data/repository/config/RepositoryRegistrationAotProcessor.java # src/test/java/org/springframework/data/aot/AotContextUnitTests.java
a313db7
to
35a0fed
Compare
35a0fed
to
4a9b9ab
Compare
Encapsulate config, add details about ant-path-style matching.
christophstrobl
pushed a commit
that referenced
this pull request
Sep 9, 2025
…ityInstantiator classes. 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
christophstrobl
pushed a commit
that referenced
this pull request
Sep 9, 2025
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
christophstrobl
added a commit
that referenced
this pull request
Sep 9, 2025
And fix some minor formatting issues. Original Pull Request: #3318
christophstrobl
pushed a commit
that referenced
this pull request
Sep 9, 2025
Encapsulate config, add details about ant-path-style matching. Original Pull Request: #3318
christophstrobl
added a commit
that referenced
this pull request
Sep 9, 2025
And fix some minor formatting issues. Original Pull Request: #3318 move
christophstrobl
pushed a commit
that referenced
this pull request
Sep 9, 2025
Encapsulate config, add details about ant-path-style matching. Original Pull Request: #3318
christophstrobl
added a commit
that referenced
this pull request
Sep 9, 2025
…types. Original Pull Request: #3318
PersistentPropertyAccessorFactory
and EntityInstantiator
classesPersistentPropertyAccessorFactory
and EntityInstantiator
classes during AOT processing
mp911de
added a commit
that referenced
this pull request
Sep 9, 2025
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
We now pre-initialize
ClassGeneratingPropertyAccessorFactory
andClassGeneratingEntityInstantiator
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