-
Notifications
You must be signed in to change notification settings - Fork 41.6k
Description
Hi,
I have a spring boot project which relies on a custom converter class to convert between types. This class is annotated with @Component.
Previously this converter worked perfectly fine and all it did was map between the fields of one type to the fields of another type. However I've now got the problem where requires another spring component (a field has a non-linear mapping between types so we require this external service to get the correct mapping); we'll call this mappingService.
As a result it no longer works and I get a converter not found exception. I have tried constructor injection, and field injection and same bad result. I also tried setter injection and the converter was found but the mappingService was null.
I find this pretty peculiar as mappingService works as its injected elsewhere in the app but it can't be injected into the converter