You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by GitBox <gi...@apache.org> on 2019/06/06 01:22:50 UTC
[GitHub] [incubator-shardingsphere] wangenji2015 commented on issue #2515:
mybatis insert text column error, but don't insert the column,
it won't be error
wangenji2015 commented on issue #2515: mybatis insert text column error, but don't insert the column,it won't be error
URL: https://github.com/apache/incubator-shardingsphere/issues/2515#issuecomment-499313417
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:p="http://www.springframework.org/schema/p"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:tx="http://www.springframework.org/schema/tx"
xmlns:sharding="http://shardingsphere.apache.org/schema/shardingsphere/sharding"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
http://shardingsphere.apache.org/schema/shardingsphere/sharding
http://shardingsphere.apache.org/schema/shardingsphere/sharding/sharding.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context.xsd
http://www.springframework.org/schema/tx
http://www.springframework.org/schema/tx/spring-tx.xsd">
<context:property-placeholder location="classpath:application.properties" />
<bean id="orderDataSource" class="com.alibaba.druid.pool.DruidDataSource" init-method="init" destroy-method="close"
p:url="${datasource.user.url}"
p:username="${datasource.user.username}"
p:password="${datasource.user.password}"
p:initialSize="${datasource.user.initialSize}"
p:minIdle="${datasource.user.minIdle}"
p:maxActive="${datasource.user.maxActive}"
p:maxWait="${datasource.user.maxWait}"
p:timeBetweenEvictionRunsMillis="${datasource.user.timeBetweenEvictionRunsMillis}"
p:minEvictableIdleTimeMillis="${datasource.user.minEvictableIdleTimeMillis}"
p:validationQuery="${datasource.user.validationQuery}"
p:testWhileIdle="${datasource.user.testWhileIdle}"
p:testOnBorrow="${datasource.user.testOnBorrow}"
p:testOnReturn="${datasource.user.testOnReturn}"
p:poolPreparedStatements="${datasource.user.poolPreparedStatements}"
p:maxPoolPreparedStatementPerConnectionSize="${datasource.user.maxPoolPreparedStatementPerConnectionSize}"
p:filters="${datasource.user.filters}">
</bean>
<sharding:inline-strategy id="orderTableStrategy" sharding-column="order_id" algorithm-expression="me_order_$->{order_id % 2}" />
<sharding:key-generator id="orderKeyGenerator" type="SNOWFLAKE" column="order_id" />
<sharding:data-source id="shardingDataSource">
<sharding:sharding-rule data-source-names="orderDataSource">
<sharding:table-rules>
<sharding:table-rule logic-table="me_order" actual-data-nodes="orderDataSource.me_order_$->{0..1}" table-strategy-ref="orderTableStrategy" key-generator-ref="orderKeyGenerator" />
</sharding:table-rules>
<sharding:binding-table-rules>
<sharding:binding-table-rule logic-tables="me_order"/>
</sharding:binding-table-rules>
</sharding:sharding-rule>
<sharding:props>
<prop key="sql.show">true</prop>
</sharding:props>
</sharding:data-source>
<bean id="orderSqlSessionFactory" class="org.mybatis.spring.SqlSessionFactoryBean">
<property name="dataSource" ref="shardingDataSource" />
<property name="typeAliasesPackage"
value="com.sanxiang.dal.entity" />
<property name="mapperLocations" value="classpath*:com/sanxiang/order/dal/persistence/mapping/*Mapper.xml" />
<property name="configLocation" value="classpath:mybatis/setting.xml"/>
</bean>
<bean name="orderMapperScannerConfigurer" class="org.mybatis.spring.mapper.MapperScannerConfigurer">
<property name="basePackage"
value="com.sanxiang.order.dal.persistence" />
<property name="sqlSessionFactoryBeanName" value="orderSqlSessionFactory"/>
</bean>
<context:component-scan base-package="com.sanxiang.order.services" />
<context:component-scan base-package="com.sanxiang.order.dal"/>
<!--<context:component-scan base-package="com.gupaoedu.user.notify" />-->
</beans>
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services