ItsCocan opened a new issue, #18135:
URL: https://github.com/apache/shardingsphere/issues/18135

   ## Question
   
   **For English only**, other languages will not accept.
   
   Before asking a question, make sure you have:
   
   - Googled your question.
   - Searched open and closed [GitHub 
issues](https://github.com/apache/shardingsphere/issues).
   - Read documentation: [ShardingSphere 
Doc](https://shardingsphere.apache.org/document/current/en/overview).
   
   Please pay attention on issues you submitted, because we maybe need more 
details. 
   If no response anymore and we cannot reproduce it on current information, we 
will **close it**.
   
   ---
   
   Hi, I tried to config my spring project with 
shardingsphere-jdbc-core-spring-namespace-5.1.1 today, but it did not work 
though the project can be started successfully.
   
   when i insert, data inserted into logic table instead of actual data nodes.
   
   And my shardingsphere config xml is like:
   
   ```xml
   <?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:shardingsphere="http://shardingsphere.apache.org/schema/shardingsphere/datasource";
          
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/datasource
                              
http://shardingsphere.apache.org/schema/shardingsphere/datasource/datasource.xsd
                              
http://shardingsphere.apache.org/schema/shardingsphere/sharding
                              
http://shardingsphere.apache.org/schema/shardingsphere/sharding/sharding.xsd
                              ">
   
       <!-- dataSource -->
       <bean id="dataSource" class="com.zaxxer.hikari.HikariDataSource">
        <property name="driverClassName" value="${jdbc.driver}" />
        <property name="jdbcUrl" value="${jdbc.url}" />
        <property name="username" value="${jdbc.username}" />
        <property name="password" value="${jdbc.password}" />
       </bean>
   
       <!-- algorithm  -->
       <sharding:sharding-algorithm id="shardingByModAutoAlgorithm" type="MOD">
           <props>
               <prop key="sharding-count">3</prop>
           </props>
       </sharding:sharding-algorithm>
        
       <!-- generator (SNOWFLAKE) -->
       <sharding:key-generate-algorithm id="snowFlakeKeyGenerator" 
type="SNOWFLAKE" />
   
       <!-- sharding strategy -->
       <sharding:standard-strategy id="shardingImageBaseInfoStrategy" 
sharding-column="id"
                                   algorithm-ref="shardingByModAutoAlgorithm" />
       <sharding:standard-strategy id="shardingFaceRecordsStrategy" 
sharding-column="image_Id"
                                   algorithm-ref="shardingByModAutoAlgorithm" />
                                                                
       <!-- key generator strategy -->
       <sharding:key-generate-strategy id="shardingImageBaseInfoKeyStrategy" 
column="id"
                                       algorithm-ref="snowFlakeKeyGenerator" />
       <sharding:key-generate-strategy id="shardingFaceRecordsKeyStrategy" 
column="id"
                                       algorithm-ref="snowFlakeKeyGenerator" />
   
       <!-- table rules -->
       <sharding:rule id="shardingRule">
           <sharding:auto-table-rules>
               <sharding:auto-table-rule logic-table="image_base_info"
                                         
sharding-strategy-ref="shardingImageBaseInfoStrategy"
                                         
key-generate-strategy-ref="shardingImageBaseInfoKeyStrategy"
                                         actual-data-sources="dataSource"/>
               <sharding:auto-table-rule logic-table="face_records"
                                         
sharding-strategy-ref="shardingFaceRecordsStrategy"
                                         
key-generate-strategy-ref="shardingFaceRecordsKeyStrategy"
                                         actual-data-sources="dataSource"/>
           </sharding:auto-table-rules>
           <sharding:binding-table-rules>
               <sharding:binding-table-rule 
logic-tables="image_base_info,face_records"/>
           </sharding:binding-table-rules>
       </sharding:rule>
   
       <!-- sharding ds -->
       <shardingsphere:data-source id="shardingSphereDataSource" 
data-source-names="dataSource" rule-refs="shardingRule"/>
   </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.

To unsubscribe, e-mail: 
[email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to