Spring CustomEditorConfigurer in java config

Is there a way to configure a custom property editor using java config instead of XML and how to do it correctly?

I used to have the following config:

<bean class="org.springframework.beans.factory.config.CustomEditorConfigurer">
    <property name="customEditors">
        <map>
            <entry key="some.user.defined.Clazz"
                   value="some.user.definded.ClazzConverter"/>
        </map>
    </property>
</bean>

And it was working for me.

When I defined the CustomEditorConfigurer using Java config, it looks to be not working at all.

@Bean
public CustomEditorConfigurer customEditorConfigurer() {
    final CustomEditorConfigurer customEditorConfigurer = new CustomEditorConfigurer();
    customEditorConfigurer.setCustomEditors(ImmutableMap.of(Clazz.class, ClazzConverter.class));

    return customEditorConfigurer;
}