3

I have a very large application.yml file. Also, there are business and tech properties are close together.

I want to split this properties to different files, such as: "application.yml", "domain.yml", "restrictions.yml" and so on.

How can I tell spring to use an exact properties file in my Config.java bean? I'm telling exactly about ".yml" extension, cause ".properties" works fine.

Pospolita Nikita
  • 635
  • 5
  • 15
  • Possible duplicate of [Spring Boot and multiple external configuration files](https://stackoverflow.com/questions/25855795/spring-boot-and-multiple-external-configuration-files) – Héctor Jun 25 '18 at 14:09
  • Possible duplicate of https://stackoverflow.com/questions/23134869/spring-boot-how-to-use-multiple-yml-files – Ramesh Jun 25 '18 at 14:12
  • You can put all the yaml files in a `config` subdirectory, all of them will be loaded. – zeronone Jun 25 '18 at 14:39

0 Answers0