application.properties配置文件格式如下
server.port=8080 //端口号
server.servlet.context.path=/hello //虚拟路径
application.yml配置文件格式如下
目前我们更喜欢这种,因为其优点在于:层次清晰、关注数据。
server:
port: 8080 //端口号
servlet:
context.path: /hello //虚拟路径