91超碰碰碰碰久久久久久综合_超碰av人澡人澡人澡人澡人掠_国产黄大片在线观看画质优化_txt小说免费全本

溫馨提示×

溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊×
其他方式登錄
點擊 登錄注冊 即表示同意《億速云用戶服務條款》

在spring boot 配置actuator

發布時間:2020-06-13 19:28:14 來源:網絡 閱讀:707 作者:vjjy001 欄目:開發技術

spring boot 通過actuator 來提供應用服務器信息。例如可以通過health 查看存儲信息,服務器是否正常運行 通過metrics可以觀察heap, mem等信息。 方便用戶監控應用


1 在pom.xml 添加actuator 依賴

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


2 在application.properties  配置詳細信息

management.context-path=/manage
endpoints.health.sensitive=false
endpoints.metrics.sensitive=false
endpoints.info.sensitive=false

management.context-path=/manage
endpoints.health.sensitive=false
endpoints.metrics.sensitive=false
endpoints.info.sensitive=false
#config info details
info.app.name=MyApp
info.app.description=descript for the project
info.build.groupId=@project.groupId@
info.build.artiface=@project.artifactId@
info.build.version=@project.version@
info.app.encoding=@project.build.sourceEncoding@
info.app.java.source=@java.version@
info.app.java.target=@java.version@


3 測試這里我配置了/manage 為actuator的根路徑

輸入localhost:8080/manage/health

{"status":"UP","diskSpace":{"status":"UP","total":255534821376,"free":107373064192,"threshold":10485760},"db":{"status":"UP","database":"Oracle","hello":"Hello"}}

輸入localhost:8080/manage/metrics

{"mem":374672,"mem.free":112188,"processors":4,"instance.uptime":182778,"uptime":199229,"systemload.average":-1.0,"heap.committed":310272,"heap.init":253952,"heap.used":198083,"heap":3592192,"nonheap.committed":66176,"nonheap.init":2496,"nonheap.used":64401,"nonheap":0,"threads.peak":33,"threads.daemon":31,"threads.totalStarted":40,"threads":33,"classes":7965,"classes.loaded":7967,"classes.unloaded":2,"gc.ps_scavenge.count":12,"gc.ps_scavenge.time":233,"gc.ps_marksweep.count":2,"gc.ps_marksweep.time":139,"httpsessions.max":-1,"httpsessions.active":0,"gauge.response.star-star":12.0,"gauge.response.manage.health":935.0,"counter.status.404.star-star":2,"counter.status.200.manage.health":1}


向AI問一下細節

免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。

AI

丽江市| 北安市| 岚皋县| 冀州市| 年辖:市辖区| 疏勒县| 咸阳市| 衡东县| 新民市| 龙胜| 远安县| 碌曲县| 松阳县| 亚东县| 大连市| 稻城县| 策勒县| 夏河县| 奈曼旗| 进贤县| 万州区| 南雄市| 泸水县| 陕西省| 雅江县| 炉霍县| 沁阳市| 调兵山市| 行唐县| 深州市| 桦川县| 克拉玛依市| 华池县| 万州区| 桃园县| 桂林市| 桦南县| 云南省| 桐庐县| 荔浦县| 麟游县|