- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我将 Gradle
与 Spring Boot 2.0.0.M7
结合使用,并应用了以下插件:
buildscript {
repositories {
maven { url "https://plugins.gradle.org/m2/" }
maven { url "https://repo.spring.io/milestone" }
}
dependencies {
classpath "org.springframework.boot:spring-boot-gradle-plugin:2.0.0.M7"
}
}
plugins {
id "com.gorylenko.gradle-git-properties" version "1.4.17"
}
spring-boot-starter-actuator
依赖项也在那里。 git.properties
文件已正确生成到 build/main/resoures
目录。我还添加了属性 management.info.git.mode=full
。根据官方文档,git information should be added使用 GitInfoContributor 自动到 /info
端点。但是,上述方法均无济于事,/info
端点返回空 JSON - {}
。关于如何解决这个问题有什么想法吗?
更新 1:到目前为止我发现的是,如果我手动将 git.properties 复制到 out/resources ,这样它就可以工作,但由于某种原因它们没有放在那里。
更新2:当我使用 gradle bootRun
运行时,它可以工作,但是当我从 Intellij IDEA 启动它时,我们运行 gradle clean build
运行测试,检查这些属性是否显示在 /info
端点 - 它不起作用。
最佳答案
问题是从 IDE 运行应用程序。由于这些属性是在 JAR 组装阶段生成的,因此不包括在内。通过 java -jar artifact.jar
或 gradle bootRun
运行应用程序不会出现任何问题。
感谢@fateddy 帮助解决问题。
关于Spring Boot 2.0 Actuator git 属性未添加到/info,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48133150/
我能够访问 http://localhost:8081/health、/status、/env、 等端点/metrics、/shutdown 但 not /actuator 或 /loginfo 端点
我有一个用例,我需要跟踪给定组件的处理时间指标,并将其用作我的 spring-boot 应用程序中调整目的的反馈循环。我想我会在我需要监视的组件中通过 Autowiring 的 GaugeServic
我已将以下依赖项添加到我的 Spring Boot 项目中 implementation 'io.github.resilience4j:resilience4j-spring-boot2:0.14.
我正在尝试使用 Kubernetes Probes来自 Spring Boot Actuator,但它不起作用。 我在 application.properties 中设置了以下内容: managem
每次我在请求 localhost:60001/info、localhost:60001/actuator 或其他时收到 404 错误。 {"timestamp":1570711643410,"stat
Spring Boot 的执行器基础端点返回 json 和所有启用端点的 href 链接。这些链接都默认为 localhost:8080,但我使用主机名(例如 machine.mydomain.com
我正在使用以下执行器依赖项 org.springframework.boot spring-boot-starter-actuator 带有 Spring Boot 2,
我正在试着写一个小的Hello world程序,并用战争来包装它。我正在使用maven并编写一个SpringBoot应用程序来做这件事。。以下是我的Application.Java文件。在构建它时,我
我创建了一个简单的示例项目,只有 spring-web 和 spring-actuator。我无法在此项目中调用 /actuator 端点。我唯一得到的是 404 错误: 出现意外错误(type=No
我已经激活了 Spring 执行器 prometheus endpont /actuator/prometheus .通过添加千分尺和执行器的依赖项并启用 prometheus 端点。我怎样才能获得自
是否可以处理像 health 这样的执行器请求在与“主”应用程序分开的线程池中? 我为什么要问? 我有一个应用程序,它有时可能会用完所有可用线程,并且 Kubernetes 运行状况检查由于线程不可用
我正在使用springbooot 2.4.0,并添加了以下依赖项以启用普罗米修斯度量标准: org.springframework.boot spring-boot-
我有一个Spring Boot REST服务应用程序。该应用程序使用Spring Actuator来显示指标和健康信息。如何从运行同一应用程序的两个或多个容器中聚合此信息? 最佳答案 您需要将度量标准
我正在尝试在我的 Spring 项目(而不是 Spring Boot)中实现执行器。我在 pom 文件中添加了以下依赖项: org.springframework.boot
关于如何将/trace 端点中显示的信息记录到文件(日志文件)中的任何指示我的用例是我想使用执行器将所有请求和响应信息记录到日志文件中,这样我就有了将最少的日志记录相关代码写入我的应用程序代码中。我搜
我正在将 JSF 与 Birt 报告集成,并能够从 Java 代码连接 IHub 服务器。还获取某个特定文件夹中的所有报告文件,并将报告文件名显示到 JSF 数据列表中。现在,当任何人单击报告文件名时
本次示例以Windows示例 推荐到官网去下载:Windows版的应用程序 下载最新版 prometheus-2.37.8.windows-amd64 压缩包:解压就行
我想在调用执行器端点 /info 和 /health 时禁用 Content-Negotiation 这是我的配置文件 @Configuration public class InterceptorA
假设我有 Spring Boot 服务 A,它依赖于(调用)Spring Boot 服务 B。 A -> B Spring Boot Actuators可以告诉我 A 是否启动。 https://A/
最近我将 spring-boot-starter-actuator 更新到 2.2.2,当我使用 /health 端点时,我得到了: { "groups": [], "status":
我是一名优秀的程序员,十分优秀!