package com.huaheng.api.Weighing.service; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.scheduling.annotation.Async; import org.springframework.stereotype.Service; /** * @ClassName BusinessServiceImpl * @Description TODO * @Author Administrator * @Date 2020/12/216:32 */ @Service public class BusinessServiceImpl implements BusinessService { private static final Logger logger = LoggerFactory.getLogger(BusinessServiceImpl.class); @Override @Async("threadPoolTaskExecutor") public void udpHandleMethod(String message) throws InterruptedException { logger.info("业务开始处理"); Thread.sleep(3000); logger.info("业务处理完成"); } }