package com.tzy.common.service.impl;

import com.tzy.common.service.CommonAsyncService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Service;

@Service
@Slf4j
public class CommonAsyncServiceImpl implements CommonAsyncService {

	@Override
	@Async
	public void test(long time) {
		try {
			Thread.sleep(time);
			log.info("线程:{}",Thread.currentThread().getName());
		} catch (InterruptedException e) {
			e.printStackTrace();
		}
	}
}
