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/10 09:43:57 UTC

[GitHub] [shardingsphere-elasticjob] skaic commented on issue #1865: springboot2.x+ elasticjo3.0.0-RC1 +mybatis-dynamic3.3.0, can not work well with elasticjob.tracing.type=RDB

skaic commented on issue #1865:
URL: https://github.com/apache/shardingsphere-elasticjob/issues/1865#issuecomment-836478312


   you can register a bean of TracingConfiguration\<DataSource\> like this:
   
   ```
   @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 
   
   ```
   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