From b769b73960c904269ea7873cfa5a82c00e28a6a8 Mon Sep 17 00:00:00 2001 From: Sam Brannen Date: Fri, 10 Jul 2020 15:39:45 +0200 Subject: [PATCH] Improve JavaDoc for ConfigurableApplicationContext.refresh() Closes gh-25380 --- .../context/ConfigurableApplicationContext.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/spring-context/src/main/java/org/springframework/context/ConfigurableApplicationContext.java b/spring-context/src/main/java/org/springframework/context/ConfigurableApplicationContext.java index 5a31673e51..ded4db3ad2 100644 --- a/spring-context/src/main/java/org/springframework/context/ConfigurableApplicationContext.java +++ b/spring-context/src/main/java/org/springframework/context/ConfigurableApplicationContext.java @@ -166,11 +166,12 @@ public interface ConfigurableApplicationContext extends ApplicationContext, Life void addProtocolResolver(ProtocolResolver resolver); /** - * Load or refresh the persistent representation of the configuration, - * which might an XML file, properties file, or relational database schema. + * Load or refresh the persistent representation of the configuration, which + * might be from Java-based configuration, an XML file, a properties file, a + * relational database schema, or some other format. *

As this is a startup method, it should destroy already created singletons * if it fails, to avoid dangling resources. In other words, after invocation - * of that method, either all or no singletons at all should be instantiated. + * of this method, either all or no singletons at all should be instantiated. * @throws BeansException if the bean factory could not be initialized * @throws IllegalStateException if already initialized and multiple refresh * attempts are not supported