模拟异步调用
import com.springdemo2.service.helloService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.concurrent.Callable;
@RestController
public class HelloController2 {
private static final Logger logger = LoggerFactory.getLogger(HelloController.class);
@Autowired
private helloService hello;
@GetMapping