Package org.springframework.boot.actuate.health

Examples of org.springframework.boot.actuate.health.AbstractHealthIndicator


    @Bean
    public HealthIndicator healthIndicator(DataSource dataSource) {
        if (dataSource instanceof org.apache.tomcat.jdbc.pool.DataSource) {
            org.apache.tomcat.jdbc.pool.DataSource tcDataSource =
                    (org.apache.tomcat.jdbc.pool.DataSource) dataSource;
            return new AbstractHealthIndicator() {
                @Override
                protected void doHealthCheck(Builder healthBuilder) throws Exception {
                    healthBuilder.up().withDetail("active", tcDataSource.getActive())
                            .withDetail("max_active", tcDataSource.getMaxActive())
                            .withDetail("idle", tcDataSource.getIdle())
View Full Code Here

TOP

Related Classes of org.springframework.boot.actuate.health.AbstractHealthIndicator

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.