Closed qq592304796 closed 10 months ago
大概什么样的配置会报错? 举个例子, 我去复现下啊
大概什么样的配置会报错? 举个例子, 我去复现下啊
在配置了spring.datasource.dynamic.datasource.master.druid.public-key的情况下。但是没有配置spring.datasource.dynamic.druid.connection-properties就会出现
spring:
datasource:
dynamic:
datasource:
master:
url: xxx
username: xx
password: xx
driver-class-name: com.mysql.cj.jdbc.Driver
druid:
public-key: xxx
---
# 防止空指针问题
spring:
datasource:
dynamic:
druid:
# noinspection SpringBootApplicationYaml
connection-properties: config.decrypt=true
4.3.0
Please fill it out carefully, or it will be closed. 请认真填写,不然会直接关闭。
Enviroment
JDK Version(required): 1.8
SpringBoot Version(required): 2.3.10.RELEASE
dynamic-datasource-spring-boot-starter Version(required):4.2.0
druid Version(optional):1.2.20
Describe what happened
config.getConnectionProperties()可能出现空指针问题
Expected Result: connectProperties赋值前,进行初始化
Actual Result:
If there is an exception,or aop invalid,please attach the exception trace:
Steps to reproduce
Step 1
Step 2
Step 3