Skip to content

Investigate splitting configuration and auto-configuration #15738

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

Closed
philwebb opened this issue Jan 18, 2019 · 3 comments
Closed

Investigate splitting configuration and auto-configuration #15738

philwebb opened this issue Jan 18, 2019 · 3 comments
Labels
status: declined A suggestion or change that we don't feel we should currently apply

Comments

@philwebb
Copy link
Member

philwebb commented Jan 18, 2019

Currently spring-boot-autoconfigure contains quite a bit of code that would also be useful if manually configuring and application. For example, we have many *Properties classes and functions that map them. We should investigate if splitting out a spring-boot-configure module would be worthwhile.

This new module would be particularly useful for projects like https://github.com/spring-projects/spring-fu since it would allow them to call well designed public configuration APIs, rather than trying to work with the existing auto-configuration classes which were never really designed to be called directly.

@wilkinsona
Copy link
Member

wilkinsona commented Jan 28, 2019

The configure in the name of the module has been niggling me a little bit as the module won't configure anything in the @Configuration sense. Given that we've described Boot in the past as being convention-over-configuration, the way that I've now started thinking about it is that the new module will encapsulate Spring Boot's conventions and spring-boot-autoconfigure will become the module that automatically configures those conventions. That led me to wonder if the new modules should be called spring-boot-convention or spring-boot-conventions rather than spring-boot-configure. Convention could be used in class names for things like WebMvcConventions, AmqpConventions, etc and avoid overloading Configuration.

@snicoll
Copy link
Member

snicoll commented Jan 28, 2019

I like the WebMvcConventions part quite a lot!

@philwebb philwebb modified the milestones: 2.2.x, 2.x Apr 17, 2019
@philwebb philwebb added the status: on-hold We can't start working on this issue yet label Apr 17, 2019
@philwebb philwebb added the for: team-meeting An issue we'd like to discuss as a team to make progress label Sep 13, 2019
@bclozel bclozel removed this from the 2.x milestone Feb 20, 2020
@bclozel bclozel added status: waiting-for-triage An issue we've not yet triaged and removed status: pending-design-work Needs design work before any code can be developed type: enhancement A general enhancement status: on-hold We can't start working on this issue yet labels Feb 20, 2020
@wilkinsona
Copy link
Member

We don't think this is worth pursuing at this time. Splitting the code in this manner will roughly double the number of classes that are involved in auto-configuring a component. The costs of this (increased memory usage, slower startup time) will outweigh the benefits.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
status: declined A suggestion or change that we don't feel we should currently apply
Projects
None yet
Development

No branches or pull requests

4 participants