When RepositoryFactoryBeanSupport setMappingContext should be called?
<p>I encounter issue when initializing my repository.</p>

<pre><code>Error creating bean with name 'resourceMappings' defined in class path resource [org/springframework/data/rest/webmvc/config/RepositoryRestMvcConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.data.rest.core.mapping.RepositoryResourceMappings]: Factory method 'resourceMappings' threw exception; nested exception is java.lang.IllegalArgumentException: PersistentEntity must not be null!
</code></pre>

<p>It appears that the mappingContext is always null.</p>

<p>I have tried to debug it but I can't find anywhere in the code where setMappingContext is called.</p>

<p>Is there a way to initialize it myself ?</p>