From 3f144afaeea941ae61d8f3382c34f5555dc31330 Mon Sep 17 00:00:00 2001 From: qibaoguang Date: Sun, 8 Feb 2015 21:54:10 +0800 Subject: [PATCH] Update 23.2. Accessing command line properties.md --- .../23.2. Accessing command line properties.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/IV. Spring Boot features/23.2. Accessing command line properties.md b/IV. Spring Boot features/23.2. Accessing command line properties.md index e69de29..f2005f0 100644 --- a/IV. Spring Boot features/23.2. Accessing command line properties.md +++ b/IV. Spring Boot features/23.2. Accessing command line properties.md @@ -0,0 +1,5 @@ +### 23.2. 访问命令行属性 + +默认情况下,SpringApplication将任何可选的命令行参数(以'--'开头,比如,--server.port=9000)转化为property,并将其添加到Spring Environment中。如上所述,命令行属性总是优先于其他属性源。 + +如果你不想将命令行属性添加到Environment里,你可以使用SpringApplication.setAddCommandLineProperties(false)来禁止它们。