Deprecate LiveBeansView

This commit deprecates LiveBeansView and related classes in order to allow
a future removal in order to increase the separation of concerns between
Spring Framework and Spring Boot, and the consistency between JVM
and native.

Closes gh-25820
This commit is contained in:
Sébastien Deleuze
2020-09-25 19:59:56 +02:00
parent 84b1efa4b8
commit 2dbceb9053
5 changed files with 18 additions and 13 deletions

View File

@@ -930,6 +930,7 @@ public abstract class AbstractApplicationContext extends DefaultResourceLoader
* onRefresh() method and publishing the
* {@link org.springframework.context.event.ContextRefreshedEvent}.
*/
@SuppressWarnings("deprecation")
protected void finishRefresh() {
// Clear context-level resource caches (such as ASM metadata from scanning).
clearResourceCaches();
@@ -1047,6 +1048,7 @@ public abstract class AbstractApplicationContext extends DefaultResourceLoader
* @see #close()
* @see #registerShutdownHook()
*/
@SuppressWarnings("deprecation")
protected void doClose() {
// Check whether an actual close attempt is necessary...
if (this.active.get() && this.closed.compareAndSet(false, true)) {

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2018 the original author or authors.
* Copyright 2002-2020 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -42,15 +42,14 @@ import org.springframework.util.StringUtils;
* local {@code LiveBeansView} bean definition) or all registered ApplicationContexts
* (driven by the {@value #MBEAN_DOMAIN_PROPERTY_NAME} environment property).
*
* <p>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 #getSnapshotAsJson()
* @see org.springframework.web.context.support.LiveBeansViewServlet
* @deprecated as of 5.3, in favor of using Spring Boot actuators for such need.
*/
@Deprecated
public class LiveBeansView implements LiveBeansViewMBean, ApplicationContextAware {
/**

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2012 the original author or authors.
* Copyright 2002-2020 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -21,7 +21,9 @@ package org.springframework.context.support;
*
* @author Juergen Hoeller
* @since 3.2
* @deprecated as of 5.3, in favor of using Spring Boot actuators for such need.
*/
@Deprecated
public interface LiveBeansViewMBean {
/**