URL Original Answer
By default ,SpringApplication loads properties from application.properties files in the following locations and adds them to the Spring Environment:
- A
/configsubdirectory of the current directory - The current directory
- A classpath
/configpackage - The classpath root
As same as
file:./config/file:./classpath:/config/classpath:/
The list is ordered by precedence
classpath:/config/ and classpath:/ it`s ok , but when i put file in file:./config/ or file:./ . there are some problem happends
IDEA
When application.properties locate in resources or /resourece/config , it works
But if i put the application.properties in the subdirectory of the current directory or ./config it can not work
i do it just like doc says ,but it failed . so google ~~
the location file:./config/ and file:./ not means your idea folder it means below
when you use maven to package the project you can get a XXX.jar in targer
NEXT
NEXT