【发布时间】:2018-12-02 22:22:27
【问题描述】:
我有一个 maven 项目,使用 spring boot 和 vaadin flow。但是在我的服务器中部署时,我无法更改 Web 上下文。
我尝试将不同的变量放入文件 application.properties
vaadin.urlMapping=/mycontext/*
server.servlet.context-path=/mycontext
server.contextPath=/mycontext
始终在部署项目后,它会继续显示诸如 my-project-01-SNAPSHOT
之类的上下文更新
我在 Wildfly 服务器中部署类似于 WAR 应用程序。
【问题讨论】:
-
您的问题中缺少一些信息。我使用了我的一个 Spring Boot 应用程序,并将这些“server.servlet.context-path=/mycontext, server.contextPath=/mycontext”添加到我的 application.properties 中,并且它可以正常工作。我认为这没有必要:“vaadin.urlMapping=/mycontext/*”
-
Vaadin URL-Mapping 也是相对于上下文路径
-
我读了你提到的所有这些,这就是问题所在。上下文没有改变。出于这个原因,我在我使用 vaadin 的问题中发布了,因为它与框架的兼容性存在问题。
标签: spring-boot vaadin wildfly