方便更快捷的说明问题,可以按需填写(可删除)
使用环境:
ShardingSphere 5.3.2
Apollo 1.9.2
场景、问题:
将如下配置项放在apollo中管理,namespace = ss-config
application.yml 增加配置如下
spring:
datasource:
url: jdbc:shardingsphere:apollo:ss-config
driver-class-name: org.apache.shardingsphere.driver.ShardingSphereDriver
ss-config.yaml 内容如下
dataSources:
ds_1:
dataSourceClassName: com.zaxxer.hikari.HikariDataSource
driverClassName: com.mysql.cj.jdbc.Driver
jdbcUrl: jdbc:mysql://mysql.hopson.com:3306/xxxxxxx?useUnicode=true&characterEncoding=utf8&tinyInt1isBit=false&serverTimezone=Asia/Shanghai&autoReconnect=true
username: xxxx
password: xxxxxx
rules:
- !ENCRYPT
tables:
account:
columns:
email:
logicColumn: email
plainColumn: email
cipherColumn: email_cipher
encryptorName: public_encryptor
mobile:
logicColumn: mobile
plainColumn: mobile
cipherColumn: mobile_cipher
encryptorName: public_encryptor
encryptors:
public_encryptor:
type: AES
props:
aes-key-value: 123456abc
已进行操作:
现状:
项目启动时报错,错误内容为
2023-06-02 17:35:13.845 - WARN [YamlConfigFile.java:69] yaml to properties failed, reason: Parse yaml file content failed for namespace: ss-config.yaml [Cause: could not determine a constructor for the tag !ENCRYPT
in ‘reader’, line 22, column 3:
- !ENCRYPT
^
]
请问这是由于什么原因造成