I'm trying to configure multiple '.yml' in spring boot like...
application.yml
spring:
profile: local
api.yml
spring:
profile: local
myapi:
url: localhost/...
So, I found locations method in @ConfigurationProperties. but, It was deprecated in 1.4.x
Deprecated. as of 1.4 in favor of configuring the environment directly with additional locations
How could I configuring this situation?
You can use spring.config.name
to change the configuration file names that will be looked for. Multiple names can be configured using a comma-separated list. In your case, you'd want to set it to application,api
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With