• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Paul Clapham
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
  • Piet Souris
  • salvin francis
  • fred rosenberger

Reload external .yml file in spring boot

Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I need to reload the external .yml file in Spring Boot.

I able to achieve this from .properties file by following example.


I am not able to achieve this with .yml file.

Could anyone can help on this.
Ranch Foreman
Posts: 1903
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you are talking about running the MyApplication under yaml directory, you need to specify an active profile.
In IntelliJ, click "Run" , select "edit configuration". In the VM options, put  -Dspring.profiles.active=prod .
Then, you will be able to load the properties from the application.yml.
edit configuration screen shot
edit configuration screen shot
We find this kind of rampant individuality very disturbing. But not this tiny ad:
Devious Experiments for a Truly Passive Greenhouse!
    Bookmark Topic Watch Topic
  • New Topic