spring-boot icon indicating copy to clipboard operation
spring-boot copied to clipboard

Wildcard support for configuration files

Open huifer opened this issue 1 year ago • 1 comments

The configuration file in a springboot project has the following configuration files

  • application-tes.yaml
  • application-tesa.yaml
  • application-tess.yaml
  • bootstrap-tess.yaml Is it possible to make the spring.profiles.active parameter support wildcards and read all the above configuration files by configuring te*

huifer avatar Jan 03 '23 09:01 huifer

This should be addressed in the Spring Boot issue tracker.

sbrannen avatar Jan 31 '23 14:01 sbrannen

There's no concept of wildcards in Spring Framework's profile support. In other words, setting spring.profiles.active to te* would not result in the profiles tes, tesa, and tess being active. I think it would be confusing for a profile-specific configuration file, such as application-tes.yaml, to be loaded when its profile isn't actually active. Thanks anyway for the suggestion.

wilkinsona avatar Feb 01 '23 11:02 wilkinsona