ElasticJob Spring Boot Starter has already integrated TracingConfiguration configuration. What developers need to do is register a bean of DataSource into the Spring IoC Container and set the type of data source. Then the Starter will create an instance of TracingConfiguration and register it into the container.
Import spring-boot-starter-jdbc for DataSource register or create a bean of DataSource manually.
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-jdbc</artifactId>
<version>${springboot.version}</version>
</dependency>
spring:
datasource:
url: jdbc:h2:mem:job_event_storage
driver-class-name: org.h2.Driver
username: sa
password:
elasticjob:
tracing:
type: RDB
TracingConfiguration will be registered into the IoC container imperceptibly after setting tracing type to RDB. If elasticjob-spring-boot-starter was imported, developers need to do nothing else. The instances of JobBootstrap will use the TracingConfiguration automatically.