springbootadmin 客户端监控配置

springbootadmin 客户端监控配置

本次使用的版本号是1.5.6

先看看效果吧
在这里插入图片描述

加入依赖pom.xml

<dependencies>
<dependency>
			<groupId>de.codecentric</groupId>  <!-- sba 客户端基础类 logger 中需要 	-->
			<artifactId>spring-boot-admin-starter-client</artifactId>
			<version>1.5.6</version>
		</dependency>
		<dependency>
			<groupId>org.jolokia</groupId>   <!-- admin logger 中需要 	-->
			<artifactId>jolokia-core</artifactId>
		</dependency>
		 <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-actuator</artifactId>
        </dependency>
		<dependency>
			<groupId>ch.qos.logback</groupId> <!-- admin logger 采用logback (不用log4) 	-->
			<artifactId>logback-classic</artifactId>
			<version>1.1.11</version>
		</dependency>
	</dependencies>

	<build>
		<plugins>
			<plugin>
				<groupId>org.springframework.boot</groupId>
				<artifactId>spring-boot-maven-plugin</artifactId>
				<executions>
					<execution>
						<goals>
							<goal>build-info</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
		</plugins>
	</build>

application.properties

server.port=8081      //客户端 微服务的端口
spring.boot.admin.url=http://localhost:8088  //这里是sba的服务器地址,填写不正确不能正常注册到sba服务中
info.version=@project.version@
management.security.enabled=false      // 安全机制 一定要设置成false 不然不能检测到客户微服务信息
logging.file = /Users/neu_hehx/TestWeb.log.2018-12-12.log  // 这里要设置 微服务输出日志的地址,不然在sba中不能显示“log”标签,进行实时查询日志情况
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

何浩翔

如果对你多帮助,请支持。感谢!

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值