Spring Boot Endpoint
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的更多相关文章
- Spring Boot (27) actuator服务监控与管理
actuaotr是spring boot项目中非常强大的一个功能,有助于对应用程序进行监控和管理,通过restful api请求来监管.审计.收集应用的运行情况,针对微服务而言它是必不可少的一个环节. ...
- Spring Boot之执行器端点(Actuator Endpoint)实现剖析
整体实现思路是将端点(Endpoint)适配委托给MVC层策略端点(MvcEndpoint),再通过端点MVC适配器(EndpointMvcAdapter)将端点暴露为HTTP请求方式的MVC端点,最 ...
- 翻译-使用Ratpack和Spring Boot打造高性能的JVM微服务应用
这是我为InfoQ翻译的文章,原文地址:Build High Performance JVM Microservices with Ratpack & Spring Boot,InfoQ上的中 ...
- 第一个Spring Boot Web程序
需要的环境和工具: 1.Eclipse2.Java环境(JDK 1.7或以上版本)3.Maven 3.0+(Eclipse已经内置了) 写个Hello Spring: 1.新建一个Maven项目,项目 ...
- Spring boot配置文件 application.properties
http://www.tuicool.com/articles/veUjQba 本文记录Spring Boot application.propertis配置文件的相关通用属性 # ========= ...
- Spring Boot Admin 的使用 2
http://blog.csdn.net/kinginblue/article/details/52132113 ******************************************* ...
- Spring Boot Admin的使用
http://www.jianshu.com/p/e20a5f42a395 ******************************* 上一篇文章中了解了Spring Boot提供的监控接口,例如 ...
- 玩转spring boot——properties配置
前言 在以往的java开发中,程序员最怕大量的配置,是因为配置一多就不好统一管理,经常出现找不到配置的情况.而项目中,从开发测试环境到生产环境,往往需要切换不同的配置,如测试数据库连接换成生产数据库连 ...
- Spring Boot应用的健康监控
在之前的系列文章中我们学习了如何进行Spring Boot应用的功能开发,以及如何写单元测试.集成测试等,然而,在实际的软件开发中需要做的不仅如此:还包括对应用程序的监控和管理. 正如飞行员不喜欢盲目 ...
随机推荐
- surfer画世界频率分布图(等高线、地点标注)
以surfer 12版本为例: 1.下载世界地图,这里我随便提供一个范例(侵删,忘记出处了): 2.进入surfer软件,选择“MAP”——“NEW”——“BASE MAP”. 以此按照以上步骤,在弹 ...
- 构造代码块、this关键字、静态变量、静态代码块、主函数
一.构造代码块: 作用:给对象进行初始化. 特点:对象一经运行就执行(与变量声明时赋初值同级别,此处注意 非法前向引用) 优先于构造函数的执行. 与构造函数的区别: 构造代码块是给所有对象统一初始化. ...
- postman基于webservice的请求
以 http://ws.webxml.com.cn/WebServices/MobileCodeWS.asmx?op=getMobileCodeInfo 为例 1.先理解事例的内容,请求头和响应 ...
- jenkins学习:jenkins+gitlab
配置前提: 1.Jenkins已安装git plugin,gitlab plugin,安装过程可参考 https://www.cnblogs.com/zhizhiyin/p/9138309.html ...
- ES6(promise)_解决回调嵌套简单应用
一.前言 这个小案例是在node平台上应用的所以需要保证你的电脑: 1.安装和配置node.js环境 2.需要用node.js来开启一个http-server: 开启方法:https://blog.c ...
- 多态(instanceof)
多态调用的三种格式 * A:多态的定义格式: * 就是父类的引用变量指向子类对象 父类类型 变量名 = new 子类类型(); 变量名.方法名(); * B: 普通类多态定义的格式 父类 变量名 = ...
- Python之字符编码与文件操作
目录 字符编码 Python2和Python3中字符串类型的差别 文件操作 文件操作的方式 文件内光标的移动 文件修改 字符编码 什么是字符编码? ''' 字符编码就是制定的一个将人类的语言的字符与二 ...
- php中加密和解密
项目要和第三方进行接口对接,所以数据的安全很重要.第一次自己设计并实现,学习记录下 网上查了很多资料,真的很深奥 对称加密: 双方共用一个约定好的密钥进行数据的加密和解密,但是当密匙丢失,数据将有泄露 ...
- Linux下进程与线程的区别及查询方法
在平时工作中,经常会听到应用程序的进程和线程的概念,那么它们两个之间究竟有什么关系或不同呢?一.深入理解进程和线程的区别 1)两者概念 进程是具有一定独立功能的程序关于某个数据集合上的一次运行活动,进 ...
- bzoj2004 矩阵快速幂优化状压dp
https://www.lydsy.com/JudgeOnline/problem.php?id=2004 以前只会状压dp和矩阵快速幂dp,没想到一道题还能组合起来一起用,算法竞赛真是奥妙重重 小Z ...