JBoss EAP 6.2.0 中的 grails 3 war 不起作用 [英] grails 3 war in JBoss EAP 6.2.0 does not work
问题描述
当我尝试在 JBoss EAP 6.2.0.GA (AS 7.3.0.Final-redhat-14) 中将一个非常简单的 grails 3 (3.0.7) 应用程序作为 war(移除了嵌入式 tomcat)运行时,所有请求都结束在 HTTP 404 中.同样的战争也适用于 Tomcat.
When I try to run a very simple grails 3 (3.0.7) application as war (with embedded tomcat removed) in JBoss EAP 6.2.0.GA (AS 7.3.0.Final-redhat-14) all requests end up in a HTTP 404. The same war works in Tomcat.
在网上搜索我发现以下与 Spring Boot 相关的内容:
Searching the web I found the following related to Spring Boot:
Jboss EAP 上的 springBoot 应用程序,servlet 上下文未加载
不幸的是,在 application.yml(yml 格式)中配置属性 server.servlet-path 不起作用.
Unfortunately configuring the property server.servlet-path in application.yml (in yml format) did not work.
推荐答案
深入了解 grails 3 源码:
Looking into the grails 3 source:
我找到了解决方案.在 application.yml 中添加以下配置:
I found the solution. In application.yml add the following configuration:
grails:
web:
servlet:
path: /*
从 web: 开始到现有的 grails: 部分.然后所有请求都按预期工作.
starting with web: into the existing grails: section. Then all requests are working as again as expected.
这篇关于JBoss EAP 6.2.0 中的 grails 3 war 不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!