【SpringBoot】SpringBoot项目关于默认port以及context path的配置 application.yml

application.yml

server port 端口号

配置/修改默认端口号
yaml 复制代码
# server configuration
  server:
    port: 8080

context path 虚拟目录

配置/修改默认虚拟目录
yaml 复制代码
# server configuration
  server:
   servlet:
    context-path: /

spring configuration

yaml 复制代码
# spring configuration
spring:
  application:
    name: spring-boot-starter-web
    version: 1.0.0
    description: Spring Boot Starter Web
    author:
      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 at

              http://www.apache.org/licenses/LICENSE-2.0

          Unless required by applicable law or agreed to in writing, software
          
          
          
          
          distributed 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 and
          limitations under the License.

logging configuration

yaml 复制代码
# logging configuration
#logging:
#  level:
相关推荐
倔强的石头_6 分钟前
AI数据库是什么?我把金仓KES的库内三件套拆开看了一遍
后端
杨凯凡40 分钟前
Spring Boot 大文件下载如何实现断点续传?HTTP Range、206 与 416 实战
spring boot·后端·http
量化分析码农1 小时前
股票实时行情接口返回字段说明:单次请求的时间字段与数值类型
后端
apcipot_rain5 小时前
C++转Java日记(06)
java·开发语言
脚本自动化开发7 小时前
柔光屏平板怎么选?华为 MatePad Air Z 柔光版学
后端
程序猿DD8 小时前
OctaFuse 2.19.0:重做管理后台界面与交互,模型目录同步更新
后端
金銀銅鐵9 小时前
带您看懂字节码指令(一):一帧里有什么
java·后端·ai编程
码事漫谈10 小时前
Agent 测评是什么?大白话讲一讲
后端