jukai5501 commented on issue #2866: encrypt not work in 4.0.0-RC2-SNAPSHOT version URL: https://github.com/apache/incubator-shardingsphere/issues/2866#issuecomment-521276956 Hi! I pulled the latest 4.0.0-RC2-SNAPSHOT version. The application can start normally, I was using your configuration, but the logs printed like this. ``` 2019-08-14 22:29:27.376 INFO 39486 --- [ main] o.a.s.core.util.ConfigurationLogger : EncryptRuleConfiguration encryptors: example_encrypt: props: aes.key.value: 123456 type: aes tables: user_auth: columns: credential: assistedQueryColumn: credential cipherColumn: credential encryptor: example_encrypt 2019-08-14 22:29:27.377 INFO 39486 --- [ main] o.a.s.core.util.ConfigurationLogger : Properties sql.show: ‘true' ``` Then there are not printing sharding configuration, but I configure them. So sharding does not work when i call the query or save interface. ``` 2019-08-14 22:30:47.712 INFO 39486 --- [ XNIO-1 task-1] ShardingSphere-SQL : SQL: insert into party (party_nickname, party_nickname_spelling, sex, birthday, personal_profile, status_cd, create_dt, update_dt, status_dt) values (?, ?, ?, ?, ?, ?, ?, ?, ?) 2019-08-14 22:30:47.798 ERROR 39486 --- [ XNIO-1 task-1] c.h.g.s.c.s.a.m.e.GlobalExceptionHandler : Internal exception: org.springframework.dao.DataIntegrityViolationException: ### Error updating database. Cause: java.sql.SQLException: Field 'party_id' doesn't have a default value ``` > 在 2019年8月14日,11:06,杨翊 Sion Yang <[email protected]> 写道: > > Are you using the latest 4.0.0-RC2-SNAPSHOT? > > I execute the configuration without exception: > > spring: > shardingsphere: > datasource: > names: ds > ds: > type: com.zaxxer.hikari.HikariDataSource > driver-class-name: com.mysql.jdbc.Driver > jdbc-url: jdbc:mysql://localhost:3306/demo_ds?useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&useSSL=false > username: root > password: > > sharding: > default-data-source-name: ds > tables: > party: > actual-data-nodes: ds.party_$->{0..1} > table-strategy: > inline: > sharding-column: party_id > algorithm-expression: party_$->{party_id % 2} > key-generator: > column: party_id > type: SNOWFLAKE > props: > worker.id: 1 > max.tolerate.time.difference.milliseconds: 100 > encrypt: > tables: > user_auth: > columns: > credential: > encryptor: example_encrypt > cipherColumn: credential > assistedQueryColumn: credential > encryptors: > example_encrypt: > type: aes > props: > 'aes.key.value': 123456 > > props: > sql.show: true > — > You are receiving this because you were mentioned. > Reply to this email directly, view it on GitHub <https://github.com/apache/incubator-shardingsphere/issues/2866?email_source=notifications&email_token=AF4QKPFF4RFSOD7T7CWW6O3QENZDXA5CNFSM4ILKET3KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD4HR6MY#issuecomment-521084723>, or mute the thread <https://github.com/notifications/unsubscribe-auth/AF4QKPEBEWB7VGPOWQ27GELQENZDXANCNFSM4ILKET3A>. >
---------------------------------------------------------------- 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] With regards, Apache Git Services
