Beans (beans)

The beans endpoint provides information about the application’s beans.spring-doc.cn

Retrieving the Beans

To retrieve the beans, make a GET request to /actuator/beans, as shown in the following curl-based example:spring-doc.cn

$ curl 'http://localhost:8080/actuator/beans' -i -X GET

The resulting response is similar to the following:spring-doc.cn

HTTP/1.1 200 OK
Content-Type: application/vnd.spring-boot.actuator.v3+json
Content-Length: 1089

{
  "contexts" : {
    "application" : {
      "beans" : {
        "org.springframework.boot.autoconfigure.web.servlet.DispatcherServletAutoConfiguration$DispatcherServletRegistrationConfiguration" : {
          "aliases" : [ ],
          "scope" : "singleton",
          "type" : "org.springframework.boot.autoconfigure.web.servlet.DispatcherServletAutoConfiguration$DispatcherServletRegistrationConfiguration",
          "dependencies" : [ ]
        },
        "org.springframework.boot.autoconfigure.context.PropertyPlaceholderAutoConfiguration" : {
          "aliases" : [ ],
          "scope" : "singleton",
          "type" : "org.springframework.boot.autoconfigure.context.PropertyPlaceholderAutoConfiguration",
          "dependencies" : [ ]
        },
        "org.springframework.boot.autoconfigure.web.servlet.DispatcherServletAutoConfiguration" : {
          "aliases" : [ ],
          "scope" : "singleton",
          "type" : "org.springframework.boot.autoconfigure.web.servlet.DispatcherServletAutoConfiguration",
          "dependencies" : [ ]
        }
      }
    }
  }
}

Response Structure

The response contains details of the application’s beans. The following table describes the structure of the response:spring-doc.cn

Path Type Description

contextsspring-doc.cn

Objectspring-doc.cn

Application contexts keyed by id.spring-doc.cn

contexts.*.parentIdspring-doc.cn

Stringspring-doc.cn

Id of the parent application context, if any.spring-doc.cn

contexts.*.beansspring-doc.cn

Objectspring-doc.cn

Beans in the application context keyed by name.spring-doc.cn

contexts.*.beans.*.aliasesspring-doc.cn

Arrayspring-doc.cn

Names of any aliases.spring-doc.cn

contexts.*.beans.*.scopespring-doc.cn

Stringspring-doc.cn

Scope of the bean.spring-doc.cn

contexts.*.beans.*.typespring-doc.cn

Stringspring-doc.cn

Fully qualified type of the bean.spring-doc.cn

contexts.*.beans.*.resourcespring-doc.cn

Stringspring-doc.cn

Resource in which the bean was defined, if any.spring-doc.cn

contexts.*.beans.*.dependenciesspring-doc.cn

Arrayspring-doc.cn

Names of any dependencies.spring-doc.cn