栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 软件开发 > 后端开发 > Java > SpringBoot

SpringBoot中的Actuator

SpringBoot 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

SpringBoot中的Actuator

前序

Spring Boot有四大神器,分别是auto-configuration、starters、cli、actuator,本文主要讲actuator。actuator是spring boot提供的对应用系统的自省和监控的集成功能,可以对应用系统进行配置查看、相关功能统计等。

使用actuator


            org.springframework.boot

            spring-boot-starter-actuator

/autoconfig

{    "positiveMatches": {        "AuditAutoConfiguration.AuditEventRepositoryConfiguration": [

            {                "condition": "OnBeanCondition",

                "message": "@ConditionalOnMissingBean (types: org.springframework.boot.actuate.audit.AuditEventRepository; SearchStrategy: all) found no beans"

            }

        ]

    },

    "negativeMatches": {        "CacheStatisticsAutoConfiguration": [

            {                "condition": "OnBeanCondition",

                "message": "@ConditionalOnBean (types: org.springframework.cache.CacheManager; SearchStrategy: all) found no beans"

            }

        ]

    }

}

/configprops

{    "management.health.status.CONFIGURATION_PROPERTIES": {        "prefix": "management.health.status",

        "properties": {            "order": null

        }

    },

    "multipart.CONFIGURATION_PROPERTIES": {        "prefix": "multipart",

        "properties": {            "enabled": false,

            "maxRequestSize": "10Mb",

            "location": null,

            "fileSizeThreshold": "0",

            "maxFileSize": "1Mb"

        }

    },

    "environmentEndpoint": {        "prefix": "endpoints.env",

        "properties": {            "id": "env",

            "enabled": true,

            "sensitive": true

        }

    }

}


/beans

[

    {        "context": "application:8080",

        "parent": null,

        "beans": [

            {                "bean": "appMain",

                "scope": "singleton",

                "type": "com.xixicat.AppMain$$EnhancerBySpringCGLIB$$29382b14",

                "resource": "null",

                "dependencies": [ ]

            },

            {                "bean": "videoInfoMapper",

                "scope": "singleton",

                "type": "com.xixicat.dao.VideoInfoMapper",

                "resource": "file [/Users/xixicat/workspace/video-uber/target/classes/com/xixicat/dao/VideoInfoMapper.class]",

                "dependencies": [                    "sqlSessionFactory"

                ]

            }

        ]

    }

]



作者:程序o07
链接:https://www.jianshu.com/p/a048f58cd951


转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/235866.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号