Declare empty default postProcessBeanFactory method
Closes gh-31476
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2010 the original author or authors.
|
||||
* Copyright 2002-2023 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.
|
||||
@@ -18,6 +18,7 @@ package org.springframework.beans.factory.support;
|
||||
|
||||
import org.springframework.beans.BeansException;
|
||||
import org.springframework.beans.factory.config.BeanFactoryPostProcessor;
|
||||
import org.springframework.beans.factory.config.ConfigurableListableBeanFactory;
|
||||
|
||||
/**
|
||||
* Extension to the standard {@link BeanFactoryPostProcessor} SPI, allowing for
|
||||
@@ -42,4 +43,14 @@ public interface BeanDefinitionRegistryPostProcessor extends BeanFactoryPostProc
|
||||
*/
|
||||
void postProcessBeanDefinitionRegistry(BeanDefinitionRegistry registry) throws BeansException;
|
||||
|
||||
/**
|
||||
* Empty implementation of {@link BeanFactoryPostProcessor#postProcessBeanFactory}
|
||||
* since custom {@code BeanDefinitionRegistryPostProcessor} implementations will
|
||||
* typically only provide a {@link #postProcessBeanDefinitionRegistry} method.
|
||||
* @since 6.1
|
||||
*/
|
||||
@Override
|
||||
default void postProcessBeanFactory(ConfigurableListableBeanFactory beanFactory) throws BeansException {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2022 the original author or authors.
|
||||
* Copyright 2002-2023 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.
|
||||
@@ -193,10 +193,6 @@ class BeanFactoryPostProcessorTests {
|
||||
public void postProcessBeanDefinitionRegistry(BeanDefinitionRegistry registry) throws BeansException {
|
||||
registry.registerBeanDefinition("bfpp1", new RootBeanDefinition(TestBeanFactoryPostProcessor.class));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void postProcessBeanFactory(ConfigurableListableBeanFactory beanFactory) throws BeansException {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -224,10 +220,6 @@ class BeanFactoryPostProcessorTests {
|
||||
registry.registerBeanDefinition("anotherpp", new RootBeanDefinition(TestBeanDefinitionRegistryPostProcessor.class));
|
||||
registry.registerBeanDefinition("ppp", new RootBeanDefinition(PrioritizedBeanDefinitionRegistryPostProcessor.class));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void postProcessBeanFactory(ConfigurableListableBeanFactory beanFactory) throws BeansException {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user