我已经看到了不同的属性分隔符:=找不到有关它的参考。
1 回答
In application.properties
you can specify properties in either of these forms:
Using
=
:key=value
Using
:
key: value
All examples in the Spring docs for application.properties
use =
as the delimiter. But Java properties also supports :
so by extension Spring (which is utilising java.util.Properties
under the hood also supports :
. Here's the relevant extract from the java.util.Properties
Javadoc ...
The key contains all of the characters in the line starting with the first non-white space character and up to, but not including, the first unescaped '=', ':', or white space character other than a line terminator.