我正在学习一门使用 Vaadin 框架、Maven、Spring Boot 和 JPA 实现 Java EE 标准的类(class)。
我已成功将我的 Maven 项目和模块部署到 Jboss WildFly 服务器。
出现的一个小错误是:在类(class)中,应用程序的URL是
http://localhost:8080/univers-web/ *
但是当我编译并运行应用程序时,我必须输入:
http://localhost:8080/univers-web-1.3.6.RELEASE
有点麻烦,但是有没有办法从 URL 名称中删除项目版本?
我检查了 pom.xml 文件,这里是代码的起始片段:
<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>
<artifactId>univers-web</artifactId>
<packaging>war</packaging>
<parent>
<groupId>org.springframework.boot</groupId>
<version>1.3.6.RELEASE</version>
<artifactId>spring-boot-starter-parent</artifactId>
</parent>
<properties>
<java.version>1.8</java.version>
</properties>
.
.
.
</project>
最佳答案
在你的pom的build部分,添加<finalName>univers-web</finalName>
.
关于java - Maven 网址太长,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50261102/