spring boot 添加监控

与世无争的帅哥 提交于 2019-12-09 16:37:10

在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>
标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!