在application.properties中配置
server.port=8081
在application.yml中配置
server.port=8082
在application.yaml中配置
server.port=8083
同时存在则port为8081
如果只存在yml和yaml,则port为8082
总结:
优先级为:properties > yml > yaml
server.port=8081
server.port=8082
server.port=8083
同时存在则port为8081
如果只存在yml和yaml,则port为8082
优先级为:properties > yml > yaml

被折叠的 条评论
为什么被折叠?