You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
GenericConversionService.addConverter should be able to determine generic types from target class behind proxy [SPR-14822] #19388
WebMvcConfigurationSupport.mvcConversionService() creates a non-overrideable DefaultFormattingConversionService which scans for all Converter-beans. If one of those beans happens to be advised an IllegalArgumentException is thrown, since GenericConversionService.getRequiredTypeInfo() tries to derive the type info from the Proxy that only contains the type erasures and not the actual types.
Adding a proxy check and deriving the type info from the proxy-target would resolve that issue.
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'mvcConversionService' defined in class path resource [org/springframework/boot/autoconfigure/web/WebMvcAutoConfiguration$EnableWebMvcConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.format.support.FormattingConversionService]: Factory method 'mvcConversionService' threw exception; nested exception is java.lang.IllegalArgumentException: Unable to the determine sourceType <S> and targetType <T> which your Converter<S, T> converts between; declare these generic types.
Activity
spring-projects-issues commentedon Oct 19, 2016
Harald Radi commented
likely to be related to http://stackoverflow.com/questions/25711858/spring-cant-determine-generic-types-when-lambda-expression-is-used-instead-of-a as well