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/05/21 09:30:59 UTC
[GitHub] [shardingsphere-elasticjob] skaic edited a comment on issue #1799: NoSuchMethodException: com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceWrapper.()
skaic edited a comment on issue #1799:
URL: https://github.com/apache/shardingsphere-elasticjob/issues/1799#issuecomment-845819552
you can try register a bean of TracingConfiguration\<DataSource\> to cover default `DruidDataSourceWrapper` like this:
```
import org.apache.commons.dbcp2.BasicDataSource;
@Setter
@Configuration
@ConfigurationProperties(prefix = "elasticjob.tracing.datasource")
public class ElasticJobTracingConfiguration {
private String driverClassName;
private String url;
private String username;
private String password;
@Bean
public TracingConfiguration<DataSource> myTracingConfiguration() {
BasicDataSource dataSource = new BasicDataSource();
dataSource.setDriverClassName(driverClassName);
dataSource.setUrl(url);
dataSource.setUsername(username);
dataSource.setPassword(password);
return new TracingConfiguration<>("RDB", dataSource);
}
}
```
and
in `application.yml`
```
elasticjob:
tracing:
datasource:
driverClassName: com.mysql.jdbc.Driver
url: jdbc:mysql://xxxx/databases?useUnicode=true&characterEncoding=UTF-8&useSSL=false
username: root
password: xxxx
```
--
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org