IDEA导入这个maven项目出现以下问题,百度的方法试过了不行,有大神帮忙看看吗?

来源:1-1 SpringBoot 简介

慕数据0284452

2019-07-13 17:04

https://img1.mukewang.com/5d299e51000127e319201080.jpg

Error:(12, 20) java: 无法访问org.springframework.context.ConfigurableApplicationContext

  找不到org.springframework.context.ConfigurableApplicationContext的类文件


写回答 关注

3回答

  • 慕数据0284452
    2019-07-17 18:54:34

    IDEA换了旗舰版后可以运行了,,

  • 呆呆的初行者
    2019-07-14 13:40:01
    <?xml version="1.0" encoding="UTF-8"?>
    <project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0"
             xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
        <modelVersion>4.0.0</modelVersion>
    
        <parent>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-parent</artifactId>
            <version>1.5.9.RELEASE</version>
            <relativePath/> <!-- lookup parent from repository -->
        </parent>
    
    
        <groupId>com.asd45183</groupId>
        <artifactId>springapp</artifactId>
        <version>0.0.1-SNAPSHOT</version>
        <name>springapp</name>
        <description>Demo project for Spring Boot</description>
    
        <properties>
            <java.version>1.8</java.version>
        </properties>
    
        <dependencies>
            <dependency>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-starter</artifactId>
            </dependency>
    
            <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>
                <exclusions>
                    <exclusion>
                        <groupId>org.junit.vintage</groupId>
                        <artifactId>junit-vintage-engine</artifactId>
                    </exclusion>
                    <exclusion>
                        <groupId>junit</groupId>
                        <artifactId>junit</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>
            <dependency>
                <groupId>org.junit.jupiter</groupId>
                <artifactId>junit-jupiter</artifactId>
                <version>5.5.0</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>junit</groupId>
                <artifactId>junit</artifactId>
                <version>4.12</version>
                <scope>test</scope>
            </dependency>
            <!--引入热部署依赖-->
            <dependency>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-devtools</artifactId>
                <optional>true</optional>
            </dependency>
        </dependencies>
    
        <build>
            <plugins>
                <plugin>
                    <groupId>org.springframework.boot</groupId>
                    <artifactId>spring-boot-maven-plugin</artifactId>
                </plugin>
            </plugins>
        </build>
    
        <!--   <repositories>
                <repository>
                    <id>spring-snapshots</id>
                    <name>Spring Snapshots</name>
                    <url>https://repo.spring.io/snapshot</url>
                    <snapshots>
                        <enabled>true</enabled>
                    </snapshots>
                </repository>
                <repository>
                    <id>spring-milestones</id>
                    <name>Spring Milestones</name>
                    <url>https://repo.spring.io/milestone</url>
                </repository>
            </repositories>
            <pluginRepositories>
                <pluginRepository>
                    <id>spring-snapshots</id>
                    <name>Spring Snapshots</name>
                    <url>https://repo.spring.io/snapshot</url>
                    <snapshots>
                        <enabled>true</enabled>
                    </snapshots>
                </pluginRepository>
                <pluginRepository>
                    <id>spring-milestones</id>
                    <name>Spring Milestones</name>
                    <url>https://repo.spring.io/milestone</url>
                </pluginRepository>
            </pluginRepositories>-->
    
    </project>


    慕数据028...

    兄dei,没看懂你的答复,是让我用你的内容替换我的pom.xml吗

    2019-07-17 14:45:34

    共 1 条回复 >

  • 呆呆的初行者
    2019-07-14 13:39:42
    spring.devtools.restart.exclude=WEB_INF/**
    spring.devtools.restart.exclude=WEB_INF/**


    慕数据028...

    这个加入哪几行?

    2019-07-17 14:46:11

    共 1 条回复 >

SpringBoot开发常用技术整合

SpringBoot 极简开发的框架整合利器

102174 学习 · 508 问题

查看课程

相似问题