为了账号安全,请及时绑定邮箱和手机立即绑定

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

https://img1.sycdn.imooc.com//5d299e51000127e319201080.jpg

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

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


正在回答

3 回答

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

0 回复 有任何疑惑可以回复我~
<?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>


0 回复 有任何疑惑可以回复我~
#1

慕数据0284452 提问者

兄dei,没看懂你的答复,是让我用你的内容替换我的pom.xml吗
2019-07-17 回复 有任何疑惑可以回复我~
spring.devtools.restart.exclude=WEB_INF/**
spring.devtools.restart.exclude=WEB_INF/**


0 回复 有任何疑惑可以回复我~
#1

慕数据0284452 提问者

这个加入哪几行?
2019-07-17 回复 有任何疑惑可以回复我~

举报

0/150
提交
取消

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

我要回答 关注问题
意见反馈 帮助中心 APP下载
官方微信