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 2022/12/28 06:01:46 UTC

[GitHub] [shardingsphere] pengxianggui opened a new issue, #23131: org.apache.shardingsphere.sql.parser.exception.SQLParsingException: You have an error in your SQL syntax

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

   ## Bug Report
   ### Which version of ShardingSphere did you use?
   5.1.1
   ### Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy?
   ShardingSphere-JDBC
   ### Expected behavior
   The sql executes correctly
   ### Actual behavior
   org.apache.shardingsphere.sql.parser.exception.SQLParsingException: You have an error in your SQL syntax
   ### Reason analyze (If you can)
   sql parsing generates errors that are not actually sql errors
   ### Steps to reproduce the behavior, such as: SQL to execute
   ```sql
   select o.* from t_order o 
   left join t_order_item oi on o.order_id = oi.order_id and oi.create_time >= '2022-12-01 00:00:00' and oi.create_time <= '2022-12-31 00:00:00'
   where 
   o.create_time >= '2022-12-01 00:00:00' and o.create_time <= '2022-12-31 00:00:00'
   ```
   
   The above sql might seem a little strange because I don't need to add a time filter to the left join.
   In fact, if I didn't add this condition, there would be no error. I was trying to see if I could trigger the fragment of t_order_item, but I got an error.
   However, this sql looks strange, but it will work fine in mysql. I don't think this error should be reported.
   
   上面的sql可能看起来有点奇怪,因为我没必要在left join 中加上时间过滤条件。
   事实上,如果我不加这个条件,确实不会报错。我本意是想尝试这样做,能否触发t_order_item的分片,没想到却报错了。
   
   但是这个sql虽然看起来奇怪,但却能在mysql中正常执行,我认为不应该报这个错误。
   


-- 
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: notifications-unsubscribe@shardingsphere.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [shardingsphere] pengxianggui commented on issue #23131: org.apache.shardingsphere.sql.parser.exception.SQLParsingException: You have an error in your SQL syntax

