有 Java 编程相关的问题?

你可以在下面搜索框中键入要查询的问题!

Spring应用程序上的java NoClassDefFoundError

完全错误出现在这张图片中,因为我正在云中的虚拟机上运行,该虚拟机是通过视频源访问的,所以我无法复制和粘贴。这是一个新安装的ubuntu,我只安装了JDK,如果需要进行其他安装,没有什么是不知道的 https://imgur.com/a/egJ3d

这是一个spring引导应用程序。 我的身材。格拉德尔

group 'com.haughon.daniel'
version '1.0-SNAPSHOT'



buildscript {
repositories{
    mavenCentral()
}
dependencies {
    classpath 'org.springframework.boot:spring-boot-gradle-plugin:1.5.2.RELEASE'
}
}

// Apply the Spring Boot plugin
apply plugin: 'spring-boot'

 // Apply the Java plugin (expects src/main/java to be source folder)
 apply plugin: 'java'
apply plugin: 'idea'

 // Specify the location where our dependencies will be found
repositories {
mavenCentral()
}
jar {
   manifest {
    attributes 'Main-Class': 'haughton.dvdstore.Application'
    attributes 'addClasspath': 'true'

}
}

 // Specify dependencies
  dependencies {

compile 'org.hashids:hashids:1.0.1'
compile 'org.springframework.boot:spring-boot-starter-thymeleaf'
compile 'org.springframework:spring-orm:4.3.7.RELEASE'
compile 'org.hibernate:hibernate-core:5.2.9.Final'
compile 'org.hibernate:hibernate-entitymanager:5.0.6.Final'
compile 'org.apache.tomcat:tomcat-dbcp:8.0.30'
compile 'org.springframework.boot:spring-boot-starter-security'
compile('org.thymeleaf.extras:thymeleaf-extras-springsecurity4')
//compile 'org.thymeleaf.extras:thymeleaf-extras-springsecurity:3.0.2.RELEASE'
compile group: 'org.springframework.data', name: 'spring-data-jpa', version: '1.11.1.RELEASE'
// https://mvnrepository.com/artifact/com.google.code.gson/gson
compile group: 'com.google.code.gson', name: 'gson', version: '2.8.0'
// https://mvnrepository.com/artifact/com.fasterxml.jackson.core/jackson-core
compile group: 'com.fasterxml.jackson.core', name: 'jackson-core', version: '2.8.8'

runtime 'com.h2database:h2'
runtime 'javax.transaction:jta:1.1'
runtime 'org.aspectj:aspectjweaver:1.8.7'
testCompile 'org.springframework.boot:spring-boot-starter-test'
}  

共 (1) 个答案