Skip to content

Allow ApplicationContextAotGenerator to generated better class names #28565

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
philwebb opened this issue Jun 4, 2022 · 2 comments
Closed

Allow ApplicationContextAotGenerator to generated better class names #28565

philwebb opened this issue Jun 4, 2022 · 2 comments
Labels
theme: aot An issue related to Ahead-of-time processing type: enhancement A general enhancement
Milestone

Comments

@philwebb
Copy link
Member

philwebb commented Jun 4, 2022

Currently ApplicationContextAotGenerator always generates a __.BeanFactoryRegistrations class. For context hierarchy support we're going to need multiple registration classes so we should use different names. We'd also like to be able to provide a target class so that we can use a package other than __.

@philwebb philwebb added type: enhancement A general enhancement theme: aot An issue related to Ahead-of-time processing labels Jun 4, 2022
@philwebb philwebb added this to the 6.0.0-M5 milestone Jun 4, 2022
@philwebb philwebb changed the title Allow ApplicationContextAotGenerator to create better generated class names Allow ApplicationContextAotGenerator to generated better class names Jun 4, 2022
philwebb added a commit that referenced this issue Jun 4, 2022
Refine the class name logic so that the name is passed in rather
than using `ApplicationContext.getId()`. Also propagate the name
so that the generated classes use it.

See gh-28565
@snicoll
Copy link
Member

snicoll commented Jun 7, 2022

The default classname is still generated in that __ package. Is that expected? I was under the impression that this issue would move it at the same level as the application class itself.

@philwebb
Copy link
Member Author

philwebb commented Jun 7, 2022

We'll need to make some updates on the Boot side to pass the target in.

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

2 participants