zoukankan      html  css  js  c++  java
  • 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

  • 相关阅读:
    QT调用其他UI并使用QLabel(text)
    QT调用单例模式脚本
    QT 调用另一个UI实现方式
    QT 键值
    (一) Mybatis 源码解析之源码概述
    设计模式之 模板模式开发
    十二、线程池
    (十一)并发容器ConcurrentHashMap
    mybatis plus 踩坑记 -- 自动填充
    C/C++ file
  • 原文地址:https://www.cnblogs.com/huilei/p/10255398.html
Copyright © 2011-2022 走看看