• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Liutauras Vilda
  • Paul Clapham
Sheriffs:
  • paul wheaton
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Piet Souris
Bartenders:
  • Mike London

Reload external .yml file in spring boot

 
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.

https://github.com/eugenp/tutorials/tree/master/spring-boot-modules/spring-boot-properties

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

Could anyone can help on this.
 
Bartender
Posts: 2266
13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
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.
runConfig.JPG
edit configuration screen shot
edit configuration screen shot
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic