Spring boot / quartz webapp 没有发布 "actuator/quartz" 端点
Spring boot / quartz webapp doesn't publish the "actuator/quartz" endpoint
我有一个 spring 具有石英依赖项的启动 Web 应用程序,以及 spring 执行器 运行。但是执行器只发布了 14 个端点。是否需要启用某些功能才能让执行器发布石英端点?
父项目是
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.4.0</version>
</parent>
并具有以下 spring 依赖项
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-quartz</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa</artifactId>
</dependency>
以及以下执行器属性:
management.endpoint.shutdown.enabled=true
management.endpoint.quartz.enabled=true
management.endpoints.web.exposure.include=*
尽管依赖石英,但没有 spring 为石英发布的执行器端点。 /actuator 端点报告以下内容:
{
"_links": {
"self": {
"href": "https://localhost:8080/actuator",
"templated": false
},
"beans": {
"href": "https://localhost:8080/actuator/beans",
"templated": false
},
"caches-cache": {
"href": "https://localhost:8080/actuator/caches/{cache}",
"templated": true
},
"caches": {
"href": "https://localhost:8080/actuator/caches",
"templated": false
},
"health": {
"href": "https://localhost:8080/actuator/health",
"templated": false
},
"health-path": {
"href": "https://localhost:8080/actuator/health/{*path}",
"templated": true
},
"info": {
"href": "https://localhost:8080/actuator/info",
"templated": false
},
"conditions": {
"href": "https://localhost:8080/actuator/conditions",
"templated": false
},
"shutdown": {
"href": "https://localhost:8080/actuator/shutdown",
"templated": false
},
"configprops": {
"href": "https://localhost:8080/actuator/configprops",
"templated": false
},
"env": {
"href": "https://localhost:8080/actuator/env",
"templated": false
},
"env-toMatch": {
"href": "https://localhost:8080/actuator/env/{toMatch}",
"templated": true
},
"loggers": {
"href": "https://localhost:8080/actuator/loggers",
"templated": false
},
"loggers-name": {
"href": "https://localhost:8080/actuator/loggers/{name}",
"templated": true
},
"heapdump": {
"href": "https://localhost:8080/actuator/heapdump",
"templated": false
},
"threaddump": {
"href": "https://localhost:8080/actuator/threaddump",
"templated": false
},
"metrics-requiredMetricName": {
"href": "https://localhost:8080/actuator/metrics/{requiredMetricName}",
"templated": true
},
"metrics": {
"href": "https://localhost:8080/actuator/metrics",
"templated": false
},
"scheduledtasks": {
"href": "https://localhost:8080/actuator/scheduledtasks",
"templated": false
},
"mappings": {
"href": "https://localhost:8080/actuator/mappings",
"templated": false
}
}
}
您正在使用 Spring Boot 2.4.0,Quartz 端点是 new in Spring Boot 2.5.0。您应该升级到 2.5 才能使用它。
我有一个 spring 具有石英依赖项的启动 Web 应用程序,以及 spring 执行器 运行。但是执行器只发布了 14 个端点。是否需要启用某些功能才能让执行器发布石英端点?
父项目是
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.4.0</version>
</parent>
并具有以下 spring 依赖项
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-quartz</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa</artifactId>
</dependency>
以及以下执行器属性:
management.endpoint.shutdown.enabled=true
management.endpoint.quartz.enabled=true
management.endpoints.web.exposure.include=*
尽管依赖石英,但没有 spring 为石英发布的执行器端点。 /actuator 端点报告以下内容:
{
"_links": {
"self": {
"href": "https://localhost:8080/actuator",
"templated": false
},
"beans": {
"href": "https://localhost:8080/actuator/beans",
"templated": false
},
"caches-cache": {
"href": "https://localhost:8080/actuator/caches/{cache}",
"templated": true
},
"caches": {
"href": "https://localhost:8080/actuator/caches",
"templated": false
},
"health": {
"href": "https://localhost:8080/actuator/health",
"templated": false
},
"health-path": {
"href": "https://localhost:8080/actuator/health/{*path}",
"templated": true
},
"info": {
"href": "https://localhost:8080/actuator/info",
"templated": false
},
"conditions": {
"href": "https://localhost:8080/actuator/conditions",
"templated": false
},
"shutdown": {
"href": "https://localhost:8080/actuator/shutdown",
"templated": false
},
"configprops": {
"href": "https://localhost:8080/actuator/configprops",
"templated": false
},
"env": {
"href": "https://localhost:8080/actuator/env",
"templated": false
},
"env-toMatch": {
"href": "https://localhost:8080/actuator/env/{toMatch}",
"templated": true
},
"loggers": {
"href": "https://localhost:8080/actuator/loggers",
"templated": false
},
"loggers-name": {
"href": "https://localhost:8080/actuator/loggers/{name}",
"templated": true
},
"heapdump": {
"href": "https://localhost:8080/actuator/heapdump",
"templated": false
},
"threaddump": {
"href": "https://localhost:8080/actuator/threaddump",
"templated": false
},
"metrics-requiredMetricName": {
"href": "https://localhost:8080/actuator/metrics/{requiredMetricName}",
"templated": true
},
"metrics": {
"href": "https://localhost:8080/actuator/metrics",
"templated": false
},
"scheduledtasks": {
"href": "https://localhost:8080/actuator/scheduledtasks",
"templated": false
},
"mappings": {
"href": "https://localhost:8080/actuator/mappings",
"templated": false
}
}
}
您正在使用 Spring Boot 2.4.0,Quartz 端点是 new in Spring Boot 2.5.0。您应该升级到 2.5 才能使用它。