RaigorJiang commented on code in PR #19441:
URL: https://github.com/apache/shardingsphere/pull/19441#discussion_r926928673
##########
examples/shardingsphere-jdbc-example/single-feature-example/extension-example/custom-sharding-algortihm-example/class-based-sharding-algorithm-example/class-based-sharding-spring-namespace-jpa-example/src/main/resources/META-INF/application-sharding-databases.xml:
##########
@@ -92,5 +77,20 @@
</sharding:broadcast-table-rules>
</sharding:rule>
- <shardingsphere:data-source id="shardingDataSource"
data-source-names="demo_ds_0, demo_ds_1" rule-refs="shardingRule" />
+ <shardingsphere:data-source id="shardingDataSource"
database-name="sharding-databases" data-source-names="demo_ds_0, demo_ds_1"
rule-refs="shardingRule" />
+
+ <bean id="transactionManager"
class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
+ <property name="dataSource" ref="shardingDataSource" />
+ </bean>
+ <tx:annotation-driven />
+
+ <bean id="sqlSessionFactory"
class="org.mybatis.spring.SqlSessionFactoryBean">
Review Comment:
JPA example does not require sqlSessionFactory configuration for MyBatis,
please check it.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]