The reason for the error is that the build. Gradle file is missing the package plug-in for gradle
buildscript {
dependencies {
classpath("org.springframework.boot:spring-boot-gradle-plugin:2.2.6.RELEASE")
}
}
plugins {
id 'java'
}
apply plugin: 'java'
apply plugin: 'org.springframework.boot'
group 'com.guanguan.docker'
version '1.0-SNAPSHOT'
sourceCompatibility = 1.8
repositories {
mavenCentral()
}
dependencies {
compile('org.springframework.boot:spring-boot-starter-web:2.2.6.RELEASE')
testCompile group: 'junit', name: 'junit', version: '4.12'
}
Just patch spring-boot-gradle-plugin.
Verification.
./gradlew build
$ java -jar ./build/libs/scaffold-1.0-SNAPSHOT.jar
Then you can see the program get up.
Similar Posts:
- [Solved] Gradle Error: Could not resolve all dependencies for configuration ‘:detachedConfiguration7
- How to Solve Error: spring-boot-maven-plugin not found
- [Solved] Plugin ‘org.springframework.boot:spring-boot-maven-plugin:’not found
- Unregistering JMX-exposed beans on shutdown Solution
- Eureka server project startup error handling
- Failed to execute goal org.springframework.boot:spring-boot-maven-plugin:2.3.5. RELEASE:repackage (repackage) on project tristone-boot-module-system: zip file is empty
- SpringBoot Project Package Error: [ERROR] Failed to execute goal org.springframework.boot:spring-boot-maven-plugin (Running Normally)
- Spring boot: run startup error [How to Solve]
- Unable to find a single main class from the following candidates [xxx,xxx]
- Springboot always reports an error when importing JSP dependencies