spring boot 访问htmlactuator 怎么访问

Spring Boot Actuator---实时监控(一) - 简书
Spring Boot Actuator---实时监控(一)
摘要:在生产环境中,需要实时或定期监控服务的可用性。Actuator功能提供了很多监控所需要的接口;是spring boot应用系统的自省和监控的集成功能,可以对应用系统进行配置查看、相关功能统计。现在主要介绍通过端点查看配置明细。
开启Actuator
要启用Actuator的端点,只需要在项目中引入Actuator的起步依赖即可。在Gradle构建说明文件里即build.gradle,这个依赖是这样的:compile('org.springframework.boot:spring-boot-starter-actuator')在应用程序运行时自动配置都会生效。一、Actuator的端点
图1 Actuator的端点
1.1.查看配置明细(/beans)
获取Bean装配报告,使用端点/beans,可以了解应用程序中spring上下文的情况。该路劲返回一个JSON文档,描述上下文里每个Bean的情况,包括其Java类型以及注入的其他Bean。(运行项目后,输入http://localhost:8080/beans即可查看运行结果。)示例如下:
图2 /beans运行后示例截图
bean:Spring应用程序上下文中的Bean名称或ID。resource:.class文件的物理位置,通常是一个URL,指向构建出的JAR文件。这会随着应用程序的构建和运行方式发生变化。dependencies:当前Bean注入的Bean ID列表。scope:Bean的作用域(通常是单例,这也是默认作用域) 。type:Bean的Java类型。
1.1.1自动配置(/autoconfig)
运行项目后,输入http://localhost:8080/autoconfig。示例如下
图3 /autoconfig示例截图
在positiveMatches里,你会看到一个条件,决定Spring Boot是否自动配置JdbcTemplateBean。匹配到的名字是DataSourceAutoConfiguration.JdbcTemplateConfiguration#jdbcTemplate,这是运用了条件的具体配置类。条件类型是OnBeanCondition,意味着条件的输出是由某个Bean的存在与否来决定的。在本例中,message属性已经清晰地表明了该条件是检查是否有JdbcOperations类型(JbdcTemplate实现了该接口)的Bean存在。如果没有配置这种Bean,则条件成立,创建一个JdbcTemplate Bean。
在negativeMatches里,有一个条件决定了是否要配置ActiveMQ。这是一个OnClassCondition,会检查Classpath里是否存在ActiveMQConnectionFactory。因为Classpath里没有这个类,条件不成立,所以不会自动配置ActiveMQ。
1.1.2查看配置属性(/env)
/env端点会生成应用程序可用的所有环境属性的列表,无论这些属性是否用到。这其中包括环境变量、JVM属性、命令行参数,以及applicaition.properties文件提供的属性.运行项目后,输入http://localhost:8080/env。示例如下:
图4 /env示例截图
任何能给spring boot应用程序提供属性的属性源都会列在/evn的结果里。/env端点还能用来获取单个属性的值,只需要在请求时在/env后面加上属性名即可。
1.1.3生成端点到控制器的映射(/mappings)
图5 /mapping示例截图
每个映射的键都是一个字符串,其内容就是Spring MVC的@RequestMapping注解上设置的属性。实际上,这个字符串能清晰地了解控制器是如何映射的.每个映射的值都有两个属性:bean和method。bean属性标识了Spring Bean的名字,映射源自这个Bean。method属性是映射对应方法的全限定方法签名。未完待续。。。。。。敬请期待!!!
要么出众,要么出局赞助商链接
这是一个Spring Boot微服务仪表板。显示四列项目:UI, 资源Resources, 微服务和后端Backend. 每列显示相应的节点和四个列节点之间的相互调用连接。这些连接信息来自Spring Boot Actuator health并映射到端口, 将 consumer-driven-contract-tests 和超媒体hypermedia索引之间的约定聚合在一起显示。
赞助商链接
赞助商链接
最佳分辨率
OpenSource
Code & 2002-20博客分类:
视频&交流平台:
/course/introduction.htm?courseId=
http://-qq-/blog/2321532
网易云课堂视频最新更新:
第十一章 Spring Boot 日志
1、spring boot日志—理论
2、Spring Boot日志-logback
3、Spring Boot日志-log4j2
第十二章 Spring Boot 知识点2
1、spring boot 服务配置和部署
2、Spring Boot 定制URL匹配规则
Spring Boot应用启动器基本的一共有N(现知道的是44)种:具体如下:
1)spring-boot-starter
这是Spring Boot的核心启动器,包含了自动配置、日志和YAML。
2)spring-boot-starter-actuator
帮助监控和管理应用。
3)spring-boot-starter-amqp
通过spring-rabbit来支持AMQP协议(Advanced Message Queuing Protocol)。
4)spring-boot-starter-aop
支持面向方面的编程即AOP,包括spring-aop和AspectJ。
5)spring-boot-starter-artemis
通过Apache Artemis支持JMS的API(Java Message Service API)。
6)spring-boot-starter-batch
支持Spring Batch,包括HSQLDB数据库。
7)spring-boot-starter-cache
支持Spring的Cache抽象。
8)spring-boot-starter-cloud-connectors
支持Spring Cloud Connectors,简化了在像Cloud Foundry或Heroku这样的云平台上连接服务。
9)spring-boot-starter-data-elasticsearch
支持ElasticSearch搜索和分析引擎,包括spring-data-elasticsearch。
10)spring-boot-starter-data-gemfire
支持GemFire分布式数据存储,包括spring-data-gemfire。
11)spring-boot-starter-data-jpa
支持JPA(Java Persistence API),包括spring-data-jpa、spring-orm、Hibernate。
12)spring-boot-starter-data-mongodb
支持MongoDB数据,包括spring-data-mongodb。
13)spring-boot-starter-data-rest
通过spring-data-rest-webmvc,支持通过REST暴露Spring Data数据仓库。
14)spring-boot-starter-data-solr
支持Apache Solr搜索平台,包括spring-data-solr。
15)spring-boot-starter-freemarker
支持FreeMarker模板引擎。
16)spring-boot-starter-groovy-templates
支持Groovy模板引擎。
17)spring-boot-starter-hateoas
通过spring-hateoas支持基于HATEOAS的RESTful Web服务。
18)spring-boot-starter-hornetq
通过HornetQ支持JMS。
19)spring-boot-starter-integration
支持通用的spring-integration模块。
20)spring-boot-starter-jdbc
支持JDBC数据库。
21)spring-boot-starter-jersey
支持Jersey RESTful Web服务框架。
22)spring-boot-starter-jta-atomikos
通过Atomikos支持JTA分布式事务处理。
23)spring-boot-starter-jta-bitronix
通过Bitronix支持JTA分布式事务处理。
24)spring-boot-starter-mail
支持javax.mail模块。
25)spring-boot-starter-mobile
支持spring-mobile。
26)spring-boot-starter-mustache
支持Mustache模板引擎。
27)spring-boot-starter-redis
支持Redis键值存储数据库,包括spring-redis。
28)spring-boot-starter-security
支持spring-security。
29)spring-boot-starter-social-facebook
支持spring-social-facebook
30)spring-boot-starter-social-linkedin
支持pring-social-linkedin
31)spring-boot-starter-social-twitter
支持pring-social-twitter
32)spring-boot-starter-test
支持常规的测试依赖,包括JUnit、Hamcrest、Mockito以及spring-test模块。
33)spring-boot-starter-thymeleaf
支持Thymeleaf模板引擎,包括与Spring的集成。
34)spring-boot-starter-velocity
支持Velocity模板引擎。
35)spring-boot-starter-web
S支持全栈式Web开发,包括Tomcat和spring-webmvc。
36)spring-boot-starter-websocket
支持WebSocket开发。
37)spring-boot-starter-ws
支持Spring Web Services。
Spring Boot应用启动器面向生产环境的还有2种,具体如下:
1)spring-boot-starter-actuator
增加了面向产品上线相关的功能,比如测量和监控。
2)spring-boot-starter-remote-shell
增加了远程ssh shell的支持。
最后,Spring Boot应用启动器还有一些替换技术的启动器,具体如下:
1)spring-boot-starter-jetty
引入了Jetty HTTP引擎(用于替换Tomcat)。
2)spring-boot-starter-log4j
支持Log4J日志框架。
3)spring-boot-starter-logging
引入了Spring Boot默认的日志框架Logback。
4)spring-boot-starter-tomcat
引入了Spring Boot默认的HTTP引擎Tomcat。
5)spring-boot-starter-undertow
引入了Undertow HTTP引擎(用于替换Tomcat)。
确实好文,正在学习,感谢分享。Thank you very much !
厉害了 我的哥~~~楼主真的很666啊 大神
浏览: 1260915 次
感谢博主分享,我才能照着学,真心感谢,
xiangcunchouren 写道一般登录登录表单提交的时候 ...
是不是还有一种方式是在appliaction.properti ...
linsong8582 写道为什么默认的scale值是从配置文 ...
为什么默认的scale值是从配置文件中的calculate.s ...
(window.slotbydup=window.slotbydup || []).push({
id: '4773203',
container: s,
size: '200,200',
display: 'inlay-fix'关于springboot-actuator监控的401无权限访问 - 孤傲的一条bug - CSDN博客
关于springboot-actuator监控的401无权限访问
spring boot
今天心血来潮看一下spring监控
访问/beans
等敏感的信息时候报错
Tue Mar 07 21:18:57 GMT+08:00 2017
There was an unexpected error (type=Unauthorized, status=401).
Full authentication is required to access this resource.
application.properties添加配置参数
management.security.enabled=false
敏感(Sensitive)
autoconfig
显示一个auto-configuration的报告,该报告展示所有auto-configuration候选者及它们被应用或未被应用的原因
显示一个应用中所有Spring Beans的完整列表
configprops
显示一个所有@ConfigurationProperties的整理列表
执行一个线程转储
暴露来自Spring ConfigurableEnvironment的属性
展示应用的健康信息(当使用一个未认证连接访问时显示一个简单的’status’,使用认证连接访问则显示全部信息详情)
显示任意的应用信息
展示当前应用的’指标’信息
显示一个所有@RequestMapping路径的整理列表
允许应用以优雅的方式关闭(默认情况下不启用)
显示trace信息(默认为最新的一些HTTP请求)
网上找不到答案还是要看官方文档
我的热门文章在 SegmentFault,解决技术问题
每个月,我们帮助 1000 万的开发者解决各种各样的技术问题。并助力他们在技术能力、职业生涯、影响力上获得提升。
一线的工程师、著名开源项目的作者们,都在这里:
获取验证码
已有账号?
标签:至少1个,最多5个
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
查看自动配置的使用情况
/configprops
查看配置属性,包括默认配置
查看bean及其关系列表
打印线程栈
查看所有环境变量
/env/{name}
查看具体变量值
查看应用健康指标
查看应用信息
查看所有url映射
查看应用基本指标
/metrics/{name}
查看具体指标
查看基本追踪信息
/autoconfig
"positiveMatches": {
"AuditAutoConfiguration.AuditEventRepositoryConfiguration": [
"condition": "OnBeanCondition",
"message": "@ConditionalOnMissingBean (types: org.springframework.boot.actuate.audit.AuditEventR SearchStrategy: all) found no beans"
"negativeMatches": {
"CacheStatisticsAutoConfiguration": [
"condition": "OnBeanCondition",
"message": "@ConditionalOnBean (types: org.springframework.cache.CacheM 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
"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"
"threadName": "Signal Dispatcher",
"threadId": 4,
"blockedTime": -1,
"blockedCount": 0,
"waitedTime": -1,
"waitedCount": 0,
"lockName": null,
"lockOwnerId": -1,
"lockOwnerName": null,
"inNative": false,
"suspended": false,
"threadState": "RUNNABLE",
"stackTrace": [ ],
"lockedMonitors": [ ],
"lockedSynchronizers": [ ],
"lockInfo": null
"threadName": "Reference Handler",
"threadId": 2,
"blockedTime": -1,
"blockedCount": 217,
"waitedTime": -1,
"waitedCount": 9,
"lockName": "java.lang.ref.Reference$Lock@45de945",
"lockOwnerId": -1,
"lockOwnerName": null,
"inNative": false,
"suspended": false,
"threadState": "WAITING",
"stackTrace": [
"methodName": "wait",
"fileName": "Object.java",
"lineNumber": -2,
"className": "java.lang.Object",
"nativeMethod": true
"methodName": "wait",
"fileName": "Object.java",
"lineNumber": 503,
"className": "java.lang.Object",
"nativeMethod": false
"methodName": "run",
"fileName": "Reference.java",
"lineNumber": 133,
"className": "java.lang.ref.Reference$ReferenceHandler",
"nativeMethod": false
"lockedMonitors": [ ],
"lockedSynchronizers": [ ],
"lockInfo": {
"className": "java.lang.ref.Reference$Lock",
"identityHashCode":
profiles: [],
server.ports: {
local.server.port: 8080
servletContextInitParams: {},
systemProperties: {
java.runtime.name: "Java(TM) SE Runtime Environment",
sun.boot.library.path: "/Library/Java/JavaVirtualMachines/jdk1.7.0_79.jdk/Contents/Home/jre/lib",
java.vm.version: "24.79-b02",
gopherProxySet: "false",
maven.multiModuleProjectDirectory: "/Users/xixicat/workspace/video-uber",
java.vm.vendor: "Oracle Corporation",
java.vendor.url: "/",
guice.disable.misplaced.annotation.check: "true",
path.separator: ":",
java.vm.name: "Java HotSpot(TM) 64-Bit Server VM",
file.encoding.pkg: "sun.io",
user.country: "CN",
sun.java.launcher: "SUN_STANDARD",
sun.os.patch.level: "unknown",
PID: "763",
java.vm.specification.name: "Java Virtual Machine Specification",
user.dir: "/Users/xixicat/workspace/video-uber",
java.runtime.version: "1.7.0_79-b15",
java.awt.graphicsenv: "sun.awt.CGraphicsEnvironment",
java.endorsed.dirs: "/Library/Java/JavaVirtualMachines/jdk1.7.0_79.jdk/Contents/Home/jre/lib/endorsed",
os.arch: "x86_64",
java.io.tmpdir: "/var/folders/tl/xkf4nr6d3llz080000gn/T/",
line.separator: " ",
java.vm.specification.vendor: "Oracle Corporation",
os.name: "Mac OS X",
classworlds.conf: "/Users/xixicat/devtool/maven-3.3.3/bin/m2.conf",
sun.jnu.encoding: "UTF-8",
spring.beaninfo.ignore: "true",
java.library.path: "/Users/xixicat/Library/Java/Extensions:/Library/Java/Extensions:/Network/Library/Java/Extensions:/System/Library/Java/Extensions:/usr/lib/java:.",
java.specification.name: "Java Platform API Specification",
java.class.version: "51.0",
piler: "HotSpot 64-Bit Tiered Compilers",
os.version: "10.10.5",
user.home: "/Users/xixicat",
user.timezone: "Asia/Shanghai",
java.awt.printerjob: "sun.lwawt.macosx.CPrinterJob",
file.encoding: "UTF-8",
java.specification.version: "1.7",
java.class.path: "/Users/xixicat/devtool/maven-3.3.3/boot/plexus-classworlds-2.5.2.jar",
user.name: "xixicat",
java.vm.specification.version: "1.7",
mand: "org.codehaus.plexus.classworlds.launcher.Launcher spring-boot:run",
java.home: "/Library/Java/JavaVirtualMachines/jdk1.7.0_79.jdk/Contents/Home/jre",
sun.arch.data.model: "64",
user.language: "zh",
java.specification.vendor: "Oracle Corporation",
awt.toolkit: "sun.lwawt.macosx.LWCToolkit",
: "mixed mode",
java.version: "1.7.0_79",
java.ext.dirs: "/Users/xixicat/Library/Java/Extensions:/Library/Java/JavaVirtualMachines/jdk1.7.0_79.jdk/Contents/Home/jre/lib/ext:/Library/Java/Extensions:/Network/Library/Java/Extensions:/System/Library/Java/Extensions:/usr/lib/java",
sun.boot.class.path: "/Library/Java/JavaVirtualMachines/jdk1.7.0_79.jdk/Contents/Home/jre/lib/resources.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_79.jdk/Contents/Home/jre/lib/rt.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_79.jdk/Contents/Home/jre/lib/sunrsasign.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_79.jdk/Contents/Home/jre/lib/jsse.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_79.jdk/Contents/Home/jre/lib/jce.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_79.jdk/Contents/Home/jre/lib/charsets.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_79.jdk/Contents/Home/jre/lib/jfr.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_79.jdk/Contents/Home/jre/classes",
java.awt.headless: "true",
java.vendor: "Oracle Corporation",
maven.home: "/Users/xixicat/devtool/maven-3.3.3",
file.separator: "/",
LOG_EXCEPTION_CONVERSION_WORD: "%wEx",
java.vendor.url.bug: "/bugreport/",
sun.io.unicode.encoding: "UnicodeBig",
sun.cpu.endian: "little",
sun.cpu.isalist: ""
systemEnvironment: {
TERM: "xterm-256color",
ZSH: "/Users/xixicat/.oh-my-zsh",
GVM_BROKER_SERVICE: "http://release.gvm.io",
GRIFFON_HOME: "/Users/xixicat/.gvm/griffon/current",
JAVA_MAIN_CLASS_763: "org.codehaus.plexus.classworlds.launcher.Launcher",
JAVA_HOME: "/Library/Java/JavaVirtualMachines/jdk1.7.0_79.jdk/Contents/Home",
SHLVL: "1",
MAVEN_CMD_LINE_ARGS: " spring-boot:run",
__CF_USER_TEXT_ENCODING: "0x1F5:0x19:0x34",
GROOVY_HOME: "/Users/xixicat/.gvm/groovy/current",
XPC_FLAGS: "0x0",
GVM_INIT: "true",
JBAKE_HOME: "/Users/xixicat/.gvm/jbake/current",
PWD: "/Users/xixicat/workspace/video-uber",
GVM_DIR: "/Users/xixicat/.gvm",
GVM_VERSION: "2.4.3",
MAVEN_PROJECTBASEDIR: "/Users/xixicat/workspace/video-uber",
LOGNAME: "xixicat",
SSH_AUTH_SOCK: "/private/tmp/com.apple.launchd.93xr1duECQ/Listeners",
SPRINGBOOT_HOME: "/Users/xixicat/.gvm/springboot/current",
GAIDEN_HOME: "/Users/xixicat/.gvm/gaiden/current",
LAZYBONES_HOME: "/Users/xixicat/.gvm/lazybones/current",
OLDPWD: "/Users/xixicat/workspace/video-uber",
SHELL: "/bin/zsh",
JBOSSFORGE_HOME: "/Users/xixicat/.gvm/jbossforge/current",
LC_CTYPE: "zh_CN.UTF-8",
TMPDIR: "/var/folders/tl/xkf4nr6d3llz080000gn/T/",
GVM_SERVICE: "http://api.gvmtool.net",
GVM_PLATFORM: "Darwin",
CLASSPATH: ".:/Users/xixicat/.m2/repository/co/paralleluniverse/quasar-core/0.7.2/quasar-core-0.7.2.jar",
GLIDE_HOME: "/Users/xixicat/.gvm/glide/current",
PATH: "/Users/xixicat/.gvm/vertx/current/bin:/Users/xixicat/.gvm/springboot/current/bin:/Users/xixicat/.gvm/lazybones/current/bin:/Users/xixicat/.gvm/jbossforge/current/bin:/Users/xixicat/.gvm/jbake/current/bin:/Users/xixicat/.gvm/groovyserv/current/bin:/Users/xixicat/.gvm/groovy/current/bin:/Users/xixicat/.gvm/griffon/current/bin:/Users/xixicat/.gvm/grails/current/bin:/Users/xixicat/.gvm/gradle/current/bin:/Users/xixicat/.gvm/glide/current/bin:/Users/xixicat/.gvm/gaiden/current/bin:/Users/xixicat/.gvm/crash/current/bin:/Users/xixicat/.gvm/asciidoctorj/current/bin:/Users/xixicat/bin:/usr/local/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/git/bin:/Users/xixicat/devtool/maven-3.3.3/bin:/Users/xixicat/devtool/gradle-2.6/bin:/Users/xixicat/devtool/android-sdk/platform-tools",
GRADLE_HOME: "/Users/xixicat/.gvm/gradle/current",
GROOVYSERV_HOME: "/Users/xixicat/.gvm/groovyserv/current",
GRAILS_HOME: "/Users/xixicat/.gvm/grails/current",
USER: "xixicat",
LESS: "-R",
PAGER: "less",
HOME: "/Users/xixicat",
CRASH_HOME: "/Users/xixicat/.gvm/crash/current",
XPC_SERVICE_NAME: "0",
VERTX_HOME: "/Users/xixicat/.gvm/vertx/current",
GVM_BROADCAST_SERVICE: "http://cast.gvm.io",
Apple_PubSub_Socket_Render: "/private/tmp/com.apple.launchd.y6fNwP8Sk6/Render",
LSCOLORS: "Gxfxcxdxbxegedabagacad",
ASCIIDOCTORJ_HOME: "/Users/xixicat/.gvm/asciidoctorj/current"
applicationConfig: [classpath: /application.properties]: {
pool.acquireIncrement: "1",
pool.minPoolSize: "5",
pool.initialPoolSize: "1",
database.username: "root",
pool.maxIdleTime: "60",
database.url: "jdbc:mysql://127.0.0.1:3307/video_uber?autoReconnect=true&useUnicode=true&characterEncoding=UTF-8&zeroDateTimeBehavior=convertToNull",
spring.jackson.dateFormat: "yyyy-MM-dd'T'HH:mm:ss",
database.slave.username: "root",
spring.jackson.serialization.write - dates - as - timestamps: "false",
pool.idleTimeout: "30000",
database.slave.url: "jdbc:mysql://127.0.0.1:3307/demo?autoReconnect=true&useUnicode=true&characterEncoding=UTF-8&zeroDateTimeBehavior=convertToNull",
server.port: "8080",
database.slave.password: "******",
database.password: "******",
database.driverClassName: "com.mysql.jdbc.Driver",
pool.maxPoolSize: "50",
database.dataSourceClassName: "com.mysql.jdbc.jdbc2.optional.MysqlDataSource"
status: "UP",
diskSpace: {
status: "UP",
threshold:
status: "UP",
database: "MySQL",
需要自己在application.properties里头添加信息,比如
然后请求就可以出来了
"contact": {
"phone": "7",
"email": ""
[/metrics || /metrics.json], methods = [GET], produces = [application / json]
bean: "endpointHandlerMapping",
method: "public java.lang.Object org.springframework.boot.actuate.endpoint.mvc.EndpointMvcAdapter.invoke()"
[/beans || /beans.json], methods = [GET], produces = [application / json]
bean: "endpointHandlerMapping",
method: "public java.lang.Object org.springframework.boot.actuate.endpoint.mvc.EndpointMvcAdapter.invoke()"
[/health || /health.json], produces = [application / json]
bean: "endpointHandlerMapping",
method: "public java.lang.Object org.springframework.boot.actuate.endpoint.mvc.HealthMvcEndpoint.invoke(java.security.Principal)"
[/info || /info.json], methods = [GET], produces = [application / json]
bean: "endpointHandlerMapping",
method: "public java.lang.Object org.springframework.boot.actuate.endpoint.mvc.EndpointMvcAdapter.invoke()"
[/trace || /trace.json], methods = [GET], produces = [application / json]
bean: "endpointHandlerMapping",
method: "public java.lang.Object org.springframework.boot.actuate.endpoint.mvc.EndpointMvcAdapter.invoke()"
[/autoconfig || /autoconfig.json], methods = [GET], produces = [application / json]
bean: "endpointHandlerMapping",
method: "public java.lang.Object org.springframework.boot.actuate.endpoint.mvc.EndpointMvcAdapter.invoke()"
mem: 499404,
mem.free: 257591,
processors: 8,
instance.uptime: 4284997,
uptime: 4294909,
systemload.average: 1.,
mitted: 437248,
heap.init: 262144,
heap.used: 179656,
heap: 3728384,
mitted: 62848,
nonheap.init: 24000,
nonheap.used: 62156,
nonheap: 133120,
threads.peak: 18,
threads.daemon: 6,
threads.totalStarted: 176,
threads: 16,
classes: 10294,
classes.loaded: 10294,
classes.unloaded: 0,
gc.ps_scavenge.count: 11,
gc.ps_scavenge.time: 405,
gc.ps_marksweep.count: 0,
gc.ps_marksweep.time: 0,
datasource.primary.active: 0,
datasource.primary.usage: 0,
counter.status.200.autoconfig: 1,
counter.status.200.beans: 1,
counter.status.200.configprops: 1,
counter.status.200.dump: 1,
counter.status.200.env: 1,
counter.status.200.health: 1,
counter.: 1,
counter.status.200.mappings: 1,
gauge.response.autoconfig: 81,
gauge.response.beans: 15,
gauge.response.configprops: 105,
gauge.response.dump: 76,
gauge.response.env: 4,
gauge.response.health: 43,
gauge.response.mappings: 4
要真正生效,得配置文件开启
endpoints.shutdown.enabled: true
记录最近100个请求的信息
"timestamp": 2,
"method": "GET",
"path": "/metrics",
"headers": {
"request": {
"Accept - Encoding": "gzip, deflate, sdch",
"Upgrade - Insecure - Requests": "1",
"Accept - Language": "zh-CN,q=0.8,q=0.6",
"User - Agent": "Mozilla/5.0 (M Intel Mac OS X 10_10_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0. Safari/537.36",
"Accept": "text/html,application/xhtml+xml,application/q=0.9,image/webp,*/*;q=0.8",
"Connection": "keep-alive",
"Host": "localhost:8080"
"response": {
"Content - Type": "application/ charset=UTF-8",
"X - Application - Context": "application:8080",
"Date": "Sat, 16 Jan :24 GMT",
"status": "200"
"timestamp": 9,
"method": "GET",
"path": "/autoconfig",
"headers": {
"request": {
"Accept - Encoding": "gzip, deflate, sdch",
"Upgrade - Insecure - Requests": "1",
"Accept - Language": "zh-CN,q=0.8,q=0.6",
"User - Agent": "Mozilla/5.0 (M Intel Mac OS X 10_10_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0. Safari/537.36",
"Accept": "text/html,application/xhtml+xml,application/q=0.9,image/webp,*/*;q=0.8",
"Connection": "keep-alive",
"Host": "localhost:8080"
"response": {
"Content - Type": "application/ charset=UTF-8",
"X - Application - Context": "application:8080",
"Date": "Sat, 16 Jan :09 GMT",
"status": "200"
3 收藏&&|&&41
你可能感兴趣的文章
54 收藏,3.3k
6 收藏,5.6k
5 收藏,3.4k
本作品采用 署名-非商业性使用-禁止演绎 4.0 国际许可协议 进行许可
我想问一句,在security下,这东西该怎么用,management.address不管用不知道为什么。。。
我想问一句,在security下,这东西该怎么用,management.address不管用不知道为什么。。。
必须是spring boot项目才能用吗? spring mvc中怎么用?
必须是spring boot项目才能用吗? spring mvc中怎么用?
是springboot内置的
是springboot内置的
感觉有点鸡肋
感觉有点鸡肋
分享到微博?
我要该,理由是:

我要回帖

更多关于 spring boot 怎么访问 的文章

 

随机推荐