Repository navigation
GH-4103 - Use TypeScanner to scan for initial entities. - #5231
Open
masiljangajji wants to merge 3 commits into
Open
masiljangajji wants to merge 3 commits into
masiljangajji wants to merge 3 commits into
Conversation
Replace the manual ClassPathScanningCandidateComponentProvider loop in MongoConfigurationSupport.scanForEntities(String) with the store-agnostic TypeScanner abstraction that was introduced along with the AOT support, following AbstractR2dbcConfiguration, JdbcConfiguration and CassandraEntityClassScanner. Scanning semantics are retained. Both paths disable default filters and match through AnnotationTypeFilter considering meta-annotations while excluding interfaces. Added a characterization test covering directly annotated types, meta-annotated types and annotated interfaces. It passes against the previous implementation as well as the new one. scanForEntities(String) is a protected extension point, so the throws ClassNotFoundException declaration is retained to keep overriding code source compatible. Class loading failures keep failing fast by rethrowing through onClassNotFound(…), as TypeScanner would otherwise silently drop types that cannot be loaded. Closes: spring-projects#4103 Signed-off-by: masiljangajji <xmfpdlsj0508@gmail.com>
Signed-off-by: masiljangajji <xmfpdlsj0508@gmail.com>
This branch has not been deployed
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
MongoConfigurationSupport.scanForEntities(String)uses a manualClassPathScanningCandidateComponentProviderloop instead ofTypeScanner, which the R2DBC, JDBC and Cassandra modules already use. Class loading failures still fail fast throughonClassNotFound(...), now surfacing asIllegalStateExceptioninstead ofClassNotFoundException.Closes #4103