Skip to content

AOT-generated code for a FactoryBean should have a better location #28812

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
snicoll opened this issue Jul 13, 2022 · 0 comments
Closed

AOT-generated code for a FactoryBean should have a better location #28812

snicoll opened this issue Jul 13, 2022 · 0 comments
Assignees
Labels
theme: aot An issue related to Ahead-of-time processing type: enhancement A general enhancement
Milestone

Comments

@snicoll
Copy link
Member

snicoll commented Jul 13, 2022

Consider a BeanDefinition with a FactoryBean that is registered programmatically. As it doesn't have a factory method, the code currently uses the target type's package to generate the code.

This does not work very well for FactoryBean target types, that are intermediate layers and should not be considered as a good target location for such a code. Perhaps BeanRegistrationCodeFragments#getTarget could have a check to see if the target type is such a factory bean?

See also #28809

@snicoll snicoll added type: enhancement A general enhancement theme: aot An issue related to Ahead-of-time processing labels Jul 13, 2022
@snicoll snicoll added this to the 6.0.0-M6 milestone Jul 13, 2022
@snicoll snicoll self-assigned this Jul 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
theme: aot An issue related to Ahead-of-time processing type: enhancement A general enhancement
Projects
None yet
Development

No branches or pull requests

1 participant