fix: Spring 多构造器类显式 @Autowired 标注 + V95 迁移兼容 MySQL 8.4
Build Backend JAR / build (push) Has been cancelled

- CapacityPlanService / ExternalCallMetricsRecorder / ZiniaoClientImpl:
  双构造器(生产 + 测试入口)导致 Spring 6 不自动推断构造器注入,
  启动报 'No default constructor found';生产构造器显式加 @Autowired
- V95:shop_key 列 V85 建表时已有,原 ADD COLUMN shop_key 会报
  duplicate column;MySQL 8.4 不支持 ADD COLUMN IF NOT EXISTS,改
  information_schema 动态 SQL;shop_key 缩到 VARCHAR(255) 以容纳
  (shop_key, business_date) 唯一键(1000 在 utf8mb4 下超 3072 字节
  索引上限);删除多余行改为单表 DELETE
This commit is contained in:
2026-08-31 01:09:19 +08:00
parent 19ddfb9c5a
commit 483374744a
4 changed files with 56 additions and 8 deletions
@@ -4,6 +4,7 @@ import io.micrometer.core.instrument.DistributionSummary;
import io.micrometer.core.instrument.MeterRegistry;
import io.micrometer.core.instrument.Timer;
import org.springframework.beans.factory.ObjectProvider;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.client.ClientHttpRequestInterceptor;
import org.springframework.http.client.ClientHttpResponse;
import org.springframework.stereotype.Component;
@@ -28,6 +29,8 @@ public class ExternalCallMetricsRecorder {
private final ObjectProvider<MeterRegistry> meterRegistryProvider;
/** 生产构造:测试用 MeterRegistry 构造器存在,Spring 不会自动推断,必须显式 @Autowired。 */
@Autowired
public ExternalCallMetricsRecorder(ObjectProvider<MeterRegistry> meterRegistryProvider) {
this.meterRegistryProvider = meterRegistryProvider;
}