Beans (beans)

The beans endpoint provides information about the application’s beans.

Retrieving the Beans

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

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

The resulting response is similar to the following:

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:

Path Type Description

contexts

Object

Application contexts keyed by id.

contexts.*.parentId

String

Id of the parent application context, if any.

contexts.*.beans

Object

Beans in the application context keyed by name.

contexts.*.beans.*.aliases

Array

Names of any aliases.

contexts.*.beans.*.scope

String

Scope of the bean.

contexts.*.beans.*.type

String

Fully qualified type of the bean.

contexts.*.beans.*.resource

String

Resource in which the bean was defined, if any.

contexts.*.beans.*.dependencies

Array

Names of any dependencies.