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">
            <entry key="some.user.defined.Clazz"

And it was working for me.

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

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

    return customEditorConfigurer;