- A+
所属分类:SpringBoot
---
title: spring boot内嵌容器tomcat配置
date: 2018-10-31 15:44:54
categories: SpringBoot
tags:
- tomcat
- SpringBoot
- 配置
- 内嵌
---
默认容器
spring boot默认web程序启用tomcat内嵌容器tomcat,监听8080端口,servletPath默认为 / 通过需要用到的就是端口、上下文路径的修改,在spring boot中其修改方法及其简单;
在资源文件中配置:
server.port=9090
server.contextPath=/zp
启动spring boot
执行 http://localhost:9090/zp 成功访问
