From 21d1ce85990ca599bf3b2148f5e3b6cb415c4e05 Mon Sep 17 00:00:00 2001 From: icodening Date: Thu, 2 Nov 2023 18:52:54 +0800 Subject: [PATCH] Bugfix: Tab-completion fails --- .../shell/boot/StandardAPIAutoConfiguration.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/spring-shell-autoconfigure/src/main/java/org/springframework/shell/boot/StandardAPIAutoConfiguration.java b/spring-shell-autoconfigure/src/main/java/org/springframework/shell/boot/StandardAPIAutoConfiguration.java index c015011d8..3b4685b34 100644 --- a/spring-shell-autoconfigure/src/main/java/org/springframework/shell/boot/StandardAPIAutoConfiguration.java +++ b/spring-shell-autoconfigure/src/main/java/org/springframework/shell/boot/StandardAPIAutoConfiguration.java @@ -16,6 +16,7 @@ package org.springframework.shell.boot; +import org.springframework.boot.LazyInitializationExcludeFilter; import org.springframework.boot.autoconfigure.AutoConfiguration; import org.springframework.context.ApplicationContext; import org.springframework.context.annotation.Bean; @@ -56,4 +57,9 @@ public MethodTargetRegistrar standardMethodTargetResolver(ApplicationContext app CommandRegistration.BuilderSupplier builder) { return new StandardMethodTargetRegistrar(applicationContext, builder); } + + @Bean + public static LazyInitializationExcludeFilter valueProviderLazyInitializationExcludeFilter(){ + return LazyInitializationExcludeFilter.forBeanTypes(ValueProvider.class); + } }