SpringBoot中的Actuator

前序

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

使用actuator

<dependency>

<groupId>org.springframework.boot</groupId>

<artifactId>spring-boot-starter-actuator</artifactId>

</dependency>


/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"

]

}

]

}

]

喜欢的话可以我的自建群642461309,目前还没人,您可以支持下,,学习交流请加群642461309

❤如果需要小编每天的发文资料,请私信小编即可!

❤提问/互动请留言,可直接在最底右下方"写留言即可"

❤如果觉得写得不错请点击“订阅”,每天更新全新的内容!

❤你们的喜欢和关注就是我最大的动力支撑!!!

❤今天的还在更新ing,请关注明天文章后续

猜你喜欢

转载自blog.csdn.net/qq_41214527/article/details/80676922