无法使用 IntelliJ 部署 Spring Boot 分解工件



项目部署期间出现错误。C:Program FilesApache Software FoundationTomcat 7.0logscatalina.log没有任何信息。IntelliJ 的调试控制台中没有有用的信息,但是:

Connected to server
[2015-01-24 10:05:18,950] Artifact war exploded: Artifact is being deployed, please wait...
jaan 24, 2015 10:05:19 PM org.apache.catalina.loader.WebappClassLoader validateJarFile
INFO: validateJarFile(C:explodedWEB-INFlibtomcat-embed-el-7.0.55.jar) - jar not loaded. See Servlet Spec 3.0, section 10.7.2. Offending class: javax/el/Expression.class
jaan 24, 2015 10:05:23 PM org.apache.catalina.core.ApplicationContext log
INFO: Spring WebApplicationInitializers detected on classpath: [go.Application@2569b61e]
  .   ____          _            __ _ _
 /\ / ___'_ __ _ _(_)_ __  __ _    
( ( )___ | '_ | '_| | '_ / _` |    
 \/  ___)| |_)| | | | | || (_| |  ) ) ) )
  '  |____| .__|_| |_|_| |___, | / / / /
 =========|_|==============|___/=/_/_/_/
 :: Spring Boot ::        (v1.1.6.RELEASE)
[2015-01-24 10:05:29,195] Artifact war exploded: Error during artifact deployment. See server log for details

我应该检查哪些日志?

你的战争文件中嵌入了雄猫,而你部署战争的雄猫不喜欢。您需要声明提供的嵌入式 Tomcat 依赖项。如果您使用的是Maven,那将看起来像这样:

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <!-- ... -->
    <packaging>war</packaging>
    <!-- ... -->
    <dependencies>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-web</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-tomcat</artifactId>
            <scope>provided</scope>
        </dependency>
        <!-- ... -->
    </dependencies>
</project>

最新更新