folochina commented on issue #1799:
URL:
https://github.com/apache/shardingsphere-elasticjob/issues/1799#issuecomment-919677200
> 您可以尝试注册一个 TracingConfiguration<DataSource> bean 来覆盖默认值,
`DruidDataSourceWrapper` 如下所示:
>
> ```
> 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);
> }
>
> }
> ```
>
> 和
>
> 在 `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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]