【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:
相关推荐
云烟成雨TD4 分钟前
Spring AI Alibaba 1.x 系列【48】状态图编译配置类:CompileConfig 源码解析
java·人工智能·spring
计算机学姐23 分钟前
基于微信小程序的图书馆座位预约系统【uniapp+springboot+vue】
vue.js·spring boot·微信小程序·小程序·java-ee·uni-app·intellij-idea
贫民窟的勇敢爷们1 小时前
Java 与 Python 如何选型与融合
java·开发语言·python
小强19881 小时前
为什么你建了索引,查询还是很慢?常见失效原因汇总
后端
长大19881 小时前
MySQL 索引到底是什么?普通人也能看懂的通俗讲解
后端
小宇的天下1 小时前
Calibre DESIGNrev 单元(Cell)操作核心指南
java·前端·javascript
阿苟1 小时前
spring重点详解
java·后端·面试
身如柳絮随风扬2 小时前
MyBatis 与 Spring 中的设计模式
spring·设计模式·mybatis
Stream_Silver2 小时前
【JNA实战:Java无缝调用Windows API模拟键盘输入】
java·开发语言·windows
Sam_Deep_Thinking2 小时前
为什么选微服务而不是动态扩容单体
java·jvm·微服务