- Mastering Spring Boot 2.0
- Dinesh Rajput
- 243字
- 2021-06-25 21:29:19
Exposing application information
In Spring Boot, Actuator also provides arbitrary application information by using the /info endpoint. If you make a GET request call to the /info endpoint, by default it will return empty JSON, {}.
The empty JSON means Spring Boot doesn't provide default information for your application. The /info endpoint provides any information for your Spring application that you want to expose to your client or the public. You can add any information about your application to this endpoint in application.properties or application.yml as follows:
application.properties
info.app.name=Spring Boot Actuator Application info.app.description=This is my first Working Spring Actuator Examples info.app.version=0.0.1-SNAPSHOT info.helpline.email=admin@dineshonjava.com info.helpline.phone=0120-000001100
application.yml
info: app: name: Spring Boot Actuator Application description: This is my first Working Spring Actuator Examples version: 0.0.1-SNAPSHOT helpline: email: admin@dineshonjava.com phone: 0120-000001100
In the preceding examples, you can see that we want to provide some information about our application such as application name, description, version, email, and helpline number in the /info endpoint response. Now let's request the /info endpoint; you'll get the following response:
{ helpline: { email: "admin@dineshonjava.com", phone: "0120-00000110" }, app: { description: "This is my first Working Spring Actuator Examples", version: "0.0.1-SNAPSHOT", name: "Spring Boot Actuator Application" } }
As shown, the Spring Boot Actuator /info endpoint exposes information about your application to the outside of your application. This information might be useful for callers.
Let's see in the next section how to kill your application using an Actuator's endpoint.
- 新編Office 2013從入門到精通
- 跟李銳學(xué)Excel數(shù)據(jù)分析
- Excel商務(wù)圖表應(yīng)用與技巧108例
- 中文PowerPoint 2003應(yīng)用基礎(chǔ)
- 大話PPT:幻燈片制作真經(jīng)
- INSTANT Prezi Starter
- 精P之道:高效溝通PPT
- Office 2016辦公應(yīng)用從入門到精通
- Excel數(shù)據(jù)處理與可視化
- 數(shù)據(jù)分析:企業(yè)的賢內(nèi)助
- 新編電腦辦公(Windows 8 + Office 2013版)從入門到精通
- Excel在經(jīng)濟(jì)管理中的應(yīng)用
- Word/Excel/PPT現(xiàn)代商務(wù)辦公從新手到高手一本通
- Office 2010辦公高級(jí)應(yīng)用(慕課版)
- 從小白到高手Logic Pro X快速上手教程