dragonorant opened a new issue #14384:
URL: https://github.com/apache/shardingsphere/issues/14384


   ```yml
         sharding:
           tables:
             account:
               actual-data-nodes: 
master.account_$->{2021..2023}_$->{['01','02','03','04','05','06','07','08','09','10','11','12']}
               table-strategy:
                 standard:
                   sharding-column: create_time
                   sharding-algorithm-name: table-interval
           sharding-algorithms:
             table-interval:
               type: INTERVAL
               props:
                 datetime-pattern: yyyy_MM
                 datetime-lower: 2021_01
                 datetime-upper: 2023_12
                 sharding-suffix-pattern: yyyy_MM
                 datetime-interval-amount: 1
                 datetime-interval-unit: MONTHS
   ```
   According to the above configuration, the following errors will be reported 
when starting
   ```text
   Exception encountered during context initialization - cancelling refresh 
attempt: org.springframework.beans.factory.BeanCreationException: Error 
creating bean with name 'shardingSphereDataSource' defined in class path 
resource 
[org/apache/shardingsphere/spring/boot/ShardingSphereAutoConfiguration.class]: 
Bean instantiation via factory method failed; nested exception is 
org.springframework.beans.BeanInstantiationException: Failed to instantiate 
[javax.sql.DataSource]: Factory method 'shardingSphereDataSource' threw 
exception; nested exception is 
org.springframework.beans.factory.BeanCreationException: Error creating bean 
with name 'shardingRuleConfiguration' defined in class path resource 
[org/apache/shardingsphere/sharding/spring/boot/ShardingRuleSpringBootConfiguration.class]:
 Bean instantiation via factory method failed; nested exception is 
org.springframework.beans.BeanInstantiationException: Failed to instantiate 
[org.apache.shardingsphere.infra.config.RuleConfiguration]: Fact
 ory method 'shardingRuleConfiguration' threw exception; nested exception is 
org.springframework.beans.factory.BeanCreationException: Error creating bean 
with name 'table-interval': Initialization of bean failed; nested exception is 
java.lang.NullPointerException: text
   ```
   
   ```yml
   sharding:
           tables:
             yoyo_account:
               actual-data-nodes: 
master.yoyo_account_${2021..2023}_$->{['01','02','03','04','05','06','07','08','09','10','11','12']}
               table-strategy:
                 standard:
                   sharding-column: id
                   sharding-algorithm-name: table-inline
           sharding-algorithms:
             table-inline:
               type: INLINE
               props:
                 algorithm-expression: yoyo_account_2021_12
   ```
   According to the above configuration, you can start normally
   
    the documents on the official website. That's what it says. What should I 
do to improve 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]


Reply via email to