-
Notifications
You must be signed in to change notification settings - Fork 38.7k
Description
Leonard Loesche opened SPR-13394 and commented
The Meta-Annotation for @RefreshScope
(as mentioned in the linked ticket) overwrites the default proxyMode (with ScopedProxyMode.TARGET_CLASS) which is unfortunately only working with an annotation at type level (with proxy mode resolution via ClassPathBeanDefinitionScanner
and a ScopeMetadataResolver
) but not for @Bean
annotated methods, which uses a different approach to resolve the proxyMode.
Even setting the proxyMode manually at the custom scope annotation does not help.
There is the 'workaround', not to use the meta annotation but the original @Scope
with correct proxyMode at the method, but it would be an improvement to have the same behaviour for the custom scope annotation on both sides.
Affects: 4.1.6, 4.2 GA
Reference URL: spring-cloud/spring-cloud-config#190
Attachments:
- scopedbeanissue.zip (80.10 kB)
Issue Links:
- Support custom base scope annotation type for @Bean methods [SPR-13280] #17870 Support custom base scope annotation type for
@Bean
methods
Referenced from: commits 75187e3, 3430f76
Backported to: 4.1.8