-
Notifications
You must be signed in to change notification settings - Fork 686
Move RepositoryMethodContext
to repository.core
package
#3176
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Conversation
...java/org/springframework/data/repository/config/RepositoryConfigurationExtensionSupport.java
Outdated
Show resolved
Hide resolved
520ee96
to
203074a
Compare
RepositoryConfigurationSource configurationSource) { | ||
|
||
// A proxy RepositoryMethodContext for dependency injection | ||
registerIfNotAlreadyRegistered( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instance supplier is not supported in AOT and will raise org.springframework.beans.factory.aot.AotBeanProcessingException
.
* | ||
* @return will never be {@literal null}. | ||
*/ | ||
public static RepositoryMethodContext getInjectionProxy() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we'll need additional native image proxy configuration for RepositoryMethodContext
.
203074a
to
3e80b97
Compare
RepositoryMethodContext
RepositoryMethodContext
to repository.core
package
RepositoryMethodContext are now made available for dependency injection via RepositoryConfigurationExtensionSupport.registerBeansForRoot(…). Moved RMC into repository.core package (previously repository.core.support) and only expose factory methods on DefaultRepositoryMethodContext. DRMC also exposes a injection proxy lookup method that creates a proxy equipped with a TargetSource delegating to DRMC.getInstance() (previously ….getContext()). An additional, static DRMC.forMethod(…) allows the creation of a default instance for testing purposes. Rename getRepository() to getMetadata() on RMC. Fixes GH-3175.
be34301
to
5cd4d5d
Compare
Avoid nullability in RepositoryMethodContextHolder.getContext(). Introduce shortcut in RepositoryMethodContext to obtain the current thread-local context. Update documentation.
RepositoryMethodContext are now made available for dependency injection via RepositoryConfigurationExtensionSupport.registerBeansForRoot(…). Moved RMC into repository.core package (previously repository.core.support) and only expose factory methods on DefaultRepositoryMethodContext. DRMC also exposes a injection proxy lookup method that creates a proxy equipped with a TargetSource delegating to DRMC.getInstance() (previously ….getContext()). An additional, static DRMC.forMethod(…) allows the creation of a default instance for testing purposes. Rename getRepository() to getMetadata() on RMC. Fixes #3175. Original pull request: #3176
Thank you for your contribution. That's merged and polished now. |
Details in the commit message.