Spring Boot + Spring Cloud 实现权限管理系统 (系统服务监控)
系统服务监控
新建监控工程
新建Spring Boot项目,取名 kitty-monitor,结构如下。
添加项目依赖
添加 spring boot admin 的相关依赖。
pom.xml

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

修改启动端口
修改监控服务器启动端口号。
application.yml
# tomcat
server:
port: 8000
修改启动器类
修改启动器类,主要是添加@EnableAdminServer注解开启监控服务器的支持。

package com.louis.kitty.monitor; import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication; import de.codecentric.boot.admin.server.config.EnableAdminServer; @EnableAdminServer
@SpringBootApplication
public class KittyMonitorApplication { public static void main(String[] args) {
SpringApplication.run(KittyMonitorApplication.class, args);
}
}

启动监控服务端
至此,监控服务端就完成了。
启动应用,访问 http://localhost:8000,效果如下。
服务监控客户端
将 kitty-admin 和 kitty-bakcup 注册成服务监控客户端,这里以 kitty-bakcup 为例。
添加依赖
添加服务监控客户端依赖包。
kitty-backup/pom.xml
<dependency>
<groupId>de.codecentric</groupId>
<artifactId>spring-boot-admin-starter-client</artifactId>
<version>2.0.0</version>
</dependency>
添加配置
修改配置文件,注册服务监控客户端。
application.yml

# tomcat
server:
port: 8001
# spring boot admin
spring:
application:
name: Kitty Backup Service
boot:
admin:
client:
url: "http://localhost:8000"
management:
endpoints:
web:
exposure:
include: "*"
# backup datasource
kitty:
backup:
datasource:
host: localhost
userName: root
password: 123456
database: kitty

启动测试
启动备份服务,会出现下图所示监控客户端服务注册推送通知。
再次查看监控页面,如下图所示。
Application 页面。
Wallboard 页面。
Wallboard 页面各种明细指标。
服务上线日志。
kitty-boot 服务同理,改造完成,启动后显示。
Spring Boot + Spring Cloud 实现权限管理系统 (系统服务监控)的更多相关文章
- 新书上线:《Spring Boot+Spring Cloud+Vue+Element项目实战:手把手教你开发权限管理系统》,欢迎大家买回去垫椅子垫桌脚
新书上线 大家好,笔者的新书<Spring Boot+Spring Cloud+Vue+Element项目实战:手把手教你开发权限管理系统>已上线,此书内容充实.材质优良,乃家中必备垫桌脚 ...
- [权限管理系统(四)]-spring boot +spring security短信认证+redis整合
[权限管理系统]spring boot +spring security短信认证+redis整合 现在主流的登录方式主要有 3 种:账号密码登录.短信验证码登录和第三方授权登录,前面一节Sprin ...
- 基于Spring Boot和Shiro的后台管理系统FEBS
FEBS是一个简单高效的后台权限管理系统.项目基础框架采用全新的Java Web开发框架 —— Spring Boot 2.0.3,消除了繁杂的XML配置,使得二次开发更为简单:数据访问层采用Myba ...
- spring Boot+spring Cloud实现微服务详细教程第二篇
上一篇文章已经说明了一下,关于spring boot创建maven项目的简单步骤,相信很多熟悉Maven+Eclipse作为开发常用工具的朋友们都一目了然,这篇文章主要讲解一下,构建spring bo ...
- spring Boot+spring Cloud实现微服务详细教程第一篇
前些天项目组的大佬跟我聊,说项目组想从之前的架构上剥离出来公用的模块做微服务的开发,恰好去年的5/6月份在上家公司学习了国内开源的dubbo+zookeeper实现的微服务的架构.自己平时对微服务的设 ...
- Cola Cloud 基于 Spring Boot, Spring Cloud 构建微服务架构企业级开发平台
Cola Cloud 基于 Spring Boot, Spring Cloud 构建微服务架构企业级开发平台: https://gitee.com/leecho/cola-cloud
- spring boot、cloud v2.1.0.RELEASE 使用及技术整理
2018年10月30日 springboot v2.1.0.RELEASE 发布: https://github.com/spring-projects/spring-boot/releases/ta ...
- Spring Boot/Spring Cloud、ESB、Dubbo
如何使用Spring Boot/Spring Cloud 实现微服务应用spring Cloud是一个基于Spring Boot实现的云应用开发工具,它为基于JVM的云应用开发中的配置管理.服务发现. ...
- 使用Spring Boot,Spring Cloud和Docker实现微服务架构
https://github.com/sqshq/PiggyMetrics Microservice Architecture with Spring Boot, Spring Cloud a ...
- spring boot 2 + shiro 实现权限管理
Shiro是一个功能强大且易于使用的Java安全框架,主要功能有身份验证.授权.加密和会话管理.看了网上一些文章,下面2篇文章写得不错.Springboot2.0 集成shiro权限管理 Spring ...
随机推荐
- Linux下安装Gensim
依赖软件包:numpy 直接使用pip安装: [root@mycentos ~]#pip install gensim 安装gensim的时候会遇到下面的一系列错误: Cannot uninstall ...
- SQL Server 之 事务与隔离级别实例讲解
SQL Server 之 事务与隔离级别实例讲解 SQL Server 实现了6个隔离级别来防止并发情况下,类似企图并发的访问或修改同一数据时问题的发生.本文将带你体验全部6个隔离级别.正如你接下来将 ...
- Docker 推送镜像到hub.docker
1.Docker镜像文件:lails.server.demo:1.0, 2.登录Docker:docker login[根据提示输入用户名/密码] 3.执行:docker push lails.ser ...
- cookie session 讲解
cookie: cookie的定义: cookie 是由web服务器保存在用户浏览器(客户端)上的小文本文件,它可以包含有关用户的信息,并且在每次请求时会携带保存的数据去访问服务器,所以cookie有 ...
- sql语句中 “where 1=1” 的用处
通过拼凑sql语句,加入若干个where限制条件,如:select * from table "where conditionA" + ”and conditionB“ + ”an ...
- 0001-20180421-自动化第一章-python基础学习笔记
======================学习python==================介绍: python种类: cpython(*),jpython,ironpython,rubypyth ...
- flutter popup
card ? Overlay https://docs.flutter.io/flutter/widgets/Overlay-class.html pending....
- 使用 mysqladmin debug 查看死锁信息
使用 mysqladmin debug 查看死锁信息 mysqladmin -S /mysql/data/mysql.sock debug 然后在error日志中,会看到: 11 lock struc ...
- Yii1自定义 CGridView 中的操作按钮中 CButtonColumn 选项
Yii可以使用CButtonColumn自定义按钮及列样式. 效果展示 <?php $this->widget('zii.widgets.grid.CGridView', array( ' ...
- CSS 页面布局、后台管理示例
CSS 页面布局.后台管理示例 页面布局 1.头部菜单 2.中间内容/中间左侧菜单 3.底部内容 <div class='pg-header'> <div style='width: ...