package com.simulationservice.service; import org.springframework.scheduling.annotation.Async; import org.springframework.stereotype.Service; /** * 推演任务服务,用于创建线程和管理 */ @Service public class InferenceTaskService { @Async public boolean loadScenario(String roomId, String scenarioId) { return true; } @Async public void executeTask() { // 启动我们的任务 //new MyTask().run(); } }