jaychoww opened a new issue, #2401:
URL: https://github.com/apache/shardingsphere-elasticjob/issues/2401

   ## Bug Report
   
   **For English only**, other languages will not accept.
   
   Before report a bug, make sure you have:
   
   - Searched open and closed [GitHub 
issues](https://github.com/apache/shardingsphere-elasticjob/issues).
   - Read documentation: [ElasticJob 
Doc](https://shardingsphere.apache.org/elasticjob/current/en/overview/).
   
   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?
   ElasticJob Lite 3.0.4
   
   ### Expected behavior
   Should work correctly with springboot 3.2.x
   
   ### Actual behavior
   It works with springboot 3.1.x well, but throw an error after upgrade 
springboot to 3.2.x:
   ```
   2024-07-15T16:25:15.215+08:00 ERROR 33029 --- [testElasticJob@spb3] [        
   main] o.s.b.d.LoggingFailureAnalysisReporter   : 
   
   ***************************
   APPLICATION FAILED TO START
   ***************************
   
   Description:
   
   Parameter 0 of method tracingConfiguration in 
org.apache.shardingsphere.elasticjob.lite.spring.boot.tracing.ElasticJobTracingConfiguration$RDBTracingConfiguration
 required a single bean, but 2 were found:
        - dataSource: defined by method 'dataSource' in class path resource 
[org/springframework/boot/autoconfigure/jdbc/DataSourceConfiguration$Hikari.class]
        - tracingDataSource: defined by method 'tracingDataSource' in class 
path resource 
[org/apache/shardingsphere/elasticjob/lite/spring/boot/tracing/ElasticJobTracingConfiguration$RDBTracingConfiguration.class]
   
   ```
   
   
   ### Reason analyze (If you can)
   
   ### Steps to reproduce the behavior.
   * create a new project with springboot 3.1.x and elasticjob-lite 3.0.4
   * enable tracing:
   ```yaml
   spring:
     application:
       name: testElasticJob
     datasource:
       url: jdbc:postgresql://your_db
       username: postgres
       password: postgres
       driver-class-name: org.postgresql.Driver
   
   elasticjob:
     reg-center:
       server-lists: your_zookeeper:port
       namespace: dev.testservice
     jobs:
       job1:
         elasticJobClass: com.mycom.elasticjob_spb3.Job1
         cron: 0/10 * * * * ?
    
     tracing:
       type: RDB
   ``` 
   * create a class named Job1:
   ```java
   @Component
   public class Job1 implements SimpleJob {
       @Override
       public void execute(ShardingContext shardingContext) {
           System.out.println("*****************-============>>>>>>>>MyJob");
       }
   }
   
   ``` 
   * build.gradle
   ```kotlin
   plugins {
       id 'java'
       id 'org.springframework.boot' version '3.1.+'
       id 'io.spring.dependency-management' version '1.1.5'
   
   }
   
   group = 'com.mycom'
   version = '0.0.1-SNAPSHOT'
   
   java {
       toolchain {
           languageVersion = JavaLanguageVersion.of(17)
       }
   }
   
   configurations {
       compileOnly {
           extendsFrom annotationProcessor
       }
   }
   
   repositories {
       mavenCentral()
   }
   
   dependencies {
       implementation 'com.google.guava:guava:32.1.2-jre'
       implementation 'org.springframework.boot:spring-boot-starter-data-jdbc'
       implementation 'org.springframework.boot:spring-boot-starter-jdbc'
       implementation 'org.springframework.boot:spring-boot-starter-web'
       implementation 
('org.apache.shardingsphere.elasticjob:elasticjob-lite-spring-boot-starter:3.0.4')
       implementation "org.yaml:snakeyaml:2.2"
       compileOnly 'org.projectlombok:lombok'
       runtimeOnly 'org.postgresql:postgresql'
       annotationProcessor 'org.projectlombok:lombok'
       testImplementation 'org.springframework.boot:spring-boot-starter-test'
       testRuntimeOnly 'org.junit.platform:junit-platform-launcher'
   }
   
   tasks.named('test') {
       useJUnitPlatform()
   }
   
   ``` 
   It works, but when you bump up `org.springframework.boot`'s version to 
'3.2.+', it will throw the error. 
   ### Example codes for reproduce this issue (such as a github link).
   


-- 
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]

Reply via email to