错误之Spring Boot configuration ann

2019-04-16  本文已影响0人  weworld

在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

上一篇 下一篇

猜你喜欢

热点阅读