Posted by GitBox <gi...@apache.org>.
pengxianggui commented on issue #23131:
URL: https://github.com/apache/shardingsphere/issues/23131#issuecomment-1366562928

   > Spring Boot starter has been deprecated and removed since 5.3.0. There is a more simple way to integrate ShardingSphere with Spring Boot. You may refer to: https://shardingsphere.apache.org/document/current/en/user-manual/shardingsphere-jdbc/yaml-config/jdbc-driver/spring-boot/
   
   @TeslaCN Sorry to bother you again...
   I can use this way to to integrate ShardingSphere with Spring Boot cause It will affects the other component. I decided to define a bean myself with the following code, which I'm not sure is feasible:
   ```
   @Primary
       @Bean
       DataSource shardingSphereDatasource() throws IOException, SQLException {
           return YamlShardingSphereDataSourceFactory.createDataSource(getFile("classpath:sharding-table.yml"));
       }
   ```
   The other relevant code is the sharding-table.yml file.
   The file content as follow: 
   ```
   # shardingsphere 5.3.0文档 https://shardingsphere.apache.org/document/current/cn/user-manual/shardingsphere-jdbc/yaml-config/rules/sharding/
   dataSources:
     db0: # 单数据库节点无意义,当存在多个时用于区分
       dataSourceClassName: com.zaxxer.hikari.HikariDataSource # 数据库连接池全类名
       driverClassName: ${spring.datasource.driver-class-name}
       jdbcUrl: ${spring.datasource.url}
       username: ${spring.datasource.username}
       password: ${spring.datasource.password}
   props:
     sql-show: true
   
   rules:
   - !SHARDING
     broadcastTables: t_alarm_domain # 广播表规则列表
     bindingTables: # 绑定表规则列表。见: https://github.com/apache/shardingsphere/issues/21002
       - t_alarm,t_sensor_alarm
       - t_alarm,t_video_alarm
       - t_alarm,t_device_offline_alarm
       - t_alarm,t_alarm_handle
     tables: # 单分片键的标准分片场景
       t_alarm:
         actualDataNodes: db0.t_alarm_$->{2022..2025}
         tableStrategy:
           standard:
             shardingColumns: alarm_time
             shardingAlgorithmName: time-inline
       t_sensor_alarm:
         actualDataNodes: db0.t_sensor_alarm_$->{2022..2025}
         tableStrategy:
           standard:
             shardingColumns: alarm_time
             shardingAlgorithmName: time-inline
       t_video_alarm:
         actualDataNodes: db0.t_video_alarm_$->{2022..2025}
         tableStrategy:
           standard:
             shardingColumns: alarm_time
             shardingAlgorithmName: time-inline
       t_device_offline_alarm:
         actualDataNodes: db0.t_device_offline_alarm_$->{2022..2025}
         tableStrategy:
           standard:
             shardingColumns: alarm_time
             shardingAlgorithmName: time-inline
       t_alarm_handle:
         actualDataNodes: db0.t_alarm_handle_$->{2022..2025}
         tableStrategy:
           standard:
             shardingColumns: alarm_time
             shardingAlgorithmName: time-inline
     shardingAlgorithms:
       time-inline:
         type: CLASS_BASED
         props:
           strategy: standard
           algorithmClassName: cn.com.asoco.alarm_platform.server.sharding.AlarmTimeShardingAlgorithm # 使用自定义类实现分片逻辑处理
   
   ```
   
   But i get error:
   ```
   org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'alarmClient' defined in file [/Users/pengxianggui/project/gitlab/asoco-product/asoco-alarm-platform/alarm-server/target/classes/cn/com/asoco/alarm_platform/server/client/AlarmClient.class]: Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'alarmService': Injection of resource dependencies failed; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'sendConfig' defined in file [/Users/pengxianggui/project/gitlab/asoco-product/asoco-alarm-platform/alarm-server/target/classes/cn/com/asoco/alarm_platform/server/send/SendConfig.class]: Unsatisfied dependency expressed through constructor parameter 1; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean w
 ith name 'alarmDomainService' defined in file [/Users/pengxianggui/project/gitlab/asoco-product/asoco-alarm-platform/alarm-server/target/classes/cn/com/asoco/alarm_platform/server/service/AlarmDomainService.class]: Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'alarmDomainMapper' defined in file [/Users/pengxianggui/project/gitlab/asoco-product/asoco-alarm-platform/alarm-server/target/classes/cn/com/asoco/alarm_platform/server/dao/AlarmDomainMapper.class]: Unsatisfied dependency expressed through bean property 'sqlSessionFactory'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'sqlSessionFactory' defined in class path resource [com/baomidou/mybatisplus/autoconfigure/MybatisPlusAutoConfiguration.class]: Unsatisfied dependency expressed through method 'sqlSessionFactory' parameter 0;
  nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'shardingSphereDatasource' defined in class path resource [cn/com/asoco/alarm_platform/server/sharding/ShardingSphereConfig.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 Cannot create property=rules for JavaBean=org.apache.shardingsphere.infra.yaml.config.pojo.YamlRootConfiguration@58a5b69c
    in 'reader', line 2, column 1:
       dataSources:
       ^
   No single argument constructor found for interface org.apache.shardingsphere.infra.yaml.config.pojo.rule.YamlRuleConfiguration
    in 'reader', line 23, column 3:
         broadcastTables: t_alarm_domain  ... 
         ^
   
   	at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:797)
   	at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:227)
   	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1356)
   	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1203)
   	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:556)
   	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:516)
   	at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:324)
   	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:226)
   	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:322)
   	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202)
   	at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:897)
   	at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:879)
   	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:551)
   	at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:141)
   	at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:747)
   	at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:397)
   	at org.springframework.boot.SpringApplication.run(SpringApplication.java:315)
   	at org.springframework.boot.SpringApplication.run(SpringApplication.java:1226)
   	at org.springframework.boot.SpringApplication.run(SpringApplication.java:1215)
   	at cn.com.asoco.alarm_platform.server.AlarmPlatformApplication.main(AlarmPlatformApplication.java:29)
   Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'alarmService': Injection of resource dependencies failed; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'sendConfig' defined in file [/Users/pengxianggui/project/gitlab/asoco-product/asoco-alarm-platform/alarm-server/target/classes/cn/com/asoco/alarm_platform/server/send/SendConfig.class]: Unsatisfied dependency expressed through constructor parameter 1; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'alarmDomainService' defined in file [/Users/pengxianggui/project/gitlab/asoco-product/asoco-alarm-platform/alarm-server/target/classes/cn/com/asoco/alarm_platform/server/service/AlarmDomainService.class]: Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyExcept
 ion: Error creating bean with name 'alarmDomainMapper' defined in file [/Users/pengxianggui/project/gitlab/asoco-product/asoco-alarm-platform/alarm-server/target/classes/cn/com/asoco/alarm_platform/server/dao/AlarmDomainMapper.class]: Unsatisfied dependency expressed through bean property 'sqlSessionFactory'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'sqlSessionFactory' defined in class path resource [com/baomidou/mybatisplus/autoconfigure/MybatisPlusAutoConfiguration.class]: Unsatisfied dependency expressed through method 'sqlSessionFactory' parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'shardingSphereDatasource' defined in class path resource [cn/com/asoco/alarm_platform/server/sharding/ShardingSphereConfig.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Fa
 iled to instantiate [javax.sql.DataSource]: Factory method 'shardingSphereDatasource' threw exception; nested exception is Cannot create property=rules for JavaBean=org.apache.shardingsphere.infra.yaml.config.pojo.YamlRootConfiguration@58a5b69c
    in 'reader', line 2, column 1:
       dataSources:
       ^
   No single argument constructor found for interface org.apache.shardingsphere.infra.yaml.config.pojo.rule.YamlRuleConfiguration
    in 'reader', line 23, column 3:
         broadcastTables: t_alarm_domain  ... 
         ^
   
   	at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.postProcessProperties(CommonAnnotationBeanPostProcessor.java:321)
   	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1420)
   	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:593)
   	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:516)
   	at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:324)
   	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:226)
   	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:322)
   	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202)
   	at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:276)
   	at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1307)
   	at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1227)
   	at org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument(ConstructorResolver.java:884)
   	at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:788)
   	... 19 common frames omitted
   Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'sendConfig' defined in file [/Users/pengxianggui/project/gitlab/asoco-product/asoco-alarm-platform/alarm-server/target/classes/cn/com/asoco/alarm_platform/server/send/SendConfig.class]: Unsatisfied dependency expressed through constructor parameter 1; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'alarmDomainService' defined in file [/Users/pengxianggui/project/gitlab/asoco-product/asoco-alarm-platform/alarm-server/target/classes/cn/com/asoco/alarm_platform/server/service/AlarmDomainService.class]: Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'alarmDomainMapper' defined in file [/Users/pengxianggui/project/gitlab/asoco-product/asoco-alarm-platform/alarm-server/target/clas
 ses/cn/com/asoco/alarm_platform/server/dao/AlarmDomainMapper.class]: Unsatisfied dependency expressed through bean property 'sqlSessionFactory'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'sqlSessionFactory' defined in class path resource [com/baomidou/mybatisplus/autoconfigure/MybatisPlusAutoConfiguration.class]: Unsatisfied dependency expressed through method 'sqlSessionFactory' parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'shardingSphereDatasource' defined in class path resource [cn/com/asoco/alarm_platform/server/sharding/ShardingSphereConfig.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 Cannot create property=rules for JavaBean=o
 rg.apache.shardingsphere.infra.yaml.config.pojo.YamlRootConfiguration@58a5b69c
    in 'reader', line 2, column 1:
       dataSources:
       ^
   No single argument constructor found for interface org.apache.shardingsphere.infra.yaml.config.pojo.rule.YamlRuleConfiguration
    in 'reader', line 23, column 3:
         broadcastTables: t_alarm_domain  ... 
         ^
   
   	at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:797)
   	at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:227)
   	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1356)
   	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1203)
   	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:556)
   	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:516)
   	at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:324)
   	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:226)
   	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:322)
   	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202)
   	at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:408)
   	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1336)
   	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1176)
   	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:556)
   	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:516)
   	at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:324)
   	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:226)
   	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:322)
   	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:207)
   	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.resolveBeanByName(AbstractAutowireCapableBeanFactory.java:453)
   	at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.autowireResource(CommonAnnotationBeanPostProcessor.java:527)
   	at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.getResource(CommonAnnotationBeanPostProcessor.java:497)
   	at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor$ResourceElement.getResourceToInject(CommonAnnotationBeanPostProcessor.java:650)
   	at org.springframework.beans.factory.annotation.InjectionMetadata$InjectedElement.inject(InjectionMetadata.java:239)
   	at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:130)
   	at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.postProcessProperties(CommonAnnotationBeanPostProcessor.java:318)
   	... 31 common frames omitted
   Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'alarmDomainService' defined in file [/Users/pengxianggui/project/gitlab/asoco-product/asoco-alarm-platform/alarm-server/target/classes/cn/com/asoco/alarm_platform/server/service/AlarmDomainService.class]: Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'alarmDomainMapper' defined in file [/Users/pengxianggui/project/gitlab/asoco-product/asoco-alarm-platform/alarm-server/target/classes/cn/com/asoco/alarm_platform/server/dao/AlarmDomainMapper.class]: Unsatisfied dependency expressed through bean property 'sqlSessionFactory'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'sqlSessionFactory' defined in class path resource [com/baomidou/mybatisplus/autoconfigure/MybatisPlusAutoCo
 nfiguration.class]: Unsatisfied dependency expressed through method 'sqlSessionFactory' parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'shardingSphereDatasource' defined in class path resource [cn/com/asoco/alarm_platform/server/sharding/ShardingSphereConfig.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 Cannot create property=rules for JavaBean=org.apache.shardingsphere.infra.yaml.config.pojo.YamlRootConfiguration@58a5b69c
    in 'reader', line 2, column 1:
       dataSources:
       ^
   No single argument constructor found for interface org.apache.shardingsphere.infra.yaml.config.pojo.rule.YamlRuleConfiguration
    in 'reader', line 23, column 3:
         broadcastTables: t_alarm_domain  ... 
         ^
   
   	at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:797)
   	at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:227)
   	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1356)
   	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1203)
   	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:556)
   	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:516)
   	at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:324)
   	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:226)
   	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:322)
   	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202)
   	at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:276)
   	at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1307)
   	at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1227)
   	at org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument(ConstructorResolver.java:884)
   	at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:788)
   	... 56 common frames omitted
   Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'alarmDomainMapper' defined in file [/Users/pengxianggui/project/gitlab/asoco-product/asoco-alarm-platform/alarm-server/target/classes/cn/com/asoco/alarm_platform/server/dao/AlarmDomainMapper.class]: Unsatisfied dependency expressed through bean property 'sqlSessionFactory'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'sqlSessionFactory' defined in class path resource [com/baomidou/mybatisplus/autoconfigure/MybatisPlusAutoConfiguration.class]: Unsatisfied dependency expressed through method 'sqlSessionFactory' parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'shardingSphereDatasource' defined in class path resource [cn/com/asoco/alarm_platform/server/sharding/ShardingSphereConfig.class]: Bean instantiation via factory method failed; ne
 sted exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [javax.sql.DataSource]: Factory method 'shardingSphereDatasource' threw exception; nested exception is Cannot create property=rules for JavaBean=org.apache.shardingsphere.infra.yaml.config.pojo.YamlRootConfiguration@58a5b69c
    in 'reader', line 2, column 1:
       dataSources:
       ^
   No single argument constructor found for interface org.apache.shardingsphere.infra.yaml.config.pojo.rule.YamlRuleConfiguration
    in 'reader', line 23, column 3:
         broadcastTables: t_alarm_domain  ... 
         ^
   
   	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireByType(AbstractAutowireCapableBeanFactory.java:1524)
   	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1404)
   	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:593)
   	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:516)
   	at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:324)
   	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:226)
   	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:322)
   	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202)
   	at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:276)
   	at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1307)
   	at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1227)
   	at org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument(ConstructorResolver.java:884)
   	at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:788)
   	... 70 common frames omitted
   Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'sqlSessionFactory' defined in class path resource [com/baomidou/mybatisplus/autoconfigure/MybatisPlusAutoConfiguration.class]: Unsatisfied dependency expressed through method 'sqlSessionFactory' parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'shardingSphereDatasource' defined in class path resource [cn/com/asoco/alarm_platform/server/sharding/ShardingSphereConfig.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 Cannot create property=rules for JavaBean=org.apache.shardingsphere.infra.yaml.config.pojo.YamlRootConfiguration@58a5b69c
    in 'reader', line 2, column 1:
       dataSources:
       ^
   No single argument constructor found for interface org.apache.shardingsphere.infra.yaml.config.pojo.rule.YamlRuleConfiguration
    in 'reader', line 23, column 3:
         broadcastTables: t_alarm_domain  ... 
         ^
   
   	at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:797)
   	at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:538)
   	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1336)
   	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1176)
   	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:556)
   	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:516)
   	at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:324)
   	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:226)
   	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:322)
   	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202)
   	at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:276)
   	at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1307)
   	at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1227)
   	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireByType(AbstractAutowireCapableBeanFactory.java:1509)
   	... 82 common frames omitted
   Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'shardingSphereDatasource' defined in class path resource [cn/com/asoco/alarm_platform/server/sharding/ShardingSphereConfig.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 Cannot create property=rules for JavaBean=org.apache.shardingsphere.infra.yaml.config.pojo.YamlRootConfiguration@58a5b69c
    in 'reader', line 2, column 1:
       dataSources:
       ^
   No single argument constructor found for interface org.apache.shardingsphere.infra.yaml.config.pojo.rule.YamlRuleConfiguration
    in 'reader', line 23, column 3:
         broadcastTables: t_alarm_domain  ... 
         ^
   
   	at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:655)
   	at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:483)
   	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1336)
   	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1176)
   	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:556)
   	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:516)
   	at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:324)
   	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:226)
   	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:322)
   	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202)
   	at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:276)
   	at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1307)
   	at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1227)
   	at org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument(ConstructorResolver.java:884)
   	at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:788)
   	... 95 common frames omitted
   Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [javax.sql.DataSource]: Factory method 'shardingSphereDatasource' threw exception; nested exception is Cannot create property=rules for JavaBean=org.apache.shardingsphere.infra.yaml.config.pojo.YamlRootConfiguration@58a5b69c
    in 'reader', line 2, column 1:
       dataSources:
       ^
   No single argument constructor found for interface org.apache.shardingsphere.infra.yaml.config.pojo.rule.YamlRuleConfiguration
    in 'reader', line 23, column 3:
         broadcastTables: t_alarm_domain  ... 
         ^
   
   	at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:185)
   	at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:650)
   	... 109 common frames omitted
   Caused by: org.yaml.snakeyaml.constructor.ConstructorException: Cannot create property=rules for JavaBean=org.apache.shardingsphere.infra.yaml.config.pojo.YamlRootConfiguration@58a5b69c
    in 'reader', line 2, column 1:
       dataSources:
       ^
   No single argument constructor found for interface org.apache.shardingsphere.infra.yaml.config.pojo.rule.YamlRuleConfiguration
    in 'reader', line 23, column 3:
         broadcastTables: t_alarm_domain  ... 
         ^
   
   	at org.yaml.snakeyaml.constructor.Constructor$ConstructMapping.constructJavaBean2ndStep(Constructor.java:321)
   	at org.yaml.snakeyaml.constructor.Constructor$ConstructMapping.construct(Constructor.java:207)
   	at org.yaml.snakeyaml.constructor.Constructor$ConstructYamlObject.construct(Constructor.java:358)
   	at org.yaml.snakeyaml.constructor.BaseConstructor.constructObjectNoCheck(BaseConstructor.java:270)
   	at org.yaml.snakeyaml.constructor.BaseConstructor.constructObject(BaseConstructor.java:253)
   	at org.yaml.snakeyaml.constructor.BaseConstructor.constructDocument(BaseConstructor.java:207)
   	at org.yaml.snakeyaml.constructor.BaseConstructor.getSingleData(BaseConstructor.java:191)
   	at org.yaml.snakeyaml.Yaml.loadFromReader(Yaml.java:477)
   	at org.yaml.snakeyaml.Yaml.loadAs(Yaml.java:443)
   	at org.apache.shardingsphere.infra.util.yaml.YamlEngine.unmarshal(YamlEngine.java:55)
   	at org.apache.shardingsphere.driver.api.yaml.YamlShardingSphereDataSourceFactory.createDataSource(YamlShardingSphereDataSourceFactory.java:61)
   	at cn.com.asoco.alarm_platform.server.sharding.ShardingSphereConfig.shardingSphereDatasource(ShardingSphereConfig.java:26)
   	at cn.com.asoco.alarm_platform.server.sharding.ShardingSphereConfig$$EnhancerBySpringCGLIB$$23edcc1.CGLIB$shardingSphereDatasource$0(<generated>)
   	at cn.com.asoco.alarm_platform.server.sharding.ShardingSphereConfig$$EnhancerBySpringCGLIB$$23edcc1$$FastClassBySpringCGLIB$$c41430c2.invoke(<generated>)
   	at org.springframework.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:244)
   	at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:331)
   	at cn.com.asoco.alarm_platform.server.sharding.ShardingSphereConfig$$EnhancerBySpringCGLIB$$23edcc1.shardingSphereDatasource(<generated>)
   	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
   	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
   	at java.lang.reflect.Method.invoke(Method.java:498)
   	at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:154)
   	... 110 common frames omitted
   Caused by: org.yaml.snakeyaml.error.YAMLException: No single argument constructor found for interface org.apache.shardingsphere.infra.yaml.config.pojo.rule.YamlRuleConfiguration
   	at org.yaml.snakeyaml.constructor.Constructor$ConstructScalar.construct(Constructor.java:417)
   	at org.yaml.snakeyaml.constructor.BaseConstructor.constructObjectNoCheck(BaseConstructor.java:270)
   	at org.yaml.snakeyaml.constructor.BaseConstructor.constructObject(BaseConstructor.java:253)
   	at org.yaml.snakeyaml.constructor.SafeConstructor.processDuplicateKeys(SafeConstructor.java:108)
   	at org.yaml.snakeyaml.constructor.SafeConstructor.flattenMapping(SafeConstructor.java:81)
   	at org.yaml.snakeyaml.constructor.SafeConstructor.flattenMapping(SafeConstructor.java:76)
   	at org.yaml.snakeyaml.constructor.SafeConstructor.constructSet2ndStep(SafeConstructor.java:218)
   	at org.yaml.snakeyaml.constructor.BaseConstructor.constructSet(BaseConstructor.java:545)
   	at org.yaml.snakeyaml.constructor.Constructor$ConstructMapping.construct(Constructor.java:199)
   	at org.yaml.snakeyaml.constructor.BaseConstructor.constructObjectNoCheck(BaseConstructor.java:270)
   	at org.yaml.snakeyaml.constructor.BaseConstructor.constructObject(BaseConstructor.java:253)
   	at org.yaml.snakeyaml.constructor.Constructor$ConstructMapping.newInstance(Constructor.java:333)
   	at org.yaml.snakeyaml.constructor.Constructor$ConstructMapping.constructJavaBean2ndStep(Constructor.java:298)
   	... 131 common frames omitted
   ```
   I had upgrade snakeyml to 1.33...
   I don't know what I did wrong...
   
   Thank you for help so much!


