• 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 ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • salvin francis
  • fred rosenberger

Reload external .yml file in spring boot

 
Greenhorn
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.

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.
 
Ranch Foreman
Posts: 1903
12
  • Mark post as helpful
  • send pies
  • 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
 
We find this kind of rampant individuality very disturbing. But not this tiny ad:
Devious Experiments for a Truly Passive Greenhouse!
https://www.kickstarter.com/projects/paulwheaton/greenhouse-1
    Bookmark Topic Watch Topic
  • New Topic