Skip to content
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

Divide initializr-generator-spring into two modules, one for its API and one for its @Configuration classes #1283

Closed
EightMonth opened this issue Nov 18, 2021 · 10 comments

Comments

@EightMonth
Copy link

hi spring team
thanks for open source initializr, that's gold for me. the code style is so beautiful, the code design is so wonderful. Gives me a lot of learning space,thanks again.
but i have a issue.Is it possible to add @ConditionalOnMissingBean to the default project contributor.

my English is so poor, forgive me .
Best Regards
eightmonth

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Nov 18, 2021
@wilkinsona
Copy link
Contributor

If you don't want the defaults, have you considered not using the initializr-generator-spring module? If you'd lose too much taking that approach, perhaps you can describe what you'd like to be able to override.

@wilkinsona wilkinsona added the status: waiting-for-feedback We need additional information before we can continue label Nov 18, 2021
@EightMonth
Copy link
Author

thanks for reply

first the JavaProjectGenerationDefaultContributorsConfiguration.mainMethodContributor() default use SpringApplication as ApplicationStarter but I have extends class by SpringApplication. i want to replace it.

second the DefaultStarterBuildCustomizer. perhaps this is unnecessary without dependency

@spring-projects-issues spring-projects-issues added status: feedback-provided Feedback has been provided and removed status: waiting-for-feedback We need additional information before we can continue labels Nov 19, 2021
@wilkinsona
Copy link
Contributor

As currently implemented, we can't make mainMethodContributor @ConditionalOnMissingBean. Existing users may be defining their own MainApplicationTypeCustomizer that adds to the code created by the default customizer. If it was @ConditionalOnMissingBean that default customizer's code would be lost and the additions would no longer work.

As things stand, I think your best option is not to use initializr-generator-spring. Instead, you should just copy the parts of it that you want to use into your own codebase.

@EightMonth
Copy link
Author

Thanks for your advice

@wilkinsona
Copy link
Contributor

Something that we could do to help with this sort of requirement is to split the Spring module into two pieces. The first would provide all of the customisers and contributors and the second would provide the configuration classes that creates the default arrangement. Anyone wanting complete control could then use the first module on its own. This is somewhat analogous to Spring Boot's spring-boot-actuator and spring-boot-actuator-autoconfigure modules.

@wilkinsona wilkinsona reopened this Nov 22, 2021
@wilkinsona wilkinsona changed the title Please let dever can override all project contributor in spring module Divide initializr-generator-spring into two modules, one for its API and one for its @Configuration classes Nov 22, 2021
@wilkinsona wilkinsona added type: enhancement and removed status: feedback-provided Feedback has been provided status: waiting-for-triage An issue we've not yet triaged labels Nov 22, 2021
@EightMonth
Copy link
Author

if it can be implemented, it will be very welcome

@wilkinsona wilkinsona reopened this Oct 24, 2022
@snicoll snicoll reopened this Apr 21, 2023
@snicoll
Copy link
Contributor

snicoll commented Apr 21, 2023

@EightMonth please do not close this issue.

@EightMonth
Copy link
Author

If you do not wanna enhance the issue,please close it. the issue is opening two years!

@snicoll
Copy link
Contributor

snicoll commented Aug 8, 2023

Unfortunately, we don't have unlimited resources and we have to process issues based on priority. We've identified this issue as an improvement to the project but couldn't get to it yet.

@EightMonth
Copy link
Author

Unfortunately!i also do not want this keep stay in my issue list any more!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants