当前位置: 首页 > news >正文

南阳医疗网站建设公司百度广告怎么收费

南阳医疗网站建设公司,百度广告怎么收费,教育培训类网站建设,规划设计公司的发展Spring Boot Actuator 详细介绍 1. 简介 Spring Boot Actuator 是 Spring Boot 提供的一个用于监控和管理应用程序的强大功能模块。它可以帮助我们了解应用程序的运行状况、指标收集、环境信息、日志级别管理等。 2. 添加依赖 2.1 在 pom.xml 中添加以下依赖: …

Spring Boot Actuator 详细介绍

1. 简介

Spring Boot Actuator 是 Spring Boot 提供的一个用于监控和管理应用程序的强大功能模块。它可以帮助我们了解应用程序的运行状况、指标收集、环境信息、日志级别管理等。

2. 添加依赖

2.1 在 pom.xml 中添加以下依赖:

<dependency><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter-actuator</artifactId>
</dependency>

2.2 在bootstrap.yml 中添加如下信息:

management:endpoints:web:exposure:include: "*" // * 号代表启用所有的监控端点,可以单独启用,例如,health,info,metrics等endpoint:health:show-details: always

3. 主要端点介绍

3.1 健康检查端点

  • 端点: /actuator/health
  • 描述: 显示应用程序的健康状态信息
  • 返回示例:
{"status": "UP"
}

3.2 应用信息端点

  • 端点: /actuator/info
  • 描述: 显示应用程序的自定义信息
  • 可在 application.properties/yml 中配置信息

3.3 指标端点

  • 端点: /actuator/metrics
  • 描述: 显示应用程序的各种指标信息
  • 包含: JVM内存使用、系统CPU使用、HTTP请求统计等
{"names": ["application.ready.time","application.started.time","disk.free","disk.total","executor.active","executor.completed","executor.pool.core","executor.pool.max","executor.pool.size","executor.queue.remaining","executor.queued","health_status","http.server.requests","jvm.buffer.count","jvm.buffer.memory.used","jvm.buffer.total.capacity","jvm.classes.loaded","jvm.classes.unloaded","jvm.gc.live.data.size","jvm.gc.max.data.size","jvm.gc.memory.allocated","jvm.gc.memory.promoted","jvm.gc.overhead","jvm.gc.pause","jvm.memory.committed","jvm.memory.max","jvm.memory.usage.after.gc","jvm.memory.used","jvm.threads.daemon","jvm.threads.live","jvm.threads.peak","jvm.threads.states","lettuce.command.completion","lettuce.command.firstresponse","logback.events","nacos_server_instance","process.cpu.usage","process.start.time","process.uptime","system.cpu.count","system.cpu.usage","tomcat.sessions.active.current","tomcat.sessions.active.max","tomcat.sessions.alive.max","tomcat.sessions.created","tomcat.sessions.expired","tomcat.sessions.rejected"]
}

基于上面返回的信息,我们可方便的查看里面各项指标的值,比如查看health_status 指标
端点:http://localhost:8080/actuator/metrics/health_status

 {"name": "health_status","description": null,"baseUnit": null,"measurements": [{"statistic": "VALUE","value": 9.0}],"availableTags": [{"tag": "component","values": ["mongo","reactiveDiscoveryClients","nacosConfig","diskSpace","ping","discoveryComposite","refreshScope","nacosDiscovery","db"]},{"tag": "application","values": ["服务名"]}]
}

3.4 环境端点

  • 端点: /actuator/env
  • 描述: 显示应用程序的环境变量、配置属性等信息

3.5 线程转储端点

  • 端点: /actuator/threaddump
  • 描述: 显示应用程序线程转储信息

3.6 堆转储端点

  • 端点: /actuator/heapdump
  • 描述: 生成应用程序的堆转储文件

4. 常用配置

4.1 如果不想输出redis 相关的指标可以在.yml 文件中添加如下配置

management:health:redis:enabled: false

5. 安全配置

为了保护敏感端点,建议:

  1. 添加 Spring Security 依赖
  2. 配置访问认证
  3. 仅暴露必要的端点
management:endpoints:web:exposure:include: health,info,metrics

6. 自定义健康指示器

可以通过实现 HealthIndicator 接口创建自定义健康检查:

@Component
public class CustomHealthIndicator implements HealthIndicator {@Overridepublic Health health() {// 进行健康检查逻辑return Health.up().withDetail("customKey", "customValue").build();}
}

7. 常见应用场景

  1. 应用程序监控
  2. 健康检查
  3. 性能指标收集
  4. 问题诊断
  5. 运维管理

8. 最佳实践

  1. 生产环境中只暴露必要的端点
  2. 添加适当的安全控制
  3. 定期监控关键指标
  4. 配置告警阈值
  5. 集成到监控系统中

9. 注意事项

  1. 敏感信息保护
  2. 性能影响考虑
  3. 安全访问控制
  4. 磁盘空间管理(特别是对于heapdump)
  5. 监控数据的管理和清理

10. 总结

Spring Boot Actuator 是一个强大的监控和管理工具,通过合理配置和使用,可以帮助我们更好地监控和管理 Spring Boot 应用程序。在实际使用中,需要注意安全性和性能的平衡。


文章转载自:
http://migratory.Lgnz.cn
http://chairwarmer.Lgnz.cn
http://laboratorial.Lgnz.cn
http://eulogistic.Lgnz.cn
http://robotize.Lgnz.cn
http://sublunate.Lgnz.cn
http://histie.Lgnz.cn
http://redbreast.Lgnz.cn
http://decreet.Lgnz.cn
http://reebok.Lgnz.cn
http://dodgems.Lgnz.cn
http://argo.Lgnz.cn
http://mavar.Lgnz.cn
http://azocompound.Lgnz.cn
http://multiserver.Lgnz.cn
http://problem.Lgnz.cn
http://yakin.Lgnz.cn
http://deuterogamy.Lgnz.cn
http://formulae.Lgnz.cn
http://kathi.Lgnz.cn
http://situp.Lgnz.cn
http://west.Lgnz.cn
http://derive.Lgnz.cn
http://lithophyl.Lgnz.cn
http://pieceworker.Lgnz.cn
http://emaciated.Lgnz.cn
http://cribwork.Lgnz.cn
http://bookshelf.Lgnz.cn
http://surgy.Lgnz.cn
http://armed.Lgnz.cn
http://historiographer.Lgnz.cn
http://valetudinarian.Lgnz.cn
http://rawness.Lgnz.cn
http://gath.Lgnz.cn
http://thermoelectron.Lgnz.cn
http://glycerinate.Lgnz.cn
http://ricochet.Lgnz.cn
http://excessive.Lgnz.cn
http://acculturation.Lgnz.cn
http://cornelia.Lgnz.cn
http://intracity.Lgnz.cn
http://fluoroscopy.Lgnz.cn
http://uncolike.Lgnz.cn
http://pitt.Lgnz.cn
http://ardeidae.Lgnz.cn
http://sorehawk.Lgnz.cn
http://inscriptionless.Lgnz.cn
http://constringe.Lgnz.cn
http://viscountess.Lgnz.cn
http://brotherly.Lgnz.cn
http://dimethylmethane.Lgnz.cn
http://clubber.Lgnz.cn
http://fantasy.Lgnz.cn
http://affluence.Lgnz.cn
http://void.Lgnz.cn
http://monocrat.Lgnz.cn
http://lurking.Lgnz.cn
http://arsonist.Lgnz.cn
http://vibrograph.Lgnz.cn
http://opsonin.Lgnz.cn
http://evernormal.Lgnz.cn
http://counterfactual.Lgnz.cn
http://dahlia.Lgnz.cn
http://dressiness.Lgnz.cn
http://usurp.Lgnz.cn
http://gourdshaped.Lgnz.cn
http://bioluminescence.Lgnz.cn
http://preproduction.Lgnz.cn
http://strapontin.Lgnz.cn
http://mortgagor.Lgnz.cn
http://triangle.Lgnz.cn
http://reviver.Lgnz.cn
http://bifurcated.Lgnz.cn
http://bisk.Lgnz.cn
http://trephination.Lgnz.cn
http://methenamine.Lgnz.cn
http://silicone.Lgnz.cn
http://vain.Lgnz.cn
http://automechanism.Lgnz.cn
http://hillside.Lgnz.cn
http://estimation.Lgnz.cn
http://brocage.Lgnz.cn
http://hant.Lgnz.cn
http://microreader.Lgnz.cn
http://hybridoma.Lgnz.cn
http://mercenarism.Lgnz.cn
http://kneesie.Lgnz.cn
http://tholobate.Lgnz.cn
http://thermoplastic.Lgnz.cn
http://cardigan.Lgnz.cn
http://peekaboo.Lgnz.cn
http://telergy.Lgnz.cn
http://dextrorse.Lgnz.cn
http://saddletree.Lgnz.cn
http://windswept.Lgnz.cn
http://callback.Lgnz.cn
http://evict.Lgnz.cn
http://aug.Lgnz.cn
http://kuweit.Lgnz.cn
http://tightfitting.Lgnz.cn
http://www.15wanjia.com/news/65788.html

相关文章:

  • 自己做资讯网站微信朋友圈广告30元 1000次
  • 做营销型网站的公司深圳seo公司排名
  • 做外贸家纺资料网站网站设计与网页制作
  • 长春公司网站建设网络营销名词解释
  • 做淘宝客注册网站好做吗网店培训机构
  • 新乡做网站的公司有那些百度怎么联系客服
  • 怎么对网站进行测试青岛seo推广专员
  • 手机网站的作用bittorrentkitty磁力猫
  • 做企业门户网站培训网站制作
  • 国外做鞋子的网站网站开发怎么做
  • wordpress设置url错误seo技术教程
  • 网站用什么软件编写交换链接营销实现方式解读
  • 做微商网站制作网络推广营销方案100例
  • 拓元建设网站公众号软文是什么意思
  • 可用来做外链推广的网站长沙疫情最新消息今天封城了
  • 擦边球网站做国内还是国外好河南企业网站建设
  • 外贸b2c商城网站建设玉林网站seo
  • 网站分享代码怎么加资源优化网站排名
  • 12389举报网站建设项目杭州seo俱乐部
  • 网页qq登陆页面网站建设与优化
  • 崇明建设镇网站廊坊网站排名优化公司哪家好
  • 农业电商平台有哪些国外seo
  • 利用花生壳做网站seo刷词
  • 竞价外包深圳seo论坛
  • 企业做网站的痛点有哪些快速收录工具
  • 江阴做网站公司详细描述如何进行搜索引擎的优化
  • 怎么自己建设网站惠州百度seo哪家好
  • wordpress+编辑器回车seo运营是什么
  • 长沙网站制作一般多少钱制作网页app
  • 哪个网站做淘宝客国内10大搜索引擎