wuwu20048 commented on issue #13057:
URL: 
https://github.com/apache/shardingsphere/issues/13057#issuecomment-944911189


   i found that  springboot encryption configuration works fine.  but the xml 
config i reported  above throw StringIndexOutOfBoundsException . can you check 
it ?
   
   eg:
   
   ```java
   public interface CustomerRepository extends CrudRepository<Customer, Long> {
       
       @Query(value = "SELECT u FROM Customer u, Person a WHERE u.id = a.id and 
a.name='aa' and u.firstName='c'")
       public List<Customer> findViewInfo();
   }
   ```
   ```
   spring.application.name=encrypt-demo
   
   spring.shardingsphere.datasource.names=ds
   spring.shardingsphere.datasource.ds.type=com.zaxxer.hikari.HikariDataSource
   spring.shardingsphere.datasource.ds.driver-class-name=com.mysql.jdbc.Driver
   
spring.shardingsphere.datasource.ds.jdbc-url=jdbc:mysql://localhost:3306/test?serverTimezone=UTC&useSSL=false&useUnicode=true&characterEncoding=UTF-8
   spring.shardingsphere.datasource.ds.username=root
   spring.shardingsphere.datasource.ds.password=
   
   spring.shardingsphere.rules.encrypt.encryptors.name-encryptor.type=AES
   
spring.shardingsphere.rules.encrypt.encryptors.name-encryptor.props.aes-key-value=1234567890123456
   
   spring.shardingsphere.rules.encrypt.query-with-cipher-column=false
   
   
spring.shardingsphere.rules.encrypt.tables.customer.columns.first_name.cipher-column=first_name_cipher
   
spring.shardingsphere.rules.encrypt.tables.customer.columns.first_name.plain-column=first_name
   
spring.shardingsphere.rules.encrypt.tables.customer.columns.first_name.encryptor-name=name-encryptor
   
   
   spring.shardingsphere.rules.encrypt.tables.person.name=personEncrypt
   
spring.shardingsphere.rules.encrypt.tables.person.columns.name.cipher-column=name_cipher
   
spring.shardingsphere.rules.encrypt.tables.person.columns.name.plain-column=name
   
spring.shardingsphere.rules.encrypt.tables.person.columns.name.encryptor-name=name-encryptor
   
   
   spring.shardingsphere.props.sql-show=true
   ```
   
   


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

To unsubscribe, e-mail: [email protected]

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


Reply via email to