Eclipse relies on spring-boot-configuration-processor, and there is no prompt for writing properties and yml

Problem Description:

In eclipse, in the springboot project, when using @ConfigurationProperties(prefix = "person") annotation and yml file to do data binding, the spring-boot-configuration-processor dependency is added but there is still no prompt problem.

Insert picture description here

Insert picture description here

<!--导入配置文件处理器,配置文件进行绑定就会有提示-->
<dependency>
	<groupId>org.springframework.boot</groupId>
	<artifactId>spring-boot-configuration-processor</artifactId>
	<optional>true</optional>
</dependency>

Resolution process:

Add the following dependencies

<properties>
	<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
	<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
	<java.version>1.8</java.version>
</properties>

Then update project
right click-"maven-" update project

Finally, maven install
right click- "run as -" maven install
Insert picture description here

Guess you like

Origin blog.csdn.net/weixin_43888891/article/details/110789966