DishJi edited a comment on issue #8300:
URL: https://github.com/apache/shardingsphere/issues/8300#issuecomment-733419424


   **bootstrap.yml**
   
   ```
   server:
     port: 2004
     servlet:
       context-path: /smartlearning
       encoding:
         charset: UTF-8
         force: true
         enabled: true
     tomcat:
       uri-encoding: UTF-8
   spring:
     profiles:
       active: dev
     application:
       name: provider-smartlearning
     shardingsphere:
       rules:
         sharding:
           default-data-source-name: ds0
           tables:
             user_record:
               actual-data-nodes: 
ds0.user_record,ds0.user_record_$->{2019..2022}
               table-strategy:
                 standard:
                   sharding-column: user_id
                   sharding-algorithm-name: user-record-standard
           sharding-algorithms:
             user-record-standard:
               type: UserRecordShardingAlgorithm
               props:
                 allow-range-query-with-record-sharding: false
   
     #表示不加入默认的静态资源路径处理,解决返回404默认页面问题
     resources:
       addMappings: false
       #让其抛出异常,这样我们就能处理这个异常,解决返回404默认页面问题
     mvc:
       throw-exception-if-no-handler-found: true
   
   mybatis-plus:
     mapper-locations: classpath:mapper/smartlearning/*.xml
     configuration:
       #log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
       map-underscore-to-camel-case: false
   ```
   
   **application-dev.yml**
   
   ```
   spring:
     shardingsphere:
       datasource:
         common:
           type: com.alibaba.druid.pool.DruidDataSource
           driver-class-name: com.mysql.jdbc.Driver
           username:
           password:
         names: ds0
         ds0:
           jdbc-url:
   
   ```
   
   @yu199195  This is my full config.If it is not detailed enough, please refer 
to https://github.com/DishJi/sharding-demo.Thank you for your help!


----------------------------------------------------------------
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:
[email protected]


Reply via email to