springboot配置文件代码提示

采用eclipse的spring boot插件建立项目,配置文件application.properties不能自动提示代码,按alt+/也没有反应是怎么回事呀?

没遇到过。。。idea是可以的,你试试idea...

在pom中引入

org.springframework.boot
spring-boot-configuration-processor
true

配置文件上添加注解@ConfigurationProperties(prefix="xxx")

        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-configuration-processor</artifactId>
            <optional>true</optional>
        </dependency>

配置文件上添加注解

 @ConfigurationProperties(prefix="xxx")