You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by zh...@apache.org on 2020/07/08 05:24:01 UTC
[shardingsphere-elasticjob-lite] branch master updated: Fix the
demo which doesn't work properly. (#981)
This is an automated email from the ASF dual-hosted git repository.
zhangliang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/shardingsphere-elasticjob-lite.git
The following commit(s) were added to refs/heads/master by this push:
new 7ac8032 Fix the demo which doesn't work properly. (#981)
7ac8032 is described below
commit 7ac80322cbb316065e48a170da0ef25e2d815bb2
Author: 吴伟杰 <ro...@me.com>
AuthorDate: Wed Jul 8 13:23:54 2020 +0800
Fix the demo which doesn't work properly. (#981)
* Fix the demo which doesn't work properly.
* Correct Spring version
* Exclude HikariCP from Quartz
* Replace @Resource with @Autowired
* Specific correct bean name on @Resource.
---
.../elastic-job-example-lite-springboot/pom.xml | 26 ++++++++++++++--------
.../lite/example/config/DataflowJobConfig.java | 4 ++--
.../lite/example/config/SimpleJobConfig.java | 2 +-
3 files changed, 20 insertions(+), 12 deletions(-)
diff --git a/examples/elastic-job-example-lite-springboot/pom.xml b/examples/elastic-job-example-lite-springboot/pom.xml
index 70a1c31..b6a94e9 100644
--- a/examples/elastic-job-example-lite-springboot/pom.xml
+++ b/examples/elastic-job-example-lite-springboot/pom.xml
@@ -31,13 +31,30 @@
<properties>
<springboot.version>2.3.1.RELEASE</springboot.version>
+ <spring.version>5.2.7.RELEASE</spring.version>
</properties>
+ <dependencyManagement>
+ <dependencies>
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-context</artifactId>
+ <version>${spring.version}</version>
+ </dependency>
+ </dependencies>
+ </dependencyManagement>
+
<dependencies>
<dependency>
<groupId>org.apache.shardingsphere.elasticjob</groupId>
<artifactId>elastic-job-example-jobs</artifactId>
<version>${project.parent.version}</version>
+ <exclusions>
+ <exclusion>
+ <groupId>com.zaxxer</groupId>
+ <artifactId>*</artifactId>
+ </exclusion>
+ </exclusions>
</dependency>
<dependency>
<groupId>org.apache.shardingsphere.elasticjob</groupId>
@@ -46,15 +63,6 @@
</dependency>
<dependency>
- <groupId>org.apache.shardingsphere.elasticjob</groupId>
- <artifactId>elastic-job-lite-core</artifactId>
- </dependency>
- <dependency>
- <groupId>org.apache.shardingsphere.elasticjob</groupId>
- <artifactId>elastic-job-lite-spring</artifactId>
- </dependency>
-
- <dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
<version>${springboot.version}</version>
diff --git a/examples/elastic-job-example-lite-springboot/src/main/java/org/apache/shardingsphere/elasticjob/lite/example/config/DataflowJobConfig.java b/examples/elastic-job-example-lite-springboot/src/main/java/org/apache/shardingsphere/elasticjob/lite/example/config/DataflowJobConfig.java
index 791cc3c..a11a1ae 100644
--- a/examples/elastic-job-example-lite-springboot/src/main/java/org/apache/shardingsphere/elasticjob/lite/example/config/DataflowJobConfig.java
+++ b/examples/elastic-job-example-lite-springboot/src/main/java/org/apache/shardingsphere/elasticjob/lite/example/config/DataflowJobConfig.java
@@ -35,8 +35,8 @@ public class DataflowJobConfig {
@Resource
private ZookeeperRegistryCenter regCenter;
-
- @Resource
+
+ @Resource(name = "tracingConfiguration")
private TracingConfiguration tracingConfig;
@Bean
diff --git a/examples/elastic-job-example-lite-springboot/src/main/java/org/apache/shardingsphere/elasticjob/lite/example/config/SimpleJobConfig.java b/examples/elastic-job-example-lite-springboot/src/main/java/org/apache/shardingsphere/elasticjob/lite/example/config/SimpleJobConfig.java
index fb49b98..2a164dc 100644
--- a/examples/elastic-job-example-lite-springboot/src/main/java/org/apache/shardingsphere/elasticjob/lite/example/config/SimpleJobConfig.java
+++ b/examples/elastic-job-example-lite-springboot/src/main/java/org/apache/shardingsphere/elasticjob/lite/example/config/SimpleJobConfig.java
@@ -35,7 +35,7 @@ public class SimpleJobConfig {
@Resource
private ZookeeperRegistryCenter regCenter;
- @Resource
+ @Resource(name = "tracingConfiguration")
private TracingConfiguration tracingConfig;
@Bean