Spring Boot 的 Endpoints 带着强烈的 DevOps 色彩, “you build it, you run it” ,开发不仅要关心如何实现功能,还需要关心服务在线上运行的状态,如果缺乏实时监控,维护线上服务必然是一场噩梦。

/**
* An endpoint that can be used to expose useful information to operations. Usually
* exposed via Spring MVC but could also be exposed using some other technique. Consider
* extending {@link AbstractEndpoint} if you are developing your own endpoint.
*
* @param <T> the endpoint data type
* @author Phillip Webb
* @author Dave Syer
* @author Christian Dupuis
* @see AbstractEndpoint
*/
public interface Endpoint<T> { /**
* The logical ID of the endpoint. Must only contain simple letters, numbers and '_'
* characters (i.e. a {@literal "\w"} regex).
* @return the endpoint ID
*/
String getId(); /**
* Return if the endpoint is enabled.
* @return if the endpoint is enabled
*/
boolean isEnabled(); /**
* Return if the endpoint is sensitive, i.e. may return data that the average user
* should not see. Mappings can use this as a security hint.
* @return if the endpoint is sensitive
*/
boolean isSensitive(); /**
* Called to invoke the endpoint.
* @return the results of the invocation
*/
T invoke(); }

demo

https://412887952-qq-com.iteye.com/blog/2380027


Springboot admin

ref

https://docs.spring.io/spring-boot/docs/1.1.x/reference/htmlsingle/#production-ready-endpoints

https://docs.spring.io/spring-boot/docs/current/reference/html/production-ready-endpoints.html

Spring Boot Endpoint的更多相关文章

  1. Spring Boot (27) actuator服务监控与管理

    actuaotr是spring boot项目中非常强大的一个功能,有助于对应用程序进行监控和管理,通过restful api请求来监管.审计.收集应用的运行情况,针对微服务而言它是必不可少的一个环节. ...

  2. Spring Boot之执行器端点(Actuator Endpoint)实现剖析

    整体实现思路是将端点(Endpoint)适配委托给MVC层策略端点(MvcEndpoint),再通过端点MVC适配器(EndpointMvcAdapter)将端点暴露为HTTP请求方式的MVC端点,最 ...

  3. 翻译-使用Ratpack和Spring Boot打造高性能的JVM微服务应用

    这是我为InfoQ翻译的文章,原文地址:Build High Performance JVM Microservices with Ratpack & Spring Boot,InfoQ上的中 ...

  4. 第一个Spring Boot Web程序

    需要的环境和工具: 1.Eclipse2.Java环境(JDK 1.7或以上版本)3.Maven 3.0+(Eclipse已经内置了) 写个Hello Spring: 1.新建一个Maven项目,项目 ...

  5. Spring boot配置文件 application.properties

    http://www.tuicool.com/articles/veUjQba 本文记录Spring Boot application.propertis配置文件的相关通用属性 # ========= ...

  6. Spring Boot Admin 的使用 2

    http://blog.csdn.net/kinginblue/article/details/52132113 ******************************************* ...

  7. Spring Boot Admin的使用

    http://www.jianshu.com/p/e20a5f42a395 ******************************* 上一篇文章中了解了Spring Boot提供的监控接口,例如 ...

  8. 玩转spring boot——properties配置

    前言 在以往的java开发中,程序员最怕大量的配置,是因为配置一多就不好统一管理,经常出现找不到配置的情况.而项目中,从开发测试环境到生产环境,往往需要切换不同的配置,如测试数据库连接换成生产数据库连 ...

  9. Spring Boot应用的健康监控

    在之前的系列文章中我们学习了如何进行Spring Boot应用的功能开发,以及如何写单元测试.集成测试等,然而,在实际的软件开发中需要做的不仅如此:还包括对应用程序的监控和管理. 正如飞行员不喜欢盲目 ...

随机推荐

  1. VMware加载vmdk文件

    VMware软件文件菜单选择---映射虚拟磁盘选项,如图1所示

  2. AndroidStudio快速入门四:打造你的开发工具,settings必备

    http://blog.csdn.net/jf_1994/article/details/50085825 前言:这里是使用AS的基本设置,适合新入手的朋友阅读,将这里介绍的设置完基本使用无忧啦. 1 ...

  3. 使用perconna xtrabackup备份脚本

    使用percona xtrabackup对两个数据库实例进行备份,备份的脚本如下所示: #!/bin/bash BASEDIR="/usr/local/mysql" BIN=&qu ...

  4. 为什么fork()2次会避免产生僵尸进程

    什么是僵尸进程:用fork()创建子进程后,子进程已终止但父进程没有对它进行善后处理,那么子进程的进程描述符就一直保存在内存中,子进程就是僵尸进程. 怎么产生僵尸进程: 1.父进程没有SIGCHLD信 ...

  5. qml: 自定义输入框

    import QtQuick 2.7 Rectangle { width:; height:; border.width:; border.color: "#E7E7E7" rad ...

  6. go etcd

    etcd介绍 GitHub:https://github.com/coreos/etcd 官网:https://coreos.com/etcd/ 下载:https://github.com/coreo ...

  7. mysql的使用

    数据库操作: 1)创建数据库和删除数据库 使用普通用户,你可能需要特定的权限来创建或者删除 MySQL 数据库,root用户拥有最高权限,可以使用 mysqladmin 命令来创建数据库: mysql ...

  8. jenkins 构建

    自动触发构建 远程构建 本地默认情况下是能够自动构建的,因为浏览器已经登录 了jenkins,如果从别的地方调用的话需要加上用户名和密码做认证,方法如下 curl -u a:a http://Jenk ...

  9. Elastic Stack之ElasticSearch分布式集群二进制方式部署

    Elastic Stack之ElasticSearch分布式集群二进制方式部署 作者:尹正杰  版权声明:原创作品,谢绝转载!否则将追究法律责任. 想必大家都知道ELK其实就是Elasticsearc ...

  10. Java并发注解Annotation

    Java并发编程中,用到了一些专门为并发编程准备的 Annotation. 主要包括三类: 1.类 Annotation(注解) 就像名字一样,这些注解是针对类的.主有要以下三个: @Immutabl ...