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 2021/06/29 09:28:25 UTC

[GitHub] [shardingsphere] joeywang310 opened a new issue #11056: 5.0.0-beta version read config sharding-algorithms.xxx.props fail

joeywang310 opened a new issue #11056:
URL: https://github.com/apache/shardingsphere/issues/11056


   **my yaml config** 
   `
   sharding:
           sharding-algorithms:
             database_inline:
               props:
                 algorithm-expression: ds_${user_id % 2}
               type: INLINE
             table_inline:
               props:
                 algorithm-expression: t_order_${order_id % 2}
               type: INLINE
             balance_trade_record_db_class_based:
               props:
                 strategy: COMPLEX
                 algorithm_class_name: com.ypshengxian.account.server.infrastructure.config.shardingjdbc.BalanceDatabaseShardingAlgorithm
               type: CLASS_BASED
             balance_trade_record_table_class_based:
               type: CLASS_BASED
               props:
                 strategy: COMPLEX
                 algorithm_class_name: com.ypshengxian.account.server.infrastructure.config.shardingjdbc.BalanceTableShardingAlgorithm
   `
   **source code**
   ![image](https://user-images.githubusercontent.com/20478130/123772947-d7475080-d8fe-11eb-87fc-94cb44a5de82.png)
   
   **debug img**
   
   ![image](https://user-images.githubusercontent.com/20478130/123773159-0a89df80-d8ff-11eb-8776-c3da01d1da0a.png)
   
   As you can see from the picture, spring Environment is configured,
   `
   String propsPrefix = String.join("", prefix, each, ".props");
   boolean existProps = PropertyUtil.containPropertyPrefix(this.environment, propsPrefix);
   `
   existProps return **false**


-- 
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] joeywang310 commented on issue #11056: 5.0.0-beta version read config sharding-algorithms.xxx.props fail

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


   config error ,yaml user  '-' , not '_'


-- 
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] joeywang310 closed issue #11056: 5.0.0-beta version read config sharding-algorithms.xxx.props fail

Posted by GitBox <gi...@apache.org>.
joeywang310 closed issue #11056:
URL: https://github.com/apache/shardingsphere/issues/11056


   


-- 
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] joeywang310 commented on issue #11056: 5.0.0-beta version read config sharding-algorithms.xxx.props fail

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


   config error ,yaml user  '-' , not '_'


-- 
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] joeywang310 closed issue #11056: 5.0.0-beta version read config sharding-algorithms.xxx.props fail

Posted by GitBox <gi...@apache.org>.
joeywang310 closed issue #11056:
URL: https://github.com/apache/shardingsphere/issues/11056


   


-- 
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