本文主要是介绍【SpringBoot】SpringBoot项目关于默认port以及context path的配置 application.yml,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
application.yml
server port [端口号]
配置/修改默认端口号
# server configurationserver:port: 8080
context path [虚拟目录]
配置/修改默认虚拟目录
# server configurationserver:servlet:context-path: /
spring configuration
# spring configuration
spring:application:name: spring-boot-starter-webversion: 1.0.0description: Spring Boot Starter Webauthor:name: "Johan"email: "johan@johan.com"url: "https://johan.com"company: "Johan"company-url: "https://johan.com"license:name: "Apache License 2.0"url: "https://www.apache.org/licenses/LICENSE-2.0"copyright: "Copyright (c) 2021 Johan"copyright-year: "2021"copyright-holder: "Johan"copyright-holder-url: "https://johan.com"copyright-license: "Apache License 2.0"copyright-license-url: "https://www.apache.org/licenses/LICENSE-2.0"copyright-license-text: |Licensed under the Apache License, Version 2.0 (the "License");you may not use this file except in compliance with the License.You may obtain a copy of the License athttp://www.apache.org/licenses/LICENSE-2.0Unless required by applicable law or agreed to in writing, softwaredistributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions andlimitations under the License.
logging configuration
# logging configuration
#logging:
# level:
这篇关于【SpringBoot】SpringBoot项目关于默认port以及context path的配置 application.yml的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!