cat_dog_orange 2023-04-10 18:35 采纳率: 36.4%
浏览 14
已结题

使用android studio开发Spring Boot项目报错:Unable to start embedded Tomcat

使用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
}


  • 写回答

1条回答 默认 最新

  • threenewbee 2023-04-10 18:52
    关注

    Preferences - Plugins -输入"Tomcat"找到插件"Smart Tomcat",点击安装

    评论

报告相同问题?

问题事件

  • 已结题 (查看结题原因) 4月18日
  • 创建了问题 4月10日

悬赏问题

  • ¥15 在国外文献网站里点击view pdf 加载异常缓慢甚至加载不出来。
  • ¥50 python批量提取发票的信息
  • ¥15 mysql安装,初始化数据库失败
  • ¥15 虚幻五引擎内容如何上传至网盘?
  • ¥15 使用mmpose库时出现了问题
  • ¥15 IRI2016模型matlab运行报错
  • ¥50 bat怎么设置电脑后台自动点击网页指定词运行脚本,输入指定网页链接,指定点击词,指定间隔时间,指定网页出现的词,指定网页出现词出现后后点击锁定,放在后台运行不影响前台鼠标工作
  • ¥20 20CrMnMo的高温变形抗力
  • ¥15 RTX3.6 5565驱动中断报错
  • ¥50 带防重放token(Antireplay-Token)的网站怎么用Python发送请求