java - external yaml property file and normal properties file in spring boot -


this how have set external configuration file

/** .yaml file @configuration @propertysource("classpath:waterlvl.yaml") @configurationproperties("alerts") public class waterlvlalertconfig {  /** .properties file @component @propertysource("classpath:waterlvl.properties") public class waterlvlconfig { 

properties not being picked up, , files inside resources file. think path i'm providing wrong.what doing wrong.

in spring boot @propertysource cannot used when using .yaml configuration. refer point 24.6.4 yaml shortcomings in externalized configuration documents. also, similar question answered earlier, refer - spring boot external configuration of property file


Comments

Popular posts from this blog

Is there a better way to structure post methods in Class Based Views -

reflection - How to access the object-members of an object declaration in kotlin -

php - Doctrine Query Builder Error on Join: [Syntax Error] line 0, col 87: Error: Expected Literal, got 'JOIN' -