天天看點

spring boot 添加監控在application.properties中,添加在 啟動類中添加在 pom.xml中添加

在application.properties中,添加

spring.application.name=Spring Boot Admin Web
        spring.boot.admin.url=http://localhost:${server.port}
        spring.jackson.serialization.indent_output=true
        endpoints.health.sensitive=false
        management.security.enabled=false
        ribbon.ReadTimeout=60000
        ribbon.ConnectTimeout=60000           

在 啟動類中添加

@EnableAdminServer           

在 pom.xml中添加

<dependency>
                                    <groupId>de.codecentric</groupId>
                                    <artifactId>spring-boot-admin-server</artifactId>
                                    <version>1.5.7</version>
            </dependency>

            <dependency>
                <groupId>de.codecentric</groupId>
                <artifactId>spring-boot-admin-server-ui</artifactId>
                <version>1.5.7</version>
            </dependency>

            <dependency>
                <groupId>de.codecentric</groupId>
                <artifactId>spring-boot-admin-starter-client</artifactId>
                <version>1.5.7</version>
            </dependency>