From 4191e0afec912ab79c554bf5b1f8124f0e14f9ec Mon Sep 17 00:00:00 2001 From: Martin7-1 <1754350460@qq.com> Date: Wed, 11 Sep 2024 15:47:01 +0800 Subject: [PATCH] revert filtering in AutoConfiguration --- .../langchain4j/service/spring/AiServicesAutoConfig.java | 9 --------- 1 file changed, 9 deletions(-) diff --git a/langchain4j-spring-boot-starter/src/main/java/dev/langchain4j/service/spring/AiServicesAutoConfig.java b/langchain4j-spring-boot-starter/src/main/java/dev/langchain4j/service/spring/AiServicesAutoConfig.java index b08c1cb2..f3dafeac 100644 --- a/langchain4j-spring-boot-starter/src/main/java/dev/langchain4j/service/spring/AiServicesAutoConfig.java +++ b/langchain4j-spring-boot-starter/src/main/java/dev/langchain4j/service/spring/AiServicesAutoConfig.java @@ -64,15 +64,6 @@ BeanFactoryPostProcessor aiServicesRegisteringBeanFactoryPostProcessor(Environme for (String aiService : aiServices) { Class aiServiceClass = beanFactory.getType(aiService); - // Check profile - if (aiServiceClass.isAnnotationPresent(Profile.class)) { - Profile profileAnnotation = aiServiceClass.getAnnotation(Profile.class); - String[] profiles = profileAnnotation.value(); - if (!environment.matchesProfiles(profiles)) { - continue; - } - } - GenericBeanDefinition aiServiceBeanDefinition = new GenericBeanDefinition(); aiServiceBeanDefinition.setBeanClass(AiServiceFactory.class); aiServiceBeanDefinition.getConstructorArgumentValues().addGenericArgumentValue(aiServiceClass);