This is an automated email from the ASF dual-hosted git repository. gongchao pushed a commit to branch bugfix-collector in repository https://gitbox.apache.org/repos/asf/hertzbeat.git
commit 0677ce16c18083f2f32e9f6a174a4e4e0270ddaf Author: tomsun28 <[email protected]> AuthorDate: Tue May 7 14:40:02 2024 +0800 bugfix collector startup error can not find JdbcClient Signed-off-by: tomsun28 <[email protected]> --- collector/pom.xml | 1 - collector/src/main/resources/application.yml | 2 +- .../apache/hertzbeat/common/config/EclipseLinkJpaConfiguration.java | 4 ++-- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/collector/pom.xml b/collector/pom.xml index d06d51212..34f129a13 100644 --- a/collector/pom.xml +++ b/collector/pom.xml @@ -63,7 +63,6 @@ <dependency> <groupId>org.springframework</groupId> <artifactId>spring-jdbc</artifactId> - <version>5.3.23</version> </dependency> <!-- kafka --> <dependency> diff --git a/collector/src/main/resources/application.yml b/collector/src/main/resources/application.yml index 046b93240..606509c3c 100644 --- a/collector/src/main/resources/application.yml +++ b/collector/src/main/resources/application.yml @@ -29,7 +29,7 @@ spring: default-property-inclusion: ALWAYS # need to disable spring boot mongodb auto config, or default mongodb connection tried and failed... autoconfigure: - exclude: org.springframework.boot.autoconfigure.mongo.MongoAutoConfiguration, org.springframework.boot.autoconfigure.data.mongo.MongoDataAutoConfiguration + exclude: org.springframework.boot.autoconfigure.mongo.MongoAutoConfiguration, org.springframework.boot.autoconfigure.data.mongo.MongoDataAutoConfiguration, org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration, org.springframework.boot.autoconfigure.orm.jpa.HibernateJpaAutoConfiguration --- spring: diff --git a/common/src/main/java/org/apache/hertzbeat/common/config/EclipseLinkJpaConfiguration.java b/common/src/main/java/org/apache/hertzbeat/common/config/EclipseLinkJpaConfiguration.java index 3870b861b..c4a7bc5c6 100644 --- a/common/src/main/java/org/apache/hertzbeat/common/config/EclipseLinkJpaConfiguration.java +++ b/common/src/main/java/org/apache/hertzbeat/common/config/EclipseLinkJpaConfiguration.java @@ -24,7 +24,7 @@ import java.util.Map; import javax.sql.DataSource; import org.eclipse.persistence.config.PersistenceUnitProperties; import org.springframework.beans.factory.ObjectProvider; -import org.springframework.boot.autoconfigure.EnableAutoConfiguration; +import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; import org.springframework.boot.autoconfigure.orm.jpa.JpaBaseConfiguration; import org.springframework.boot.autoconfigure.orm.jpa.JpaProperties; import org.springframework.context.annotation.Configuration; @@ -36,7 +36,7 @@ import org.springframework.transaction.jta.JtaTransactionManager; * jpa eclipselink impl config */ @Configuration -@EnableAutoConfiguration +@ConditionalOnProperty(prefix = "spring.datasource", name = "url") public class EclipseLinkJpaConfiguration extends JpaBaseConfiguration { protected EclipseLinkJpaConfiguration(DataSource dataSource, JpaProperties properties, --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
