feat(REQ-2616) - 完善 Starter 中的一些 Bean 定义

This commit is contained in:
wangli 2024-08-22 09:37:44 +08:00
parent 98bf53a173
commit 8b48aae2e8
2 changed files with 2 additions and 4 deletions

View File

@ -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) {

View File

@ -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"));