-- 
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: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [shardingsphere] pengxianggui commented on issue #23131: org.apache.shardingsphere.sql.parser.exception.SQLParsingException: You have an error in your SQL syntax

Posted by GitBox <gi...@apache.org>.
pengxianggui commented on issue #23131:
URL: https://github.com/apache/shardingsphere/issues/23131#issuecomment-1369413660

   > Spring Boot starter has been deprecated and removed since 5.3.0. There is a more simple way to integrate ShardingSphere with Spring Boot. You may refer to: https://shardingsphere.apache.org/document/current/en/user-manual/shardingsphere-jdbc/yaml-config/jdbc-driver/spring-boot/
   
   @TeslaCN Hi, Ask a little more please, This way of integrating springboot makes it difficult to overwrite environment variables. 
   For example:
   ```
   spring:
     datasource:
       url: jdbc:shardingsphere:classpath:application-sharding.yml
       driver-class-name: org.apache.shardingsphere.driver.ShardingSphereDriver
   ```
   application-sharding.yml:
   ```
   dataSources:
     db0: # 单数据库节点无意义,当存在多个时用于区分
       dataSourceClassName: com.zaxxer.hikari.HikariDataSource # 数据库连接池全类名
       driverClassName: com.mysql.cj.jdbc.Driver
       jdbcUrl: jdbc:mysql://${spring.datasource.host}:${spring.datasource.port}/${spring.datasource.schema-name:asoco_alarm_platform}?${spring.datasource.suffix} # 拼接的连接url, 无需变动
       username: ${spring.datasource.username}
       password: ${spring.datasource.password}
   ```
   How these variables are overridden by environment variables is a big problem? 


