【发布时间】:2016-08-18 08:30:00
【问题描述】:
我正在使用 spring mvc 框架和 maven 编写一个 Rest 服务。我现在正在使用tomcat服务器。我的项目的 pom 是
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.springframework</groupId>
<artifactId>gs-rest-service</artifactId>
<version>0.1.0</version>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>1.2.5.RELEASE</version>
</parent>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
</dependencies>
<properties>
<java.version>1.8</java.version>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
<repositories>
<repository>
<id>spring-releases</id>
<url>https://repo.spring.io/libs-release</url>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>spring-releases</id>
<url>https://repo.spring.io/libs-release</url>
</pluginRepository>
</pluginRepositories>
</project>
本项目使用tomcat服务器,默认运行在8080端口。谁能帮助我了解它从哪里获取此配置以及如何更改运行 tomcat 的端口。
我的初步分析告诉我在 spring.boot 插件中完成了一些配置,我需要在我的 pom.xml 中覆盖这些配置。谁能帮我覆盖tomcat默认端口并在其他端口上运行它。
【问题讨论】:
标签: java maven tomcat spring-boot