feat(REQ-2616) - 完善 Starter 中的一些 Bean 定义
This commit is contained in:
parent
98bf53a173
commit
8b48aae2e8
@ -2,7 +2,6 @@ package cn.axzo.workflow.client.config;
|
||||
|
||||
import feign.RequestInterceptor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.cloud.openfeign.EnableFeignClients;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.core.env.Environment;
|
||||
@ -43,7 +42,7 @@ public class WorkflowEngineClientAutoConfiguration {
|
||||
private static final Pattern POM_VERSION = Pattern.compile("<parent>.*<version>(\\S+)</version>.*</parent>",
|
||||
Pattern.DOTALL);
|
||||
|
||||
@Bean
|
||||
@Bean("serviceVersion")
|
||||
public String serviceVersion() {
|
||||
Map<String, String> env = System.getenv();
|
||||
if (env != null) {
|
||||
|
||||
@ -31,7 +31,6 @@ import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
import java.util.Objects;
|
||||
|
||||
//import static cn.axzo.framework.web.filter.BasicRecordExceptionFilter.MICRO_SERVER_RECORD_ERROR_GET_PARAM_NAME;
|
||||
import static cn.axzo.workflow.client.config.WorkflowRequestInterceptor.HEADER_API_VERSION;
|
||||
import static cn.axzo.workflow.client.config.WorkflowRequestInterceptor.HEADER_HTTP_CLIENT;
|
||||
import static cn.axzo.workflow.client.config.WorkflowRequestInterceptor.HEADER_HTTP_CLIENT_VALUE;
|
||||
@ -69,7 +68,7 @@ public class WorkflowEngineStarterFeignConfiguration {
|
||||
@Bean
|
||||
public RequestInterceptor workflowEngineStarterRequestInterceptor(WorkflowEngineStarterProperties starterProperties,
|
||||
Environment environment,
|
||||
String serviceVersion) {
|
||||
@Qualifier("serviceVersion") String serviceVersion) {
|
||||
return template -> {
|
||||
// 接入应用上报
|
||||
template.header(HEADER_SERVER_NAME, environment.getProperty("spring.application.name"));
|
||||
|
||||
Loading…
Reference in New Issue
Block a user