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

Set spring.application.name in application.properties #133

Closed
snicoll opened this issue Feb 2, 2017 · 11 comments
Closed

Set spring.application.name in application.properties #133

snicoll opened this issue Feb 2, 2017 · 11 comments
Assignees

Comments

@snicoll
Copy link
Contributor

snicoll commented Feb 2, 2017

No description provided.

@snicoll snicoll transferred this issue from spring-io/initializr May 28, 2019
@snicoll
Copy link
Contributor Author

snicoll commented May 28, 2019

@OlgaMaciaszek do you think this is still applicable? I remember that using the artifactId as a default value for this property was a good think. I wonder though if Spring Cloud at large is affected or only a specify subset of modules?

@snicoll snicoll added the status: waiting-for-feedback We need additional information before we can continue label May 28, 2019
@OlgaMaciaszek
Copy link
Contributor

Makes sense to me. It's used for bootstrapping when working with SC Config and also for service discovery.

@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 12, 2019
@mhalbritter mhalbritter changed the title Set spring.application.name when Spring Cloud is used Set spring.application.name when Spring Cloud is used Feb 9, 2024
@mhalbritter mhalbritter added type: enhancement and removed status: feedback-provided Feedback has been provided labels Feb 9, 2024
@mhalbritter
Copy link
Contributor

I wonder if we should set that by default for every application. Some components, unrelated to Cloud, make use of that application name, e.g. the distributed tracing or the log correlation feature.

@jonatan-ivanov
Copy link

Always setting it would make sense to me, e.g.: reusing the name field from the project metadata section.

@OlgaMaciaszek
Copy link
Contributor

One of the things to keep in mind is that we were planning this for a major release. At this point we have a default when that is missing, so in order to avoid lack of compatibility, it should go along with a Cloud major.

@spencergibb
Copy link
Contributor

@mhalbritter I believe it would be ok in a minor. This is just setting a property, not changing an API. If a user wants the previous behavior, they can delete the property. Maybe we could schedule this to coincide with the 2024.0 Spring Cloud release train Q4 2024 compatible with boot 3.4?

@mhalbritter
Copy link
Contributor

I'll bring it up in our next meeting and let you know what we decided. Thanks for all the input!

@mhalbritter
Copy link
Contributor

@OlgaMaciaszek @spencergibb I don't quite understand what is needed on cloud side for this to work.

My plan is to always add the spring.application.name in the application.properties, regardless of selected dependencies. Are there any objections from your side?

@OlgaMaciaszek

One of the things to keep in mind is that we were planning this for a major release.

I don't understand what is "this" here?

@mhalbritter mhalbritter changed the title Set spring.application.name when Spring Cloud is used Set spring.application.name in application.properties Mar 6, 2024
@OlgaMaciaszek
Copy link
Contributor

Having that change added; but after more discussion in the team, we think it's ok to add this at any point.

@mhalbritter
Copy link
Contributor

Great, thanks!

@mhalbritter mhalbritter self-assigned this Mar 8, 2024
@mhalbritter
Copy link
Contributor

Done in d3e96c1.

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

6 participants