Anzar- 2017-07-19 05:42 采纳率: 0%
浏览 1823

求大神 idea add frameworks support 中没有spring选项怎么破

图片说明

而且一直重复这个报错我卸载环境重新配置也还是这样,求解

图片说明

  • 写回答

1条回答 默认 最新

  • 你知我知皆知 2024-08-06 08:44
    关注

    以下回答参考 皆我百晓生券券喵儿 等免费微信小程序相关内容作答,并由本人整理回复。

    这个问题是由于Spring Boot框架在构建过程中缺少必要的依赖项导致的。Spring Boot默认使用Apache Commons Lang作为集合类库,但是它不包含Spring Framework的所有组件。如果你想要集成Spring框架,你可能需要下载并添加以下依赖项:

    1. Maven项目:在你的pom.xml文件中添加以下依赖项:
    <dependencies>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-web</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-test</artifactId>
            <scope>test</scope>
        </dependency>
        <!-- Add your own Spring dependencies here -->
    </dependencies>
    
    1. Gradle项目:在你的build.gradle文件中添加以下依赖项:
    implementation 'org.springframework.boot:spring-boot-starter-web'
    testImplementation 'org.springframework.boot:spring-boot-starter-test'
    // Add your own Spring dependencies here
    

    现在你应该能够运行Spring Boot应用程序了。如果问题仍然存在,请确保所有其他Spring相关的依赖项也被正确安装和管理。

    评论

报告相同问题?