Added configuration property for domain type to repository mappings. Also improved the post-processing support, though I think there's still some room for tweaking.

This commit is contained in:
Jon Brisbin
2012-08-20 15:06:15 -05:00
committed by Jon Brisbin
parent 2000d07b32
commit 3aa8905b15
10 changed files with 210 additions and 68 deletions

View File

@@ -8,7 +8,21 @@
<bean id="config" class="org.springframework.data.rest.webmvc.RepositoryRestConfiguration"
p:jsonpParamName="callback"
p:jsonpOnErrParamName="errback"/>
p:jsonpOnErrParamName="errback">
<property name="domainTypeToRepositoryMappings">
<map key-type="java.lang.Class" value-type="java.lang.Class">
<entry key="org.springframework.data.rest.test.webmvc.Person"
value="org.springframework.data.rest.test.webmvc.PersonRepository"/>
</map>
</property>
<property name="resourcePostProcessors">
<map key-type="java.lang.Class">
<entry key="org.springframework.data.rest.test.webmvc.Person">
<bean class="org.springframework.data.rest.test.webmvc.LoggingResourcePostProcessor"/>
</entry>
</map>
</property>
</bean>
<!--
If you need to add Converters to the REST exporter to handle the property types you're using