Skip to content

Detect annotations on @Bean methods when using @ServiceConnection#50033

Open
kwondh5217 wants to merge 1 commit intospring-projects:mainfrom
kwondh5217:fix/50011-service-connection-bean-method-annotations
Open

Detect annotations on @Bean methods when using @ServiceConnection#50033
kwondh5217 wants to merge 1 commit intospring-projects:mainfrom
kwondh5217:fix/50011-service-connection-bean-method-annotations

Conversation

@kwondh5217
Copy link
Copy Markdown
Contributor

Previously, annotations such as @Ssl placed on @Bean methods were not
detected when using @ServiceConnection, because
ServiceConnectionAutoConfigurationRegistrar only read annotations from
TestcontainerBeanDefinition instances and passed null for regular @Bean
method beans.

This commit fixes the issue by reading annotations from the resolved
factory method of the RootBeanDefinition when the bean is not a
TestcontainerBeanDefinition.

Closes gh-50011

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Apr 11, 2026
…tionRegistrar

Signed-off-by: Daeho Kwon <trewq231@naver.com>
@kwondh5217 kwondh5217 force-pushed the fix/50011-service-connection-bean-method-annotations branch from e9e911c to fd684d2 Compare April 11, 2026 18:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

status: waiting-for-triage An issue we've not yet triaged

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Annotations like @Ssl don't work on @Bean methods when using @ServiceConnection

2 participants