-
Notifications
You must be signed in to change notification settings - Fork 3.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
NoSuchMethodException: com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceWrapper.<init>() #1799
Comments
Hi @wenlincheng |
有解决吗? |
you can try register a bean of TracingConfiguration<DataSource> to cover default
and in
|
同样问题
|
尝试了这个方案,发现无效 |
hello, you can register a bean of TracingConfiguration to cover default DruidDataSourceWrapper @Bean
public TracingConfiguration<DataSource> tracingConfiguration(final DataSource dataSource) {
String className = "com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceWrapper";
if (dataSource.getClass().getName().equals(className)) {
DruidDataSource originDataSource = (DruidDataSource) dataSource;
DruidDataSource selfDatasource = new DruidDataSource();
// set you datasource config
selfDatasource.setDriver(originDataSource.getDriver());
selfDatasource.setUrl(originDataSource.getUrl());
selfDatasource.setUsername(originDataSource.getUsername());
selfDatasource.setPassword(originDataSource.getPassword());
return new TracingConfiguration<>(RDB, selfDatasource);
}
return new TracingConfiguration<>(RDB, dataSource);
} and do not have any config in |
更新版本到1.2.8 |
|
Bug Report
When init data source, the DruidDataSourceWrapper can not find the Init function.
version:
For English only, other languages will not accept.
Before report a bug, make sure you have:
Please pay attention on issues you submitted, because we maybe need more details.
If no response anymore and we cannot reproduce it on current information, we will close it.
Please answer these questions before submitting your issue. Thanks!
Which version of ElasticJob did you use?
Which project did you use? ElasticJob-Lite or ElasticJob-Cloud?
Expected behavior
Actual behavior
Reason analyze (If you can)
Steps to reproduce the behavior.
Example codes for reproduce this issue (such as a github link).
The text was updated successfully, but these errors were encountered: