想要打包api层,然后出现错误:
Plugin request for plugin already on the classpath must not include a version
新建的项目中默认的build.gradle中是:
id 'org.springframework.boot' version '2.1.6.RELEASE'
可以修改为:
buildscript { ext { springBootVersion = '2.1.6.RELEASE' } repositories { mavenCentral() } dependencies { classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}") } } plugins { // id 'org.springframework.boot' version '2.1.6.RELEASE' id 'java' } apply plugin: 'org.springframework.boot' apply plugin: 'io.spring.dependency-management'
即可解决问题