diff --git a/core/src/main/java/com/turkraft/springfilter/boot/FilterConversionServiceConfiguration.java b/core/src/main/java/com/turkraft/springfilter/boot/FilterConversionServiceConfiguration.java index 9a65de5f..48a5d078 100644 --- a/core/src/main/java/com/turkraft/springfilter/boot/FilterConversionServiceConfiguration.java +++ b/core/src/main/java/com/turkraft/springfilter/boot/FilterConversionServiceConfiguration.java @@ -1,5 +1,6 @@ package com.turkraft.springfilter.boot; +import java.util.List; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.context.annotation.Bean; @@ -17,11 +18,15 @@ public class FilterConversionServiceConfiguration { @Nullable protected final ConversionService defaultConversionService; + protected final List conversionServices; + public FilterConversionServiceConfiguration( @Nullable @Autowired(required = false) @Qualifier("mvcConversionService") ConversionService mvcConversionService, - @Nullable @Autowired(required = false) @Qualifier("defaultConversionService") ConversionService defaultConversionService) { + @Nullable @Autowired(required = false) @Qualifier("defaultConversionService") ConversionService defaultConversionService, + @Nullable @Autowired(required = false) List conversionServices) { this.mvcConversionService = mvcConversionService; this.defaultConversionService = defaultConversionService; + this.conversionServices = conversionServices; } @Bean @@ -32,6 +37,9 @@ public ConversionService sfConversionService() { if (mvcConversionService != null) { return mvcConversionService; } + if (conversionServices != null && !conversionServices.isEmpty()) { + return conversionServices.get(0); + } throw new IllegalArgumentException("Could not find any ConversionService bean!"); }