使用android studio开发Spring Boot项目,报错:Caused by: java.lang.ClassNotFoundException: org.springframework.web.reactive.config.WebFluxConfigurer。添加相关依赖:compile("org.springframework:spring-web-reactive:5.0.0.M1")后报错(如下),求大佬指导:
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:compileJava'.
> Could not resolve all files for configuration ':app:compileClasspath'.
> Could not find org.springframework:spring-web-reactive:5.0.0.M1.
Required by:
project :app
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
build.gradle(app)如下:
apply plugin: 'java'
apply plugin: 'org.springframework.boot'
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
compile('org.springframework.boot:spring-boot-starter-parent:2.3.4.RELEASE')
compile('org.springframework.boot:spring-boot-starter-web:2.3.4.RELEASE')
compile('com.aliyun.oss:aliyun-sdk-oss:3.15.0')
compile('com.aliyun:aliyun-java-sdk-sts:3.0.0')
compile('com.aliyun:aliyun-java-sdk-core:4.4.6')
compile('org.projectlombok:lombok:1.16.10')
compile('io.springfox:springfox-boot-starter:3.0.0')
compile('org.springframework:spring-web:5.3.14')
compile('org.springframework:spring-web-reactive:5.0.0.M1')
}
build.gradle(项目)如下:
buildscript {
repositories {
mavenLocal()
mavenCentral()
}
dependencies {
classpath 'org.springframework.boot:spring-boot-gradle-plugin:1.5.9.RELEASE'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
google()
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}