尝试配置探针时,Spring Boot中的“​​无法解析配置属性”

问题描述

在我的Spring Boot 2.3.3.RELEASE中,我想启用readinessliveness端点。

我将此添加到了yml文件

enter image description here

但是IntelliJ将值标记为“无法解析配置属性”,并且无法访问端点(例如http:// localhost:8080 / actuator / health / readiness)

解决方法

该项目缺少对 <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-actuator</artifactId> </dependency> 的琐碎依赖:

requests

添加后,IntelliJ停止抱怨并且可以访问端点。

相关问答

Selenium Web驱动程序和Java。元素在(x,y)点处不可单击。其...
Python-如何使用点“。” 访问字典成员?
Java 字符串是不可变的。到底是什么意思?
Java中的“ final”关键字如何工作?(我仍然可以修改对象。...
“loop:”在Java代码中。这是什么,为什么要编译?
java.lang.ClassNotFoundException:sun.jdbc.odbc.JdbcOdbc...