SpringBoot 中 application.properties 提示 Cannot resolve configuration property 'xxxx'

SpringBoot 中 application.properties 提示 Cannot resolve configuration property 'xxxx'

    • 1. 导包
    • 2. 添加

1. 导包

<dependency>
	<groupId>org.springframework.bootgroupId>
	<artifactId>spring-boot-configuration-processorartifactId>
	<optional>trueoptional>
dependency>

2. 添加

在报错的地方按 Alt + Enter Enter Enter 就会自动创建一个文件为 additional-spring-configuration-metadata.json.

SpringBoot 中 application.properties 提示 Cannot resolve configuration property 'xxxx'_第1张图片

等待一会就不会报错了, 大概 0-3 分钟不等.

SpringBoot 中 application.properties 提示 Cannot resolve configuration property 'xxxx'_第2张图片

你可能感兴趣的:(Java,开发,问题解决)