From 31d09ba977043ee3e03e0973ede12118fb41a0ff Mon Sep 17 00:00:00 2001 From: qibaoguang Date: Mon, 23 Mar 2015 23:50:04 +0800 Subject: [PATCH] Update 63.1. Externalize the configuration of SpringApplication.md --- ...3.1. Externalize the configuration of SpringApplication.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/IX. ‘How-to’ guides/63.1. Externalize the configuration of SpringApplication.md b/IX. ‘How-to’ guides/63.1. Externalize the configuration of SpringApplication.md index e69de29..3eece1a 100644 --- a/IX. ‘How-to’ guides/63.1. Externalize the configuration of SpringApplication.md +++ b/IX. ‘How-to’ guides/63.1. Externalize the configuration of SpringApplication.md @@ -0,0 +1,8 @@ +### 63.1. 外部化SpringApplication配置 + +SpringApplication已经被属性化(主要是setters),所以你可以在创建应用时使用它的Java API修改它的行为。或者你可以使用properties文件中的`spring.main.*`来外部化(在应用代码外配置)这些配置。比如,在`application.properties`中可能会有以下内容: +```java +spring.main.web_environment=false +spring.main.show_banner=false +``` +然后Spring Boot在启动时将不会显示banner,并且该应用也不是一个web应用。