<h2 dir="auto">Bug Report</h2>
<p dir="auto"><strong>For English only</strong>, other languages will not accept.</p>
<p dir="auto">Before report a bug, make sure you have:</p>
<ul dir="auto">
<li>Searched open and closed <a href="https://github.com/apache/shardingsphere/issues">GitHub issues</a>.</li>
<li>Read documentation: <a href="https://shardingsphere.apache.org/document/current/en/overview" rel="nofollow">ShardingSphere Doc</a>.</li>
</ul>
<p dir="auto">Please pay attention on issues you submitted, because we maybe need more details.<br>
If no response anymore and we cannot reproduce it on current information, we will <strong>close it</strong>.</p>
<p dir="auto">Please answer these questions before submitting your issue. Thanks!</p>
<h3 dir="auto">Which version of ShardingSphere did you use?</h3>
<p dir="auto">shardingsphere-jdbc-core-spring-boot-starter 5.1.2</p>
<h3 dir="auto">Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy?</h3>
<p dir="auto">ShardingSphere-JDBC</p>
<h3 dir="auto">Expected behavior</h3>
<p dir="auto">when use Druid to encript password,I use connec-properties,there are two method both named "setConnectProperties"<br>
<br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/24600271/199710434-73f6d186-cc3c-47e1-83c1-ae742a5e3151.png"><img src="https://user-images.githubusercontent.com/24600271/199710434-73f6d186-cc3c-47e1-83c1-ae742a5e3151.png" alt="image" style="max-width: 100%;"></a><br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/24600271/199711412-66adb988-d70e-4b6d-abd0-84ca59232853.png"><img src="https://user-images.githubusercontent.com/24600271/199711412-66adb988-d70e-4b6d-abd0-84ca59232853.png" alt="image" style="max-width: 100%;"></a></p>
<p dir="auto">so when yaml use string to config connecProperties,it will throw "java.lang.String can't cast to java.util.Map",i think setter method should check fieldName and type，not only fieldName, in <code class="notranslate">org.apache.shardingsphere.infra.datasource.pool.creator.DataSourceReflection</code><br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/24600271/199711183-9b66cf9b-cc2a-46b8-9c9e-5eec2212547e.png"><img src="https://user-images.githubusercontent.com/24600271/199711183-9b66cf9b-cc2a-46b8-9c9e-5eec2212547e.png" alt="image" style="max-width: 100%;"></a></p>
<h3 dir="auto">Actual behavior</h3>
<h3 dir="auto">Reason analyze (If you can)</h3>
<p dir="auto">org.apache.shardingsphere.infra.datasource.pool.creator.DataSourceReflection</p>
<h3 dir="auto">Steps to reproduce the behavior, such as: SQL to execute, sharding rule configuration, when exception occur etc.</h3>
<h3 dir="auto">Example codes for reproduce this issue (such as a github link).</h3>
<h2 dir="auto">Bug Report</h2>
<h3 dir="auto">Which version of ShardingSphere did you use?</h3>
<p dir="auto">v5.2.0</p>
<h3 dir="auto">Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy?</h3>
<p dir="auto">ShardingSphere-JDBC</p>
<h3 dir="auto">Steps to reproduce the behavior, such as: SQL to execute, sharding rule configuration, when exception occur etc.</h3>
<ol dir="auto">
<li>Create a druid datasource, and then add some filters.</li>
</ol>
<div class="highlight highlight-source-java notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="DruidDataSource druidDataSource = new DruidDataSource();
// ...
druidDataSource.setProxyFilters(buildFilters());"><pre class="notranslate"><span class="pl-smi">DruidDataSource</span> <span class="pl-s1">druidDataSource</span> = <span class="pl-k">new</span> <span class="pl-smi">DruidDataSource</span>();
<span class="pl-c">// ...</span>
<span class="pl-s1">druidDataSource</span>.<span class="pl-en">setProxyFilters</span>(<span class="pl-en">buildFilters</span>());</pre></div>
<ol start="2" dir="auto">
<li>Create a shardingsphere datasource by ShardingSphereDataSourceFactory</li>
<li>Exception occurs: Can't construct a java object for tag:yaml.org,2002:com.alibaba.druid.filter.stat.StatFilter; exception=Class is not accepted: com.alibaba.druid.filter.stat.StatFilter.</li>
</ol>
<h3 dir="auto">Example codes for reproduce this issue (such as a github link).</h3>
<p dir="auto"><a href="https://github.com/caol64/sharding-test">https://github.com/caol64/sharding-test</a></p>