nanzheng opened a new issue #10867:
URL: https://github.com/apache/shardingsphere/issues/10867


   ## Bug Report
   
   **For English only**, other languages will not accept.
   
   Before report a bug, make sure you have:
   
   - Searched open and closed [GitHub 
issues](https://github.com/apache/shardingsphere/issues).
   - Read documentation: [ShardingSphere 
Doc](https://shardingsphere.apache.org/document/current/en/overview).
   
   Please pay attention on issues you submitted, because we maybe need more 
details. 
   If no response anymore and we cannot reproduce it on current information, we 
will **close it**.
   
   Please answer these questions before submitting your issue. Thanks!
   
   ### Which version of ShardingSphere did you use?
   
   ### shardingsphere-encrypt-core 
   
   private byte[] createSecretKey() {
           Preconditions.checkArgument(props.containsKey(AES_KEY), 
String.format("%s can not be null.", AES_KEY));
           return Arrays.copyOf(DigestUtils.sha1(props.getProperty(AES_KEY)), 
16);
       }
   
   spring.shardingsphere.rules.encrypt.encryptors.name_encryptor.type=AES
   
spring.shardingsphere.rules.encrypt.encryptors.name_encryptor.props.aes-key-value=123456
   #spring.shardingsphere.encrypt.encryptors.pwd_encryptor.type=md5
   
   
spring.shardingsphere.rules.encrypt.tables.encrypt_user.columns.user_name.plain-column=user_name_plain
   
spring.shardingsphere.rules.encrypt.tables.encrypt_user.columns.user_name.cipher-column=user_name
   
spring.shardingsphere.rules.encrypt.tables.encrypt_user.columns.user_name.encryptor-name=name_encryptor
   
#spring.shardingsphere.encrypt.tables.encrypt_user.columns.pwd.cipherColumn=pwd
   
#spring.shardingsphere.encrypt.tables.encrypt_user.columns.pwd.encryptor=pwd_encryptor
   
   
   ### Expected behavior
   
    Preconditions.checkArgument(props.containsKey(AES_KEY), String.format("%s 
can not be null.", AES_KEY));
   this step will pass and return the true
   
   ### Actual behavior
   
    Preconditions.checkArgument(props.containsKey(AES_KEY), String.format("%s 
can not be null.", AES_KEY));
   this step props is empty and return the false
   
   ### Reason analyze (If you can)
   
   in version 4.0.0
   
   
   public abstract class TypeBasedSPIServiceLoader<T extends TypeBasedSPI> {
       private final Class<T> classType;
   
       public final T newService(String type, Properties props) {
           Collection<T> typeBasedServices = this.loadTypeBasedServices(type);
           if (typeBasedServices.isEmpty()) {
               throw new RuntimeException(String.format("Invalid `%s` SPI type 
`%s`.", this.classType.getName(), type));
           } else {
               T result = (TypeBasedSPI)typeBasedServices.iterator().next();
               result.setProperties(props);  //renew the Properties
               return result;
           }
       }
   
   but where is setProperties step  in 5.0.0 ?
   
   ### Steps to reproduce the behavior, such as: SQL to execute, sharding rule 
configuration, when exception occur etc.
   
   
   insert into sql 
   
   
   ### Example codes for reproduce this issue (such as a github link).
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

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


Reply via email to