Skip to content

Commit

Permalink
fix: Tracing is incompatible with Spring Boot 3.2.x #2401 (#2405)
Browse files Browse the repository at this point in the history
* fix: Tracing is incompatible with Spring Boot 3.2.x #2401

* chore: pass the code formatting validation

---------

Co-authored-by: Jay Chow <[email protected]>
  • Loading branch information
jaychoww and jaychoww authored Jul 28, 2024
1 parent fb9231a commit a3e96a6
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
import com.zaxxer.hikari.HikariDataSource;
import org.apache.shardingsphere.elasticjob.kernel.tracing.config.TracingConfiguration;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.boot.autoconfigure.jdbc.DataSourceProperties;
Expand Down Expand Up @@ -68,7 +69,8 @@ public DataSource tracingDataSource(final TracingProperties tracingProperties) {
*/
@Bean
@ConditionalOnBean(DataSource.class)
public TracingConfiguration<DataSource> tracingConfiguration(final DataSource dataSource, @Nullable final DataSource tracingDataSource) {
public TracingConfiguration<DataSource> tracingConfiguration(@Qualifier("dataSource") final DataSource dataSource,
@Qualifier("tracingDataSource") @Nullable final DataSource tracingDataSource) {
return new TracingConfiguration<>("RDB", null == tracingDataSource ? dataSource : tracingDataSource);
}
}
Expand Down

0 comments on commit a3e96a6

Please sign in to comment.