diff --git a/jhinno-openapi-java-sdk/pom.xml b/jhinno-openapi-java-sdk/pom.xml
index 0b99fd5..6cdda21 100644
--- a/jhinno-openapi-java-sdk/pom.xml
+++ b/jhinno-openapi-java-sdk/pom.xml
@@ -5,7 +5,7 @@
4.0.0
jhinno-openapi-java-sdk
- 2.0.2
+ 2.0.0
jar
Jhinno OpenAPI SDK for Java
The Jhinno OpenAPI SDK for Java used for accessing Jhinno OpenApi Service
@@ -14,7 +14,7 @@
com.jhinno
jhinno-openapi-java-sdk-parent
- 1.0.2
+ 2.0.0
diff --git a/jhinno-openapi-sdk-spring-boot-starter/pom.xml b/jhinno-openapi-sdk-spring-boot-starter/pom.xml
index 7bde04f..697a9c5 100644
--- a/jhinno-openapi-sdk-spring-boot-starter/pom.xml
+++ b/jhinno-openapi-sdk-spring-boot-starter/pom.xml
@@ -5,7 +5,7 @@
4.0.0
jhinno-openapi-sdk-spring-boot-starter
- 1.0.2
+ 2.0.0
jar
Jhinno OpenAPI SDK for Java SpringBoot Starter
The Jhinno OpenAPI SDK for Java used for accessing Jhinno OpenApi Service
@@ -14,7 +14,7 @@
com.jhinno
jhinno-openapi-java-sdk-parent
- 2.0.2
+ 2.0.0
@@ -22,7 +22,7 @@
com.jhinno
jhinno-openapi-java-sdk
- 2.0.2
+ 2.0.0
diff --git a/jhinno-openapi-sdk-spring-boot-starter/src/main/java/com/jhinno/sdk/openapi/autoconfigure/JHOpenapiExecutionAutoconfigure.java b/jhinno-openapi-sdk-spring-boot-starter/src/main/java/com/jhinno/sdk/openapi/autoconfigure/JHOpenapiExecutionAutoconfigure.java
index 9768706..bf89188 100644
--- a/jhinno-openapi-sdk-spring-boot-starter/src/main/java/com/jhinno/sdk/openapi/autoconfigure/JHOpenapiExecutionAutoconfigure.java
+++ b/jhinno-openapi-sdk-spring-boot-starter/src/main/java/com/jhinno/sdk/openapi/autoconfigure/JHOpenapiExecutionAutoconfigure.java
@@ -12,9 +12,6 @@ import lombok.RequiredArgsConstructor;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
-import java.util.ArrayList;
-import java.util.List;
-
/**
* openapi执行器自动配置
*
@@ -29,25 +26,58 @@ public class JHOpenapiExecutionAutoconfigure {
private final JHOpenapiProperties properties;
private final JHApiClient client;
+
+ public void init(JHApiExecution apiExecution) {
+ apiExecution.setJhApiClient(client);
+ apiExecution.setForceGetToken(properties.isForceGetToken());
+ apiExecution.setAuthType(properties.getAuthType());
+ apiExecution.setAccessKey(properties.getAccessKey());
+ apiExecution.setAccessKeySecret(properties.getAccessKeySecret());
+ apiExecution.setTokenTimeout(properties.getTokenTimeout());
+ apiExecution.setTokenResidueTime(properties.getTokenResidueTime());
+ apiExecution.setUsedServerTime(properties.isUsedServerTime());
+ }
+
@Bean
- public List ApiExecution() {
- List executions = new ArrayList<>();
- executions.add(new JHAppApiExecution());
- executions.add(new JHDataApiExecution());
- executions.add(new JHFileApiExecution());
- executions.add(new JHJobApiExecution());
- executions.add(new JHDepartmentApiExecution());
- executions.add(new JHUserApiExecution());
- executions.forEach(t -> {
- t.setJhApiClient(client);
- t.setForceGetToken(properties.isForceGetToken());
- t.setAuthType(properties.getAuthType());
- t.setAccessKey(properties.getAccessKey());
- t.setAccessKeySecret(properties.getAccessKeySecret());
- t.setTokenTimeout(properties.getTokenTimeout());
- t.setTokenResidueTime(properties.getTokenResidueTime());
- t.setUsedServerTime(properties.isUsedServerTime());
- });
- return executions;
+ public JHAppApiExecution appApiExecution() {
+ JHAppApiExecution jhAppApiExecution = new JHAppApiExecution();
+ init(jhAppApiExecution);
+ return jhAppApiExecution;
+ }
+
+ @Bean
+ public JHDataApiExecution dataApiExecution() {
+ JHDataApiExecution dataApiExecution = new JHDataApiExecution();
+ init(dataApiExecution);
+ return dataApiExecution;
+ }
+
+
+ @Bean
+ public JHFileApiExecution fileApiExecution() {
+ JHFileApiExecution fileApiExecution = new JHFileApiExecution();
+ init(fileApiExecution);
+ return fileApiExecution;
+ }
+
+ @Bean
+ public JHJobApiExecution jobApiExecution() {
+ JHJobApiExecution jobApiExecution = new JHJobApiExecution();
+ init(jobApiExecution);
+ return jobApiExecution;
+ }
+
+ @Bean
+ public JHDepartmentApiExecution departmentApiExecution() {
+ JHDepartmentApiExecution departmentApiExecution = new JHDepartmentApiExecution();
+ init(departmentApiExecution);
+ return departmentApiExecution;
+ }
+
+ @Bean
+ public JHUserApiExecution userApiExecution() {
+ JHUserApiExecution userApiExecution = new JHUserApiExecution();
+ init(userApiExecution);
+ return userApiExecution;
}
}
diff --git a/pom.xml b/pom.xml
index 74664a5..4ac28a2 100644
--- a/pom.xml
+++ b/pom.xml
@@ -6,7 +6,7 @@
com.jhinno
jhinno-openapi-java-sdk-parent
- 2.0.2
+ 2.0.0
pom
Jhinno OpenAPI SDK for Java parent
The Jhinno OpenAPI SDK for Java used for accessing Jhinno OpenApi Service