为了账号安全,请及时绑定邮箱和手机立即绑定

SpringBoot中的Actuator

标签:
SpringBoot

前序

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

使用actuator

<dependency>


            org.springframework.boot

            spring-boot-starter-actuator

</dependency>

webp

/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

        }

    }

}


webp

/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


点击查看更多内容
TA 点赞

若觉得本文不错,就分享一下吧!

评论

作者其他优质文章

正在加载中
  • 推荐
  • 评论
  • 收藏
  • 共同学习,写下你的评论
感谢您的支持,我会继续努力的~
扫码打赏,你说多少就多少
赞赏金额会直接到老师账户
支付方式
打开微信扫一扫,即可进行扫码打赏哦
今天注册有机会得

100积分直接送

付费专栏免费学

大额优惠券免费领

立即参与 放弃机会
微信客服

购课补贴
联系客服咨询优惠详情

帮助反馈 APP下载

慕课网APP
您的移动学习伙伴

公众号

扫描二维码
关注慕课网微信公众号

举报

0/150
提交
取消