如何Grails 3.0.1在Tomcat7的非嵌入式版本中部署war文件?我得到的只是一个空白页面或404错误.我可以成功部署我的其他war文件,所以我知道这不是Tomcat的问题.我的版本和我采取的步骤如下:
Server version: Apache Tomcat/7.0.52 (Ubuntu)
Grails Version: 3.0.1
Groovy Version: 2.4.3
JVM Version: 1.7.0_80
Run Code Online (Sandbox Code Playgroud)
我怀疑这个问题与Spring框架或Gradle有关.我对它们中的任何一个都不是很熟悉,但我确实注意到3.0.1不再使用a web.xml而且不再有Config.groovy文件.以下网站详细介绍了如何在3.0.x中部署Grails项目.
http://grails.github.io/grails-doc/3.0.x/guide/deployment.html
grails run-app,它localhost:8080没有任何问题地部署到漂亮.我不想使用嵌入式版本的Tomcat.我想将它部署到不同版本的Tomcat,这就是我遇到问题的地方.
provided "org.springframework.boot:spring-boot-starter-tomcat"grails war
website.war到/var/lib/tomcat7/webappssudo service tomcat7 restart重启tomcatwebsite.war自动解压缩(确实如此)localhost:9999/website^这给了我一个空白的白页.
website.war它与相关的解压缩文件夹.
localhost:9999website.war在经理应用程序上ok地位localhost:9999/website^这给我以下错误:
HTTP状态404 - /website,请求的资源不可用.
其他相关信息:
https://grails.github.io/grails-doc/3.0.x/guide/single.html:
"Grails 3.0不再需要web.xml.可以通过Spring完成自定义"
该BuildConfig.groovy文件也已更改. …