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/11/12 03:05:40 UTC
[GitHub] [shardingsphere] ASCE1885 commented on issue #13554: If spring.shardingsphere.rules is not configured, ShardingSphereDataSource cannot be injected
ASCE1885 commented on issue #13554:
URL: https://github.com/apache/shardingsphere/issues/13554#issuecomment-966783056
> > i have same problem
>
> Can you provider your configuration?
I am using Spring Boot 2.1.1.RELEASE, `pom.xml`:
```xml
<dependency>
<groupId>org.apache.shardingsphere</groupId>
<artifactId>shardingsphere-jdbc-core-spring-boot-starter</artifactId>
<version>5.0.0</version>
</dependency>
```
`application.properties`:
```properties
spring.shardingsphere.datasource.names = master1
spring.shardingsphere.datasource.master1.jdbc-url = jdbc:mysql://30.99.88.33:3306/xxx
spring.shardingsphere.datasource.master1.type = com.zaxxer.hikari.HikariDataSource
spring.shardingsphere.datasource.master1.driver-class-name = com.mysql.jdbc.Driver
spring.shardingsphere.datasource.master1.username = asce
spring.shardingsphere.datasource.master1.password = xxx
spring.shardingsphere.datasource.master1.xxx = # 数据库连接池的其它属性
spring.shardingsphere.rules.encrypt.tables.t_user_a.columns.email.cipher-column=email
spring.shardingsphere.rules.encrypt.tables.t_user_a.columns.email.encryptor-name=encryptor_aes
spring.shardingsphere.rules.encrypt.encryptors.name-encryptor.type = AES
spring.shardingsphere.rules.encrypt.encryptors.name-encryptor.props.aes-key-value = xxxx
spring.shardingsphere.rules.encrypt.queryWithCipherColumn = true
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: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org