• spring boot admin


    这里记录一个spring cloud的模板,有的模块spring cloud eureka + spring boot admin + spring cloud zuul + 一个普通spring cloud服务service -A

    eureka-server:注册中心,api-gateway:网关,Admin-Server:spring boot admin的服务端,Service-A:普通服务A

    1、注册中心

    在浏览器中输入localhost:1111,然后输入waterlufei,123456就可以看到注册中心

    注册中心这一块,允许自己注册(便于adminserver监控到),关闭服务安全保护,开启权限控制

    2、普通服务

    访问localhost:4445/test能返回接口数据hahah,访问localhost:4445能够看到我们自己写的主页

    3、服务网关

    访问localhost:2222/api-a/test能返回接口数据hahah,访问localhost:2222/api-a/能够看到我们自己写的主页,实现了通过网关访问

    4、admin服务端

    访问localhost:9527,输入waterlufei,9527能够看到性能监控页面

     

     随便点进去一个可以看到服务的各种性能日志等

    需要注意的:

    1.如果需要看到log选项,需要在服务的配置文件中,指定生成日志文件

    2.admin-server指定的服务名称必须都是小写

    github源码地址:https://github.com/waterlufei/spring-cloud

  • 相关阅读:
    6章-项目进度管理-day5
    常规正则表达式
    axios删除接口
    elk
    英语笔记
    升级打怪
    用computed实现watch的保持子组件与父组件值同步
    vertical-align不生效的问题
    css居右
    使用maven创建spring工程出现配置文件打不开/不存在的错误
  • 原文地址:https://www.cnblogs.com/waterlufei/p/7327863.html
Copyright © 2020-2023  润新知