spring-framework / org.springframework.context.support / LiveBeansView

LiveBeansView

open class LiveBeansView : LiveBeansViewMBean, ApplicationContextAware

Adapter for live beans view exposure, building a snapshot of current beans and their dependencies from either a local ApplicationContext (with a local LiveBeansView bean definition) or all registered ApplicationContexts (driven by the {@value #MBEAN_DOMAIN_PROPERTY_NAME} environment property).

Note: This feature is still in beta and primarily designed for use with Spring Tool Suite 3.1 and higher.

Author
Juergen Hoeller

Author
Stephane Nicoll

Since
3.2

See Also
#getSnapshotAsJson()org.springframework.web.context.support.LiveBeansViewServlet

Constructors

<init>

LiveBeansView()

Adapter for live beans view exposure, building a snapshot of current beans and their dependencies from either a local ApplicationContext (with a local LiveBeansView bean definition) or all registered ApplicationContexts (driven by the {@value #MBEAN_DOMAIN_PROPERTY_NAME} environment property).

Note: This feature is still in beta and primarily designed for use with Spring Tool Suite 3.1 and higher.

Properties

MBEAN_APPLICATION_KEY

static val MBEAN_APPLICATION_KEY: String

MBEAN_DOMAIN_PROPERTY_NAME

static val MBEAN_DOMAIN_PROPERTY_NAME: String

Functions

getSnapshotAsJson

open fun getSnapshotAsJson(): String

Generate a JSON snapshot of current beans and their dependencies, finding all active ApplicationContexts through #findApplicationContexts(), then delegating to #generateJson(java.util.Set).

setApplicationContext

open fun setApplicationContext(applicationContext: ApplicationContext): Unit

Inheritors

ServletContextLiveBeansView

open class ServletContextLiveBeansView : LiveBeansView

LiveBeansView subclass which looks for all ApplicationContexts in the web application, as exposed in ServletContext attributes.