Spring boot IntelliJ Idea无法使用gradle运行spring boot
我构建了一个spring启动项目。它使用了Gradle4.9、JDK1.8和idea。但是我不能运行这个应用程序 格雷德尔先生Spring boot IntelliJ Idea无法使用gradle运行spring boot,spring-boot,gradle,intellij-idea,Spring Boot,Gradle,Intellij Idea,我构建了一个spring启动项目。它使用了Gradle4.9、JDK1.8和idea。但是我不能运行这个应用程序 格雷德尔先生 buildscript { ext { springBootVersion = '2.0.3.RELEASE' } repositories { mavenCentral() } dependencies { classpath("org.springframework.boot:spring-boot-gradle- plug
buildscript {
ext {
springBootVersion = '2.0.3.RELEASE'
}
repositories {
mavenCentral()
}
dependencies {
classpath("org.springframework.boot:spring-boot-gradle-
plugin:${springBootVersion}")
}
}
apply plugin: 'java'
apply plugin: 'eclipse'
apply plugin: 'org.springframework.boot'
apply plugin: 'io.spring.dependency-management' group = 'com.example'
version = '0.0.1-SNAPSHOT'
sourceCompatibility = 1.8 repositories
{
mavenCentral()
}
dependencies {
compile('org.springframework.boot:spring-boot-starter-web')
testCompile('org.springframework.boot:spring-boot-starter-test')
}
错误:
线程“main”java.lang.NoClassDefFoundError中出现异常:
org/springframework/boot/SpringApplication
谢谢你的帮助 您能显示build.gradle文件吗?将您的代码发布到@user