gpt4 book ai didi

spring - 从Spring Tool Suite部署Gradle任务以部署War文件

转载 作者:行者123 更新时间:2023-12-03 06:12:42 24 4
gpt4 key购买 nike

我使用的是Spring工具套件3.7.0和从STS仪表板安装的gradle插件。不知何故,gradle任务默认为空。我使用“build”任务生成了war文件,但tomcat7无法将该war文件识别为有效的war文件。我还需要使用其他gradle任务来生成war文件吗?

另外,build.gradle文件具有以下插件,

apply plugin: 'base'
apply plugin: 'war'
apply plugin: 'jetty'
apply plugin: 'java'
apply plugin: 'eclipse-wtp'

Tomcat7显示以下日志。没有错误,但没有显示我在初始化应用程序时设置的日志记录。
Oct 28, 2015 2:14:12 PM org.apache.catalina.core.StandardContext reload
INFO: Reloading Context with name [/branch] has started
Oct 28, 2015 2:14:12 PM org.apache.catalina.loader.WebappClassLoader validateJarFile
INFO: validateJarFile(/var/lib/tomcat7/webapps/branch/WEB-INF/lib/javaee-api-6.0-6.jar) - jar not loaded. See Servlet Spec 3.0, section 10.7.2. Offending class: javax/servlet/Servlet.class
Oct 28, 2015 2:14:12 PM org.apache.catalina.loader.WebappClassLoader validateJarFile
INFO: validateJarFile(/var/lib/tomcat7/webapps/branch/WEB-INF/lib/javax.servlet-api-3.0.1.jar) - jar not loaded. See Servlet Spec 3.0, section 10.7.2. Offending class: javax/servlet/Servlet.class
Oct 28, 2015 2:14:12 PM org.apache.catalina.loader.WebappClassLoader validateJarFile
INFO: validateJarFile(/var/lib/tomcat7/webapps/branch/WEB-INF/lib/jsp-api-2.1.jar) - jar not loaded. See Servlet Spec 3.0, section 10.7.2. Offending class: javax/el/Expression.class
Oct 28, 2015 2:14:15 PM org.apache.catalina.startup.TaglibUriRule body
INFO: TLD skipped. URI: http://java.sun.com/jstl/core_rt is already defined
Oct 28, 2015 2:14:15 PM org.apache.catalina.startup.TaglibUriRule body
INFO: TLD skipped. URI: http://java.sun.com/jstl/core is already defined
Oct 28, 2015 2:14:15 PM org.apache.catalina.startup.TaglibUriRule body
INFO: TLD skipped. URI: http://java.sun.com/jsp/jstl/core is already defined
Oct 28, 2015 2:14:15 PM org.apache.catalina.startup.TaglibUriRule body
INFO: TLD skipped. URI: http://java.sun.com/jstl/fmt_rt is already defined
Oct 28, 2015 2:14:15 PM org.apache.catalina.startup.TaglibUriRule body
INFO: TLD skipped. URI: http://java.sun.com/jstl/fmt is already defined
Oct 28, 2015 2:14:15 PM org.apache.catalina.startup.TaglibUriRule body
INFO: TLD skipped. URI: http://java.sun.com/jsp/jstl/fmt is already defined
Oct 28, 2015 2:14:15 PM org.apache.catalina.startup.TaglibUriRule body
INFO: TLD skipped. URI: http://java.sun.com/jsp/jstl/functions is already defined
Oct 28, 2015 2:14:15 PM org.apache.catalina.startup.TaglibUriRule body
INFO: TLD skipped. URI: http://jakarta.apache.org/taglibs/standard/permittedTaglibs is already defined
Oct 28, 2015 2:14:15 PM org.apache.catalina.startup.TaglibUriRule body
INFO: TLD skipped. URI: http://jakarta.apache.org/taglibs/standard/scriptfree is already defined
Oct 28, 2015 2:14:15 PM org.apache.catalina.startup.TaglibUriRule body
INFO: TLD skipped. URI: http://java.sun.com/jstl/sql_rt is already defined
Oct 28, 2015 2:14:15 PM org.apache.catalina.startup.TaglibUriRule body
INFO: TLD skipped. URI: http://java.sun.com/jstl/sql is already defined
Oct 28, 2015 2:14:15 PM org.apache.catalina.startup.TaglibUriRule body
INFO: TLD skipped. URI: http://java.sun.com/jsp/jstl/sql is already defined
Oct 28, 2015 2:14:15 PM org.apache.catalina.startup.TaglibUriRule body
INFO: TLD skipped. URI: http://java.sun.com/jstl/xml_rt is already defined
Oct 28, 2015 2:14:15 PM org.apache.catalina.startup.TaglibUriRule body
INFO: TLD skipped. URI: http://java.sun.com/jstl/xml is already defined
Oct 28, 2015 2:14:15 PM org.apache.catalina.startup.TaglibUriRule body
INFO: TLD skipped. URI: http://java.sun.com/jsp/jstl/xml is already defined
Oct 28, 2015 2:14:15 PM org.apache.catalina.core.StandardContext reload
INFO: Reloading Context with name [/branch] is completed

最佳答案

解决了。我用来构建war文件的Java版本是不同的。我很惊讶虽然没有抛出任何错误。

关于spring - 从Spring Tool Suite部署Gradle任务以部署War文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33381462/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com