没有在tomcat上部署Spring引导并出现此错误

时间:2017-05-15 07:44:58

标签: tomcat gradle spring-boot deployment war

美好的一天:]

部署这些错误时遇到问题。

以下是来自catalina.out的一些信息

15-May-2017 15:41:34.376 INFO [main] org.apache.catalina.core.StandardEngine.startInternal Starting Servlet Engine: Apache Tomcat/9.0.0.M21
15-May-2017 15:41:34.388 INFO [main] org.apache.catalina.startup.HostConfig.deployWAR Deploying web application archive [/root/apache-tomcat-9.0.0.M21/webapps/makerscout-0.7.war]
15-May-2017 15:41:35.500 INFO [main] org.apache.jasper.servlet.TldScanner.scanJars At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
15-May-2017 15:42:27.566 INFO [main] org.apache.catalina.util.SessionIdGeneratorBase.createSecureRandom Creation of SecureRandom instance for session ID generation using [SHA1PRNG] took [52,024] milliseconds.
15-May-2017 15:42:27.601 INFO [main] org.apache.catalina.startup.HostConfig.deployWAR Deployment of web application archive [/root/apache-tomcat-9.0.0.M21/webapps/makerscout-0.7.war] has finished in [53,213] ms

Tomcat9 / Spring-boot / Gradle / JAVA 1.8(linux / eclipse)

这是build.gradle

的全部内容
buildscript 
ext {
    springBootVersion = '1.5.2.RELEASE'
    javaVersion = '1.8'
}
repositories {
    mavenCentral()
}
dependencies {
    classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
}
}
version = '0.7'

apply plugin: 'java'
apply plugin: 'eclipse'
apply plugin: 'org.springframework.boot'
apply plugin: 'war'
apply plugin: 'application'

dependencies {
    providedCompile 'org.apache.tomcat:tomcat-catalina:8.0.43'
}

sourceCompatibility = javaVersion
targetCompatibility = javaVersion

repositories {
    mavenCentral()
}

dependencies {
    compile('org.springframework.boot:spring-boot-starter'){
    exclude module: "tomcat-embed-el"
}
compile('org.springframework.boot:spring-boot-starter-data-jpa')
compile('org.springframework.boot:spring-boot-starter-jdbc')
compile('org.springframework.boot:spring-boot-starter-web'){
    exclude module: "spring-boot-starter-tomcat"
}
compile('org.thymeleaf.extras:thymeleaf-extras-springsecurity4:3.0.0.RELEASE')
compile('org.springframework.boot:spring-boot-starter-security')
compile('org.thymeleaf:thymeleaf:3.0.0.RELEASE')
compile('org.thymeleaf:thymeleaf-spring4:3.0.0.RELEASE')
runtime('com.h2database:h2')
runtime('mysql:mysql-connector-java')
compileOnly('org.projectlombok:lombok')
testCompile('org.springframework.boot:spring-boot-starter-test')
compile("org.springframework.boot:spring-boot-devtools")
compile("org.springframework:spring-websocket:4.1.6.RELEASE")
compile("org.springframework:spring-messaging:4.1.6.RELEASE")
compile("com.navercorp.lucy:lucy-xss:1.6.3")
compile("com.navercorp.lucy:lucy-xss-servlet:2.0.0")
compile("org.imgscalr:imgscalr-lib:4.2")

}

我不知道为什么这个应用程序没有在tomcat上启动。 有人建议此问题来自服务器/客户端之间的版本不正确。但这两个地方都有相同的JAVA 1.8版本。

非常感谢你。 我会一直为此寻找解决方案。

0 个答案:

没有答案