使用android studio开发Spring Boot项目报错:Caused by: org.springframework.boot.context.embedded.EmbeddedServletContainerException: Unable to start embedded Tomcat。求大佬指导
具体报错如下:
Caused by: org.springframework.boot.context.embedded.EmbeddedServletContainerException: Unable to start embedded Tomcat。
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'httpPutFormContentFilter' defined in class path resource [org/springframework/boot/autoconfigure/web/WebMvcAutoConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.boot.web.filter.OrderedHttpPutFormContentFilter]: Factory method 'httpPutFormContentFilter' threw exception; nested exception is java.lang.NoClassDefFoundError: org/springframework/core/log/LogDelegateFactory。
Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.boot.web.filter.OrderedHttpPutFormContentFilter]: Factory method 'httpPutFormContentFilter' threw exception; nested exception is java.lang.NoClassDefFoundError: org/springframework/core/log/LogDelegateFactory。
Caused by: java.lang.NoClassDefFoundError: org/springframework/core/log/LogDelegateFactory。
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-webflux:5.2.14.RELEASE')
compile('org.springframework:spring-core:4.3.13.RELEASE')
}
build.gradle(项目):
// Top-level build file where you can add configuration options common to all sub-projects/modules.
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
}