Home  >  Article  >  Java  >  How to make the configuration file take effect in springboot

How to make the configuration file take effect in springboot

王林
王林forward
2023-05-12 13:31:131747browse

How to make the configuration file take effect in springboot

There can be multiple configuration files in springboot. The configuration file can be a file ending in .properties or yml, and the configuration file has priority. The same type of configuration application.properties takes precedence. The level is relatively high, and different types of configurations will take effect at the same time.

How to make the configuration file take effect in springboot

How to make the configuration file take effect in springboot

You can also customize the configuration file and name it whatever you want, but the suffix must be as required! The background can also bind values ​​to properties through the @Value ("${key}") annotation;

The above is the detailed content of How to make the configuration file take effect in springboot. For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:yisu.com. If there is any infringement, please contact admin@php.cn delete