前序
Spring Boot有四大神器,分别是auto-configuration、starters、cli、actuator,本文主要讲actuator。actuator是spring boot提供的对应用系统的自省和监控的集成功能,可以对应用系统进行配置查看、相关功能统计等。
使用actuator
<dependency>
org.springframework.boot
spring-boot-starter-actuator
</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(职业交流群),您可以支持下
❤提问/互动请留言,可直接在最底右下方"写留言即可"
❤如果觉得写得不错请点击“订阅”,每天更新全新的内容!
❤你们的喜欢和关注就是我最大的动力支撑!!!
网友评论