diff --git a/spring-beans/src/main/java/org/springframework/beans/factory/support/DefaultListableBeanFactory.java b/spring-beans/src/main/java/org/springframework/beans/factory/support/DefaultListableBeanFactory.java index 5bb1c57764..4adf7a775f 100644 --- a/spring-beans/src/main/java/org/springframework/beans/factory/support/DefaultListableBeanFactory.java +++ b/spring-beans/src/main/java/org/springframework/beans/factory/support/DefaultListableBeanFactory.java @@ -1748,7 +1748,9 @@ public class DefaultListableBeanFactory extends AbstractAutowireCapableBeanFacto } } // Lenient fallback: dummy factory in case of original factory not found... - return new DefaultListableBeanFactory(); + DefaultListableBeanFactory dummyFactory = new DefaultListableBeanFactory(); + dummyFactory.serializationId = this.id; + return dummyFactory; } }