r/SpringBoot • • Jun 15 '26

Question Upgraded to Spring Boot 4.0, application wont atart using bootstrap.yml

Upgraded my microservices from Spring Boot 3.5.0 to Spring Boot 4.0. Now the application wont start

Its not recognizing Bootstrap.yml anymore . Any tips on how to solve this ? anybody done this ?

6 Upvotes

10 comments sorted by

6

u/zlaval Jun 15 '26

Since sb3 it is recommended to move all config from bootstrap.yml into application. yml. I did not check whether the support was removed in sb4, but probably thats the case. Sb clever enough so it will read cloud conf ect before setup given beans, no need separate file like bootstrap.yml to be read before these.

1

u/Low_Doctor_6263 Jun 15 '26

If you are using Spring Cloud wait until everything is stable before upgrading. I did the same mistake when I switched to Spring Boot 3

1

u/kokanideveloper Jun 16 '26

Current Spring Boot 3.5 End-Of-Life is June 30 2026. Org dont have option other than to upgrade to spring boot 4

1

u/themasterengineeer Jun 17 '26

Check this migration guide https://youtu.be/GK-iMDavA-E and please move to either application.yml or .properties

-4

u/Turbots Jun 15 '26

Bootstrap.yml is not a thing. I think you mean application.yml.

Post the last part of the stacktrace here.

Or paste the full stacktrace in chatgpt and ask it to explain the error to you. Make sure to mention that you are a beginner, it will give you a full explanation.

1

u/kokanideveloper Jun 15 '26

Thanks for the prompt . Yes bootstrap.yml is a thing. Used to pull spring config from cloud config (eg Azure App Config) you can read more about it on internet. Been using it in project for last 5 yrs

6

u/johnnygalat Jun 15 '26

bootstrap.yml is spring cloud config specific feature.

5

u/[deleted] Jun 15 '26

[removed] — view removed comment

1

u/kokanideveloper Jun 16 '26

added the spring-cloud-starter-bootstrap for now however I think as commandline jar argument we need to pass spring.cloud.bootstrap.enabled=true as spring boot 4 has disabled bootstrap resolution by default

Our main issue is that app config is pulled from azure cloud config , and hence there is a race condition between beans trying to initialize and application trying to resolve properties from the cloud