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. node.js中的文件系统

    文件打开操作 fs.open(path, flags[, mode], callback) path: <string>|<Buffer>|<URL> flags: ...

  2. latex 双引号 “

    别在latex敲,在记事本上敲完后,拷贝到latex中.

  3. python列表的常用方法

  4. java 文件创建 调试

    BufferedWriter bw=new BufferedWriter(new FileWriter("/2.txt")); bw.write("hello" ...

  5. No cached version of cn.lightsky.infiniteindicator:library:1.2.2 available for offline mode.

    去掉勾勾

  6. 深入理解之css中的border属性

    1. border-width:不支持不百分比 1)受本身的使用场景决定. 例子:左边为手机,右边为显示器,但是他们边框的宽度是差不多的,不会因为设备大就让边框宽度变大. 2. border-widt ...

  7. opencv: 线性拟合

    opencv提供了fitline函数用于直线拟合,原型为: C++: void fitLine(InputArray points, OutputArray line, int distType, d ...

  8. 用count sql做jmeter的while条件

    ${__groovy(vars.get("pboc_req_record_counter_1") == "Invalid"  || vars.get(" ...

  9. 发送HTTP_GET请求 表头application/json

    /** * 发送HTTP_GET请求 * 该方法会自动关闭连接,释放资源 * @param reqURL 请求地址(含参数) * @param decodeCharset 解码字符集,解析响应数据时用 ...

  10. 【SQL】SQL中on条件与where条件的区别

     #前言 数据库在通过连接两张或多张表来返回记录时,都会生成一张中间的临时表,然后再将这张临时表返回给用户. 在使用left jion时,on和where条件的区别如下: 1.on条件是在生成临时表时 ...