package com.battery.business.runtime; import org.springframework.scheduling.annotation.Scheduled; import org.springframework.stereotype.Component; import com.battery.business.service.ITestDataReceptionService; /** * 按固定周期触发数据接收,由业务服务按测试接收状态和采样来源保存成功观测。 * *

它不限定 profile:真实来源的接收路径也必须在非开发 profile 下运行。 * 开发模拟器专属的调度(模拟器发现轮询、采集器状态同步)仍只在 dev-simulator 下额外启用。 */ @Component public class TestDataReceptionScheduler { private final ITestDataReceptionService reception; public TestDataReceptionScheduler(ITestDataReceptionService reception) { this.reception = reception; } @Scheduled(fixedDelay = 1000) public void capture() { reception.captureReceivedData(); } }