The way you'd do that is replace the embedded database bean with one that points at a real database. Something like Spring's DriverManagerDataSource, SimpleDriverDataSource, or SingleConnectionDataSource. Then you'd use property placeholders (or the environment if using JavaConfig) to reference the datasource configuration properties from a properties file.
For example, assuming that you're configuring this in XML...do not use the embedded database and instead use:
Code:
<bean id="dataSource" class="org.springframework.jdbc.datasource.SimpleDriverDataSource">
<property name="driverClass" value="${jdbc.driverClassName}"/>
<property name="url" value="${jdbc.url}"/>
<property name="username" value="${jdbc.username}"/>
<property name="password" value="${jdbc.password}"/>
</bean>
<context:property-placeholder location="classpath:jdbc.properties"/>
Then, in your jdbc.properties file (at the root of the classpath), configure the properties to point at your database.
Craig Walls
Spring Social Project Lead