Shadow DB
<shadow:algorithm />
- Create production and shadow data sources.
<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:shadow="http://shardingsphere.apache.org/schema/shardingsphere/shadow" xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
http://shardingsphere.apache.org/schema/shardingsphere/shadow
http://shardingsphere.apache.org/schema/shardingsphere/shadow/shadow.xsd
">
<props>
<prop key="operation">insert</prop>
<prop key="column">user_id</prop>
<prop key="value">1</prop>
</shadow:shadow-algorithm>
<shadow:rule id="shadowRule">
<shadow:data-source id="shadow-data-source" production-data-source-name="ds" shadow-data-source-name="ds_shadow"/>
<shadow:shadow-table name="t_user" data-sources="shadow-data-source">
<shadow:algorithm shadow-algorithm-ref="user-id-insert-match-algorithm" />
</shadow:shadow-table>
</shadow:rule>