美文网首页
错误之Spring Boot configuration ann

错误之Spring Boot configuration ann

作者: weworld | 来源:发表于2019-04-16 15:54 被阅读0次

    在IDEA中,classpath中找不到Spring Boot配置注解,默认是在resources/application.properties文件中。解决方法,那就是在pom.xml文件中加入依赖spring-boot-configuration-processor

    pom

    <dependency>

        <groupId>org.springframework.boot</groupId>

        <artifactId>spring-boot-configuration-processor</artifactId>

        <optional>true</optional>

    </dependency>

    原文:https://docs.spring.io/spring-boot/docs/2.0.1.RELEASE/reference/html/configuration-metadata.html#configuration-metadata-annotation-processor

    相关文章

      网友评论

          本文标题:错误之Spring Boot configuration ann

          本文链接:https://www.haomeiwen.com/subject/jkibwqtx.html