When you turn on logging, you'll see which Beans are created by Spring, as described here .
Log Configuration
<logger name="org.springframework.beans" level="DEBUG" />
Log output
DEBUG (AbstractAutowireCapableBeanFactory.java:458) - Finished creating instance of bean 'getConversionService'
I copy + pasted your code, and it worked without changing the name. I introduced ConversionService
as follows:
@Resource private ConversionService conversionService;
This works because of Autowiring by type . Perhaps you had two ConversionService
beans.
source share