[英]How to specify custom health check registry in spring boot (application.yml)
Is it possible to inject a custom com.codahale.metrics.health.HealthCheckRegistry
in a spring boot application using the property spring.datasource.hikari.health-check-registry
in application.yml ? 是否可以使用application.yml中的spring.datasource.hikari.health-check-registry
属性在春季启动应用程序中注入自定义com.codahale.metrics.health.HealthCheckRegistry
? And how to do that? 以及如何做到这一点?
spring:
datasource:
driver-class-name: com.microsoft.sqlserver.jdbc.SQLServerDriver
url: jdbc:sqlserver://localhost:1433;databaseName=mydb;failoverPatner=
username: db_user
password: db_pass
hikari:
data-source-properties:
cachePrepStmts: true
prepStmtCacheSize: 250
health-check-registry: ???????
jmx-enabled: true
I suggest choosing an alternative because there is little information about this. 我建议选择一种替代方法,因为有关此方面的信息很少。
I searched Google and StackOverflow and found nothing useful. 我搜索了Google和StackOverflow,发现没有任何用处。
Hope this could be useful for you. 希望这对您有用。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.