SpringBoot系列外部配置用法简介

网友投稿 927 2025-04-02

springboot系列之外部配置用法简介


引用springboot官方文档的说法,官方文档总共列举了如下用法:

1、Devtools global settings properties on your home directory (~/.spring-boot-devtools.properties when devtools is active).

2、@TestPropertySource annotations on your tests.

3、properties attribute on your tests. Available on @SpringBootTest and the test annotations for testing a particular slice of your application.

4、Command line arguments.

5、Properties from SPRING_APPLICATION_JSON (inline JSON embedded in an environment variable or system property).

6、ServletConfig init parameters.

7、ServletContext init parameters.

8、JNDI attributes from java:comp/env.

9、Java System properties (System.getProperties()).

SpringBoot系列之外部配置用法简介

10、OS environment variables.

11、A RandomValuePropertySource that has properties only in random.*.

12、Profile-specific application properties outside of your packaged jar (application-{profile}.properties and YAM

Spring Boot

版权声明:本文内容由网络用户投稿,版权归原作者所有,本站不拥有其著作权,亦不承担相应法律责任。如果您发现本站中有涉嫌抄袭或描述失实的内容,请联系我们jiasou666@gmail.com 处理,核实后本网站将在24小时内删除侵权内容。

版权声明:本文内容由网络用户投稿,版权归原作者所有,本站不拥有其著作权,亦不承担相应法律责任。如果您发现本站中有涉嫌抄袭或描述失实的内容,请联系我们jiasou666@gmail.com 处理,核实后本网站将在24小时内删除侵权内容。

上一篇:预览版的Office Android平板版虽然功能不全,但发展前景非常好(预览版下载)
下一篇:excel没保存(excel没保存重启了怎么恢复)
相关文章