-- 
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: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [shardingsphere] pengxianggui commented on issue #23131: org.apache.shardingsphere.sql.parser.exception.SQLParsingException: You have an error in your SQL syntax

Posted by GitBox <gi...@apache.org>.
pengxianggui commented on issue #23131:
URL: https://github.com/apache/shardingsphere/issues/23131#issuecomment-1366442600

   > Hi @pengxianggui Please try the ShardingSphere 5.3.0. MySQL Json support has been enhanced. #20709
   
   I use depend:
   ```
   <dependency>
               <groupId>org.apache.shardingsphere</groupId>
               <artifactId>shardingsphere-jdbc-core-spring-boot-starter</artifactId>
               <version>${shardingsphere.version}</version>
           </dependency>
   ```
   But version 5.3.0 doesn't seem to exist? The spring-boot-starter chapter is also missing from the documentation.


-- 
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: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [shardingsphere] TeslaCN commented on issue #23131: org.apache.shardingsphere.sql.parser.exception.SQLParsingException: You have an error in your SQL syntax

Posted by GitBox <gi...@apache.org>.
TeslaCN commented on issue #23131:
URL: https://github.com/apache/shardingsphere/issues/23131#issuecomment-1366412489

   Hi @pengxianggui 
   Please try the ShardingSphere 5.3.0.
   
   I tried the SQL in master branch and it could be parsed.
   
   ![image](https://user-images.githubusercontent.com/20503072/209770744-f5f3f55d-bde7-4254-8321-4f1b5334d169.png)
   
   
   ![image](https://user-images.githubusercontent.com/20503072/209770656-a29a216a-862a-4c4c-a985-40970ff93612.png)
   


-- 
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: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [shardingsphere] pengxianggui commented on issue #23131: org.apache.shardingsphere.sql.parser.exception.SQLParsingException: You have an error in your SQL syntax

Posted by GitBox <gi...@apache.org>.
pengxianggui commented on issue #23131:
URL: https://github.com/apache/shardingsphere/issues/23131#issuecomment-1366414971

   > 
   
   @TeslaCN Sorry for my mistake. I update the issue description.


-- 
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: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [shardingsphere] TeslaCN commented on issue #23131: org.apache.shardingsphere.sql.parser.exception.SQLParsingException: You have an error in your SQL syntax

Posted by GitBox <gi...@apache.org>.
TeslaCN commented on issue #23131:
URL: https://github.com/apache/shardingsphere/issues/23131#issuecomment-1366428779

   Duplicate with #21233.


-- 
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: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [shardingsphere] pengxianggui commented on issue #23131: org.apache.shardingsphere.sql.parser.exception.SQLParsingException: You have an error in your SQL syntax

Posted by GitBox <gi...@apache.org>.
pengxianggui commented on issue #23131:
URL: https://github.com/apache/shardingsphere/issues/23131#issuecomment-1366563132

   > Spring Boot starter has been deprecated and removed since 5.3.0. There is a more simple way to integrate ShardingSphere with Spring Boot. You may refer to: https://shardingsphere.apache.org/document/current/en/user-manual/shardingsphere-jdbc/yaml-config/jdbc-driver/spring-boot/
   
   @TeslaCN Sorry to bother you again...
   I can use this way to to integrate ShardingSphere with Spring Boot cause It will affects the other component. I decided to define a bean myself with the following code, which I'm not sure is feasible:
   ```
   @Primary
       @Bean
       DataSource shardingSphereDatasource() throws IOException, SQLException {
           return YamlShardingSphereDataSourceFactory.createDataSource(getFile("classpath:sharding-table.yml"));
       }
   ```
   The other relevant code is the sharding-table.yml file.
   The file content as follow: 
   ```
   # shardingsphere 5.3.0文档 https://shardingsphere.apache.org/document/current/cn/user-manual/shardingsphere-jdbc/yaml-config/rules/sharding/
   dataSources:
     db0: # 单数据库节点无意义,当存在多个时用于区分
       dataSourceClassName: com.zaxxer.hikari.HikariDataSource # 数据库连接池全类名
       driverClassName: ${spring.datasource.driver-class-name}
       jdbcUrl: ${spring.datasource.url}
       username: ${spring.datasource.username}
       password: ${spring.datasource.password}
   props:
     sql-show: true
   
   rules:
   - !SHARDING
     broadcastTables: t_alarm_domain # 广播表规则列表
     bindingTables: # 绑定表规则列表。见: https://github.com/apache/shardingsphere/issues/21002
       - t_alarm,t_sensor_alarm
       - t_alarm,t_video_alarm
       - t_alarm,t_device_offline_alarm
       - t_alarm,t_alarm_handle
     tables: # 单分片键的标准分片场景
       t_alarm:
         actualDataNodes: db0.t_alarm_$->{2022..2025}
         tableStrategy:
           standard:
             shardingColumns: alarm_time
             shardingAlgorithmName: time-inline
       t_sensor_alarm:
         actualDataNodes: db0.t_sensor_alarm_$->{2022..2025}
         tableStrategy:
           standard:
             shardingColumns: alarm_time
             shardingAlgorithmName: time-inline
       t_video_alarm:
         actualDataNodes: db0.t_video_alarm_$->{2022..2025}
         tableStrategy:
           standard:
             shardingColumns: alarm_time
             shardingAlgorithmName: time-inline
       t_device_offline_alarm:
         actualDataNodes: db0.t_device_offline_alarm_$->{2022..2025}
         tableStrategy:
           standard:
             shardingColumns: alarm_time
             shardingAlgorithmName: time-inline
       t_alarm_handle:
         actualDataNodes: db0.t_alarm_handle_$->{2022..2025}
         tableStrategy:
           standard:
             shardingColumns: alarm_time
             shardingAlgorithmName: time-inline
     shardingAlgorithms:
       time-inline:
         type: CLASS_BASED
         props:
           strategy: standard
           algorithmClassName: cn.com.asoco.alarm_platform.server.sharding.AlarmTimeShardingAlgorithm # 使用自定义类实现分片逻辑处理
   
   ```
   
   But i get error:
   ```
   org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'alarmClient' defined in file [/Users/pengxianggui/project/gitlab/asoco-product/asoco-alarm-platform/alarm-server/target/classes/cn/com/asoco/alarm_platform/server/client/AlarmClient.class]: Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'alarmService': Injection of resource dependencies failed; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'sendConfig' defined in file [/Users/pengxianggui/project/gitlab/asoco-product/asoco-alarm-platform/alarm-server/target/classes/cn/com/asoco/alarm_platform/server/send/SendConfig.class]: Unsatisfied dependency expressed through constructor parameter 1; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean w
 ith name 'alarmDomainService' defined in file [/Users/pengxianggui/project/gitlab/asoco-product/asoco-alarm-platform/alarm-server/target/classes/cn/com/asoco/alarm_platform/server/service/AlarmDomainService.class]: Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'alarmDomainMapper' defined in file [/Users/pengxianggui/project/gitlab/asoco-product/asoco-alarm-platform/alarm-server/target/classes/cn/com/asoco/alarm_platform/server/dao/AlarmDomainMapper.class]: Unsatisfied dependency expressed through bean property 'sqlSessionFactory'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'sqlSessionFactory' defined in class path resource [com/baomidou/mybatisplus/autoconfigure/MybatisPlusAutoConfiguration.class]: Unsatisfied dependency expressed through method 'sqlSessionFactory' parameter 0;
  nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'shardingSphereDatasource' defined in class path resource [cn/com/asoco/alarm_platform/server/sharding/ShardingSphereConfig.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 Cannot create property=rules for JavaBean=org.apache.shardingsphere.infra.yaml.config.pojo.YamlRootConfiguration@58a5b69c
    in 'reader', line 2, column 1:
       dataSources:
       ^
   No single argument constructor found for interface org.apache.shardingsphere.infra.yaml.config.pojo.rule.YamlRuleConfiguration
    in 'reader', line 23, column 3:
         broadcastTables: t_alarm_domain  ... 
         ^
   
   	at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:797)
   	at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:227)
   	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1356)
   	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1203)
   	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:556)
   	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:516)
   	at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:324)
   	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:226)
   	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:322)
   	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202)
   	at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:897)
   	at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:879)
   	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:551)
   	at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:141)
   	at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:747)
   	at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:397)
   	at org.springframework.boot.SpringApplication.run(SpringApplication.java:315)
   	at org.springframework.boot.SpringApplication.run(SpringApplication.java:1226)
   	at org.springframework.boot.SpringApplication.run(SpringApplication.java:1215)
   	at cn.com.asoco.alarm_platform.server.AlarmPlatformApplication.main(AlarmPlatformApplication.java:29)
   Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'alarmService': Injection of resource dependencies failed; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'sendConfig' defined in file [/Users/pengxianggui/project/gitlab/asoco-product/asoco-alarm-platform/alarm-server/target/classes/cn/com/asoco/alarm_platform/server/send/SendConfig.class]: Unsatisfied dependency expressed through constructor parameter 1; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'alarmDomainService' defined in file [/Users/pengxianggui/project/gitlab/asoco-product/asoco-alarm-platform/alarm-server/target/classes/cn/com/asoco/alarm_platform/server/service/AlarmDomainService.class]: Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyExcept
 ion: Error creating bean with name 'alarmDomainMapper' defined in file [/Users/pengxianggui/project/gitlab/asoco-product/asoco-alarm-platform/alarm-server/target/classes/cn/com/asoco/alarm_platform/server/dao/AlarmDomainMapper.class]: Unsatisfied dependency expressed through bean property 'sqlSessionFactory'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'sqlSessionFactory' defined in class path resource [com/baomidou/mybatisplus/autoconfigure/MybatisPlusAutoConfiguration.class]: Unsatisfied dependency expressed through method 'sqlSessionFactory' parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'shardingSphereDatasource' defined in class path resource [cn/com/asoco/alarm_platform/server/sharding/ShardingSphereConfig.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Fa
 iled to instantiate [javax.sql.DataSource]: Factory method 'shardingSphereDatasource' threw exception; nested exception is Cannot create property=rules for JavaBean=org.apache.shardingsphere.infra.yaml.config.pojo.YamlRootConfiguration@58a5b69c
    in 'reader', line 2, column 1:
       dataSources:
       ^
   No single argument constructor found for interface org.apache.shardingsphere.infra.yaml.config.pojo.rule.YamlRuleConfiguration
    in 'reader', line 23, column 3:
         broadcastTables: t_alarm_domain  ... 
         ^
   
   	at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.postProcessProperties(CommonAnnotationBeanPostProcessor.java:321)
   	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1420)
   	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:593)
   	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:516)
   	at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:324)
   	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:226)
   	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:322)
   	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202)
   	at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:276)
   	at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1307)
   	at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1227)
   	at org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument(ConstructorResolver.java:884)
   	at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:788)
   	... 19 common frames omitted
   Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'sendConfig' defined in file [/Users/pengxianggui/project/gitlab/asoco-product/asoco-alarm-platform/alarm-server/target/classes/cn/com/asoco/alarm_platform/server/send/SendConfig.class]: Unsatisfied dependency expressed through constructor parameter 1; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'alarmDomainService' defined in file [/Users/pengxianggui/project/gitlab/asoco-product/asoco-alarm-platform/alarm-server/target/classes/cn/com/asoco/alarm_platform/server/service/AlarmDomainService.class]: Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'alarmDomainMapper' defined in file [/Users/pengxianggui/project/gitlab/asoco-product/asoco-alarm-platform/alarm-server/target/clas
 ses/cn/com/asoco/alarm_platform/server/dao/AlarmDomainMapper.class]: Unsatisfied dependency expressed through bean property 'sqlSessionFactory'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'sqlSessionFactory' defined in class path resource [com/baomidou/mybatisplus/autoconfigure/MybatisPlusAutoConfiguration.class]: Unsatisfied dependency expressed through method 'sqlSessionFactory' parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'shardingSphereDatasource' defined in class path resource [cn/com/asoco/alarm_platform/server/sharding/ShardingSphereConfig.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 Cannot create property=rules for JavaBean=o
 rg.apache.shardingsphere.infra.yaml.config.pojo.YamlRootConfiguration@58a5b69c
    in 'reader', line 2, column 1:
       dataSources:
       ^
   No single argument constructor found for interface org.apache.shardingsphere.infra.yaml.config.pojo.rule.YamlRuleConfiguration
    in 'reader', line 23, column 3:
         broadcastTables: t_alarm_domain  ... 
         ^
   
   	at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:797)
   	at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:227)
   	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1356)
   	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1203)
   	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:556)
   	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:516)
   	at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:324)
   	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:226)
   	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:322)
   	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202)
   	at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:408)
   	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1336)
   	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1176)
   	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:556)
   	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:516)
   	at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:324)
   	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:226)
   	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:322)
   	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:207)
   	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.resolveBeanByName(AbstractAutowireCapableBeanFactory.java:453)
   	at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.autowireResource(CommonAnnotationBeanPostProcessor.java:527)
   	at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.getResource(CommonAnnotationBeanPostProcessor.java:497)
   	at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor$ResourceElement.getResourceToInject(CommonAnnotationBeanPostProcessor.java:650)
   	at org.springframework.beans.factory.annotation.InjectionMetadata$InjectedElement.inject(InjectionMetadata.java:239)
   	at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:130)
   	at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.postProcessProperties(CommonAnnotationBeanPostProcessor.java:318)
   	... 31 common frames omitted
   Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'alarmDomainService' defined in file [/Users/pengxianggui/project/gitlab/asoco-product/asoco-alarm-platform/alarm-server/target/classes/cn/com/asoco/alarm_platform/server/service/AlarmDomainService.class]: Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'alarmDomainMapper' defined in file [/Users/pengxianggui/project/gitlab/asoco-product/asoco-alarm-platform/alarm-server/target/classes/cn/com/asoco/alarm_platform/server/dao/AlarmDomainMapper.class]: Unsatisfied dependency expressed through bean property 'sqlSessionFactory'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'sqlSessionFactory' defined in class path resource [com/baomidou/mybatisplus/autoconfigure/MybatisPlusAutoCo
 nfiguration.class]: Unsatisfied dependency expressed through method 'sqlSessionFactory' parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'shardingSphereDatasource' defined in class path resource [cn/com/asoco/alarm_platform/server/sharding/ShardingSphereConfig.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 Cannot create property=rules for JavaBean=org.apache.shardingsphere.infra.yaml.config.pojo.YamlRootConfiguration@58a5b69c
    in 'reader', line 2, column 1:
       dataSources:
       ^
   No single argument constructor found for interface org.apache.shardingsphere.infra.yaml.config.pojo.rule.YamlRuleConfiguration
    in 'reader', line 23, column 3:
         broadcastTables: t_alarm_domain  ... 
         ^
   
   	at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:797)
   	at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:227)
   	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1356)
   	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1203)
   	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:556)
   	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:516)
   	at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:324)
   	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:226)
   	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:322)
   	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202)
   	at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:276)
   	at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1307)
   	at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1227)
   	at org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument(ConstructorResolver.java:884)
   	at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:788)
   	... 56 common frames omitted
   Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'alarmDomainMapper' defined in file [/Users/pengxianggui/project/gitlab/asoco-product/asoco-alarm-platform/alarm-server/target/classes/cn/com/asoco/alarm_platform/server/dao/AlarmDomainMapper.class]: Unsatisfied dependency expressed through bean property 'sqlSessionFactory'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'sqlSessionFactory' defined in class path resource [com/baomidou/mybatisplus/autoconfigure/MybatisPlusAutoConfiguration.class]: Unsatisfied dependency expressed through method 'sqlSessionFactory' parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'shardingSphereDatasource' defined in class path resource [cn/com/asoco/alarm_platform/server/sharding/ShardingSphereConfig.class]: Bean instantiation via factory method failed; ne
 sted exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [javax.sql.DataSource]: Factory method 'shardingSphereDatasource' threw exception; nested exception is Cannot create property=rules for JavaBean=org.apache.shardingsphere.infra.yaml.config.pojo.YamlRootConfiguration@58a5b69c
    in 'reader', line 2, column 1:
       dataSources:
       ^
   No single argument constructor found for interface org.apache.shardingsphere.infra.yaml.config.pojo.rule.YamlRuleConfiguration
    in 'reader', line 23, column 3:
         broadcastTables: t_alarm_domain  ... 
         ^
   
   	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireByType(AbstractAutowireCapableBeanFactory.java:1524)
   	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1404)
   	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:593)
   	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:516)
   	at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:324)
   	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:226)
   	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:322)
   	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202)
   	at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:276)
   	at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1307)
   	at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1227)
   	at org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument(ConstructorResolver.java:884)
   	at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:788)
   	... 70 common frames omitted
   Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'sqlSessionFactory' defined in class path resource [com/baomidou/mybatisplus/autoconfigure/MybatisPlusAutoConfiguration.class]: Unsatisfied dependency expressed through method 'sqlSessionFactory' parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'shardingSphereDatasource' defined in class path resource [cn/com/asoco/alarm_platform/server/sharding/ShardingSphereConfig.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 Cannot create property=rules for JavaBean=org.apache.shardingsphere.infra.yaml.config.pojo.YamlRootConfiguration@58a5b69c
    in 'reader', line 2, column 1:
       dataSources:
       ^
   No single argument constructor found for interface org.apache.shardingsphere.infra.yaml.config.pojo.rule.YamlRuleConfiguration
    in 'reader', line 23, column 3:
         broadcastTables: t_alarm_domain  ... 
         ^
   
   	at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:797)
   	at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:538)
   	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1336)
   	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1176)
   	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:556)
   	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:516)
   	at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:324)
   	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:226)
   	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:322)
   	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202)
   	at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:276)
   	at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1307)
   	at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1227)
   	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireByType(AbstractAutowireCapableBeanFactory.java:1509)
   	... 82 common frames omitted
   Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'shardingSphereDatasource' defined in class path resource [cn/com/asoco/alarm_platform/server/sharding/ShardingSphereConfig.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 Cannot create property=rules for JavaBean=org.apache.shardingsphere.infra.yaml.config.pojo.YamlRootConfiguration@58a5b69c
    in 'reader', line 2, column 1:
       dataSources:
       ^
   No single argument constructor found for interface org.apache.shardingsphere.infra.yaml.config.pojo.rule.YamlRuleConfiguration
    in 'reader', line 23, column 3:
         broadcastTables: t_alarm_domain  ... 
         ^
   
   	at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:655)
   	at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:483)
   	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1336)
   	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1176)
   	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:556)
   	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:516)
   	at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:324)
   	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:226)
   	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:322)
   	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202)
   	at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:276)
   	at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1307)
   	at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1227)
   	at org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument(ConstructorResolver.java:884)
   	at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:788)
   	... 95 common frames omitted
   Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [javax.sql.DataSource]: Factory method 'shardingSphereDatasource' threw exception; nested exception is Cannot create property=rules for JavaBean=org.apache.shardingsphere.infra.yaml.config.pojo.YamlRootConfiguration@58a5b69c
    in 'reader', line 2, column 1:
       dataSources:
       ^
   No single argument constructor found for interface org.apache.shardingsphere.infra.yaml.config.pojo.rule.YamlRuleConfiguration
    in 'reader', line 23, column 3:
         broadcastTables: t_alarm_domain  ... 
         ^
   
   	at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:185)
   	at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:650)
   	... 109 common frames omitted
   Caused by: org.yaml.snakeyaml.constructor.ConstructorException: Cannot create property=rules for JavaBean=org.apache.shardingsphere.infra.yaml.config.pojo.YamlRootConfiguration@58a5b69c
    in 'reader', line 2, column 1:
       dataSources:
       ^
   No single argument constructor found for interface org.apache.shardingsphere.infra.yaml.config.pojo.rule.YamlRuleConfiguration
    in 'reader', line 23, column 3:
         broadcastTables: t_alarm_domain  ... 
         ^
   
   	at org.yaml.snakeyaml.constructor.Constructor$ConstructMapping.constructJavaBean2ndStep(Constructor.java:321)
   	at org.yaml.snakeyaml.constructor.Constructor$ConstructMapping.construct(Constructor.java:207)
   	at org.yaml.snakeyaml.constructor.Constructor$ConstructYamlObject.construct(Constructor.java:358)
   	at org.yaml.snakeyaml.constructor.BaseConstructor.constructObjectNoCheck(BaseConstructor.java:270)
   	at org.yaml.snakeyaml.constructor.BaseConstructor.constructObject(BaseConstructor.java:253)
   	at org.yaml.snakeyaml.constructor.BaseConstructor.constructDocument(BaseConstructor.java:207)
   	at org.yaml.snakeyaml.constructor.BaseConstructor.getSingleData(BaseConstructor.java:191)
   	at org.yaml.snakeyaml.Yaml.loadFromReader(Yaml.java:477)
   	at org.yaml.snakeyaml.Yaml.loadAs(Yaml.java:443)
   	at org.apache.shardingsphere.infra.util.yaml.YamlEngine.unmarshal(YamlEngine.java:55)
   	at org.apache.shardingsphere.driver.api.yaml.YamlShardingSphereDataSourceFactory.createDataSource(YamlShardingSphereDataSourceFactory.java:61)
   	at cn.com.asoco.alarm_platform.server.sharding.ShardingSphereConfig.shardingSphereDatasource(ShardingSphereConfig.java:26)
   	at cn.com.asoco.alarm_platform.server.sharding.ShardingSphereConfig$$EnhancerBySpringCGLIB$$23edcc1.CGLIB$shardingSphereDatasource$0(<generated>)
   	at cn.com.asoco.alarm_platform.server.sharding.ShardingSphereConfig$$EnhancerBySpringCGLIB$$23edcc1$$FastClassBySpringCGLIB$$c41430c2.invoke(<generated>)
   	at org.springframework.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:244)
   	at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:331)
   	at cn.com.asoco.alarm_platform.server.sharding.ShardingSphereConfig$$EnhancerBySpringCGLIB$$23edcc1.shardingSphereDatasource(<generated>)
   	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
   	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
   	at java.lang.reflect.Method.invoke(Method.java:498)
   	at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:154)
   	... 110 common frames omitted
   Caused by: org.yaml.snakeyaml.error.YAMLException: No single argument constructor found for interface org.apache.shardingsphere.infra.yaml.config.pojo.rule.YamlRuleConfiguration
   	at org.yaml.snakeyaml.constructor.Constructor$ConstructScalar.construct(Constructor.java:417)
   	at org.yaml.snakeyaml.constructor.BaseConstructor.constructObjectNoCheck(BaseConstructor.java:270)
   	at org.yaml.snakeyaml.constructor.BaseConstructor.constructObject(BaseConstructor.java:253)
   	at org.yaml.snakeyaml.constructor.SafeConstructor.processDuplicateKeys(SafeConstructor.java:108)
   	at org.yaml.snakeyaml.constructor.SafeConstructor.flattenMapping(SafeConstructor.java:81)
   	at org.yaml.snakeyaml.constructor.SafeConstructor.flattenMapping(SafeConstructor.java:76)
   	at org.yaml.snakeyaml.constructor.SafeConstructor.constructSet2ndStep(SafeConstructor.java:218)
   	at org.yaml.snakeyaml.constructor.BaseConstructor.constructSet(BaseConstructor.java:545)
   	at org.yaml.snakeyaml.constructor.Constructor$ConstructMapping.construct(Constructor.java:199)
   	at org.yaml.snakeyaml.constructor.BaseConstructor.constructObjectNoCheck(BaseConstructor.java:270)
   	at org.yaml.snakeyaml.constructor.BaseConstructor.constructObject(BaseConstructor.java:253)
   	at org.yaml.snakeyaml.constructor.Constructor$ConstructMapping.newInstance(Constructor.java:333)
   	at org.yaml.snakeyaml.constructor.Constructor$ConstructMapping.constructJavaBean2ndStep(Constructor.java:298)
   	... 131 common frames omitted
   ```
   I had upgrade snakeyml to 1.33...
   I don't know what I did wrong...
   
   Thank you for help so much!


-- 
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: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [shardingsphere] pengxianggui commented on issue #23131: org.apache.shardingsphere.sql.parser.exception.SQLParsingException: You have an error in your SQL syntax

Posted by GitBox <gi...@apache.org>.
pengxianggui commented on issue #23131:
URL: https://github.com/apache/shardingsphere/issues/23131#issuecomment-1366431329

   > Duplicate with #21233.
   
   I am grateful beyond words!


-- 
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: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [shardingsphere] TeslaCN commented on issue #23131: org.apache.shardingsphere.sql.parser.exception.SQLParsingException: You have an error in your SQL syntax

Posted by GitBox <gi...@apache.org>.
TeslaCN commented on issue #23131:
URL: https://github.com/apache/shardingsphere/issues/23131#issuecomment-1366575668

   @pengxianggui 
   Please open a new issue for different questions, thanks.


-- 
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: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [shardingsphere] pengxianggui commented on issue #23131: org.apache.shardingsphere.sql.parser.exception.SQLParsingException: You have an error in your SQL syntax

Posted by GitBox <gi...@apache.org>.
pengxianggui commented on issue #23131:
URL: https://github.com/apache/shardingsphere/issues/23131#issuecomment-1366579399

   
   > @pengxianggui Please open a new issue for different questions, thanks.
   
   Fine


-- 
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: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [shardingsphere] TeslaCN commented on issue #23131: org.apache.shardingsphere.sql.parser.exception.SQLParsingException: You have an error in your SQL syntax

Posted by GitBox <gi...@apache.org>.
TeslaCN commented on issue #23131:
URL: https://github.com/apache/shardingsphere/issues/23131#issuecomment-1366428104

   Hi @pengxianggui 
   Please try the ShardingSphere 5.3.0. MySQL Json support has been enhanced. https://github.com/apache/shardingsphere/pull/20709


-- 
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: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [shardingsphere] TeslaCN closed issue #23131: org.apache.shardingsphere.sql.parser.exception.SQLParsingException: You have an error in your SQL syntax

Posted by GitBox <gi...@apache.org>.
TeslaCN closed issue #23131: org.apache.shardingsphere.sql.parser.exception.SQLParsingException: You have an error in your SQL syntax
URL: https://github.com/apache/shardingsphere/issues/23131


-- 
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: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [shardingsphere] pengxianggui closed issue #23131: org.apache.shardingsphere.sql.parser.exception.SQLParsingException: You have an error in your SQL syntax

Posted by GitBox <gi...@apache.org>.
pengxianggui closed issue #23131: org.apache.shardingsphere.sql.parser.exception.SQLParsingException: You have an error in your SQL syntax
URL: https://github.com/apache/shardingsphere/issues/23131


-- 
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: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [shardingsphere] TeslaCN commented on issue #23131: org.apache.shardingsphere.sql.parser.exception.SQLParsingException: You have an error in your SQL syntax

Posted by GitBox <gi...@apache.org>.
TeslaCN commented on issue #23131:
URL: https://github.com/apache/shardingsphere/issues/23131#issuecomment-1366444993

   Spring Boot starter has been deprecated and removed since 5.3.0. There is a more simple way to integrate ShardingSphere with Spring Boot. You may refer to: https://shardingsphere.apache.org/document/current/en/user-manual/shardingsphere-jdbc/yaml-config/jdbc-driver/spring-boot/


-- 
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: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [shardingsphere] TeslaCN commented on issue #23131: org.apache.shardingsphere.sql.parser.exception.SQLParsingException: You have an error in your SQL syntax

Posted by GitBox <gi...@apache.org>.
TeslaCN commented on issue #23131:
URL: https://github.com/apache/shardingsphere/issues/23131#issuecomment-1369417910

   
   > > Spring Boot starter has been deprecated and removed since 5.3.0. There is a more simple way to integrate ShardingSphere with Spring Boot. You may refer to: https://shardingsphere.apache.org/document/current/en/user-manual/shardingsphere-jdbc/yaml-config/jdbc-driver/spring-boot/
   > 
   > @TeslaCN Hi, Ask a little more please, This way of integrating springboot makes it difficult to overwrite environment variables. For example:
   > 
   > ```
   > spring:
   >   datasource:
   >     url: jdbc:shardingsphere:classpath:application-sharding.yml
   >     driver-class-name: org.apache.shardingsphere.driver.ShardingSphereDriver
   > ```
   > 
   > application-sharding.yml:
   > 
   > ```
   > dataSources:
   >   db0: # 单数据库节点无意义,当存在多个时用于区分
   >     dataSourceClassName: com.zaxxer.hikari.HikariDataSource # 数据库连接池全类名
   >     driverClassName: com.mysql.cj.jdbc.Driver
   >     jdbcUrl: jdbc:mysql://${spring.datasource.host}:${spring.datasource.port}/${spring.datasource.schema-name:asoco_alarm_platform}?${spring.datasource.suffix} # 拼接的连接url, 无需变动
   >     username: ${spring.datasource.username}
   >     password: ${spring.datasource.password}
   > ```
   > 
   > How these variables are overridden by environment variables is a big problem?
   
   Hi @pengxianggui, please file a new issue for new questions.


-- 
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: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org