Tomcat Grails3自定义web.xml和weblogic.xml

Tomcat Grails3自定义web.xml和weblogic.xml,tomcat,grails,gradle,weblogic,grails-3.0,Tomcat,Grails,Gradle,Weblogic,Grails 3.0,说这是可能的,但Grails3文档并没有提到这一点 如何将自定义web.xml和weblogic.xml添加到Grails 3应用程序中?Grails 3.x不使用web.xml。定制必须在春季完成。新的servlet和过滤器可以分别注册为Springbean或ServletRegistrationBean和FilterRegistrationBean 在Grails中配置SpringBean的文档: 从中收集的信息 这篇文章确实提到,措辞拙劣,“尽管在src/main/webapp/WEB-

说这是可能的,但Grails3文档并没有提到这一点


如何将自定义web.xml和weblogic.xml添加到Grails 3应用程序中?

Grails 3.x不使用web.xml。定制必须在春季完成。新的servlet和过滤器可以分别注册为Springbean或ServletRegistrationBean和FilterRegistrationBean

在Grails中配置SpringBean的文档:

从中收集的信息

这篇文章确实提到,措辞拙劣,“尽管在src/main/webapp/WEB-INF/WEB.xml中仍然可以使用on”

尝试创建位于src/main/webapp/web-INF/中的web.xml文件,看看这是否解决了您的问题

在以前版本的grails中,您可以运行:

grails install-templates

这将生成grails用于构建应用程序的web.xml

我刚刚从Graeme Rocher在2015年10月24日的JavaOne演讲中看到了这一点。看起来不再支持
web.xml

,演讲开始大约一个小时。(幻灯片可在网站上下载)。以下是演示文稿中的一些屏幕截图:





因为Grails 3是在Spring Boot之上对Grails的重写,所以我会检查Spring Boot如何允许您添加这些xml文件。我已经找到了,但我不知道怎么做。