title: Spring beans GeoModule bean injection to RepositoryRestMvcConfiguration
body: <p>I'm currently testing spring data rest, and I want to expose the primary keys (ids) of my entities through the REST interface.</p>
  
  <p>I have found that the proper (?) way to do this is:</p>
  
  <pre><code>public class IdExporterConfiguration extends RepositoryRestMvcConfiguration {
  
      @Override
      protected void configureRepositoryRestConfiguration(
              RepositoryRestConfiguration config) {
          super.configureRepositoryRestConfiguration(config);
          config.exposeIdsFor(User.class);
      }
  }
  </code></pre>
  
  <p>The problem is, that if I change my bean definition to this:</p>
  
  <pre><code>&lt;bean class="test.project.util.IdExporterConfiguration"/&gt;
  </code></pre>
  
  <p>From this:</p>
  
  <pre><code>&lt;bean class="org.springframework.data.rest.webmvc.config.RepositoryRestMvcConfiguration"/&gt;
  </code></pre>
  
  <p>my application fails to start...</p>
  
  <p>The error is:</p>
  
  <pre><code>Could not autowire field: org.springframework.data.geo.GeoModule org.springframework.data.rest.webmvc.config.RepositoryRestMvcConfiguration.geoModule;
  nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type [org.springframework.data.geo.GeoModule] found for dependency:
  expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)}
  </code></pre>
  
  <p>Basically it says that it does not find a GeoModule bean, so it can't autowire it for the RepositoryRestMvcConfiguration base...</p>
  
  <p>Now the fun part is, that is I define the bean:</p>
  
  <pre><code>&lt;bean class="org.springframework.data.geo.GeoModule"/&gt;
  </code></pre>
  
  <p>The error changes to:</p>
  
  <pre><code>Could not autowire field: org.springframework.data.geo.GeoModule org.springframework.data.rest.webmvc.config.RepositoryRestMvcConfiguration.geoModule;
  nested exception is org.springframework.beans.factory.NoUniqueBeanDefinitionException: No qualifying bean of type [org.springframework.data.geo.GeoModule] is defined:
  expected single matching bean but found 2: jacksonGeoModule,org.springframework.data.geo.GeoModule#0
  </code></pre>
  
  <p>So if I don't define a bean, there is 0, but if I define one, there is 2?</p>