配置端口号:

  Spring boot 默认端口是8080,如果想要进行更改的话,

  需要修改applicatoin.properties文件,在配置文件中加入: server.port=8081

配置content-path:

  在application.properties进行配置:

  server.context-path=/spring-boot           访问地址就是http://ip:port/spring-boot

其他的server配置信息

#server.port=8080
#server.address= # bind to a specific NIC
#server.session-timeout= # session timeout in seconds
#the context path, defaults to '/'
#server.context-path=/spring-boot
#server.servlet-path= # the servlet path, defaults to '/'
#server.tomcat.access-log-pattern= # log pattern of the access log
#server.tomcat.access-log-enabled=false # is access logging enabled
#server.tomcat.protocol-header=x-forwarded-proto # ssl forward headers
#server.tomcat.remote-ip-header=x-forwarded-for
#server.tomcat.basedir=/tmp # base dir (usually not needed, defaults to tmp)
#server.tomcat.background-processor-delay=30; # in seconds
#server.tomcat.max-threads = 0 # number of threads in protocol handler
#server.tomcat.uri-encoding = UTF-8 # character encoding to use for URL decoding

转载于:https://www.cnblogs.com/kuangyefeige/p/9859210.html

Spring Boot 初体验(8)配置server信息相关推荐

  1. spring boot初体验(三)Spring AOP

    2019独角兽企业重金招聘Python工程师标准>>> 简介 什么是AOP,AOP用处: 在软件业,AOP为Aspect Oriented Programming的缩写,意为:面向切 ...

  2. Spring Security 初体验

    Spring Security 初体验 ①认证过滤器(登录) 用于接收前端用户登录信息(username和password)与数据库用户信息(通过UserDetailsService查询)就行判断. ...

  3. Spring Security 实战:Spring Boot 下的自动配置

    点击上方蓝色"程序猿DD",选择"设为星标" 回复"资源"获取独家整理的学习资料! 来源 | 公众号「码农小胖哥」 1. 前言 我们在前几篇 ...

  4. boot spring 接口接收数据_在 Spring Boot 中使用 Dataway 配置数据查询接口

    Dataway介绍 Dataway 是基于 DataQL 服务聚合能力,为应用提供的一个接口配置工具.使得使用者无需开发任何代码就配置一个满足需求的接口. 整个接口配置.测试.冒烟.发布.一站式都通过 ...

  5. spring boot通过命令行配置属性

    spring boot通过命令行配置属性 命令:java -jar xxx.jar --server.port=8888,通过使用–-server.port属性来设置xxx.jar应用的端口为8888 ...

  6. springboot 读取配置文件_使用 @ConfigurationProperties 在 Spring Boot 中加载配置

    本文地址: 使用 @ConfigurationProperties 在 Spring Boot 中加载配置 使用 Spring Boot 加载配置文件的配置非常便利,我们只需要使用一些注解配置一下就能 ...

  7. Spring Boot 2.0 的配置详解(图文教程)

    本文来自作者 泥瓦匠 @ bysocket.com 在 GitChat 上分享 「Spring Boot 2.0 的配置详解(图文教程)」 编辑 | 哈比 Spring Boot 配置,包括自动配置和 ...

  8. spring boot整合SpringSecurity-03 自定义报错信息

    spring boot整合SpringSecurity 目录 spring boot整合SpringSecurity-01入门 spring boot整合SpringSecurity-02 基于Ser ...

  9. Spring Boot 灵活实现自动配置背后的故事~用起来更香了

    最近一直忙着在做新应届生的员工技术培训和面试 ,培训的则是Spring Boot部分的内容,这部分也是面试常问的点,于是想到了各位读者大大,特地的把内容分享大家一份. 不知道大家第一次搭Spring ...

最新文章

  1. 构建神经网络前你需要先考虑这10件事
  2. 悟道·文澜详解:目前最大的中文多模态通用预训练模型
  3. ListView自动滚到底部
  4. IDEA的UML图介绍(一)
  5. 软件工程专业实习可以做什么_想要获得软件工程实习机会? 这里有一些想法可以帮助您...
  6. python爬取NBA湖人队球星的数据,并且用Excel保存
  7. 《软件工程》课堂作业:返回一个整数数组中最大字数组的和
  8. 【锋利的JQuery-学习笔记】菜单栏及其2级菜单
  9. Mysq 隔离级别操作
  10. radiogroup多选_Android实现单项、多项选择操作
  11. 量子计算机慕课,计算机组成原理-中国大学mooc-题库零氪
  12. 最简单的java代码【java基本语法】
  13. tftd32搭建DHCP服务器软件打开报错
  14. http://www.xun6.net/file/931caf122/f721.rar.html
  15. 聚宽量化投资策略研究
  16. BZOJ1189 [HNOI2007]紧急疏散evacuate
  17. 考驾照--驾驶证考试
  18. 机械硬盘速度测试软件用哪个,比机械硬盘快多少? SSD测量了常用软件和应用速度...
  19. django—APIView详细讲解
  20. 天地图 android studio,AndroidStudio 加载 天地图 (2019年后开发授权申请)

热门文章

  1. 管理系统中的计算机应用答案,《管理系统中计算机应用》试卷答案
  2. java fileio_java FileIO类
  3. 1008 数组元素右移k位
  4. Python入门--数据类型的转换
  5. 2016蓝桥杯C++A:快速排序(详解版,很快掌握)
  6. OpenGL基础55:文字渲染
  7. bzoj 1639: [Usaco2007 Mar]Monthly Expense 月度开支(二分)
  8. 2017百度之星复赛:1003. Pokémon GO(递推)
  9. 线段树基础操作--单点or区间更新+查询
  10. [高光谱] Hyperspectral-Classification Pytorch 的高光谱场景的通用类 HyperX