Reorganize how configuration is loaded, add UUID/String Converters.

This commit is contained in:
Jon Brisbin
2012-05-07 10:26:27 -05:00
parent 61170d8b43
commit e44506c4e0
13 changed files with 341 additions and 238 deletions

View File

@@ -9,6 +9,25 @@
<jpa:repositories base-package="org.springframework.data.rest.test.webmvc"/>
<!--
If you need to add Converters to the REST exporter to handle the property types you're using
in your entities, then just configure a ConversionServiceFactoryBean here, add the Converteres
you need, and they will, in turn, be added to the FormattingConversionService the REST exporter
uses internally.
Uncomment this block to add the included UUID <-> String converters, which are not included by default.
-->
<!--
<bean class="org.springframework.context.support.ConversionServiceFactoryBean">
<property name="converters">
<set>
<bean class="org.springframework.data.rest.core.convert.StringToUUIDConverter"/>
<bean class="org.springframework.data.rest.core.convert.UUIDToStringConverter"/>
</set>
</property>
</bean>
-->
<!--
This validator will be picked up automatically. The default configuration is to look at the bean name
and figure out what event you're interested in. This validator is interested in 'beforeSave' events

View File

@@ -5,10 +5,6 @@
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/jdbc http://www.springframework.org/schema/jdbc/spring-jdbc.xsd">
<bean id="baseUri" class="java.net.URI">
<constructor-arg value="http://localhost:8080/data"/>
</bean>
<jdbc:embedded-database id="dataSource" type="HSQL"/>
<bean id="entityManagerFactory" class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean">