|
@@ -1,20 +1,24 @@
|
|
|
package com.sf.controller;
|
|
|
|
|
|
import com.sf.dto.UserDto;
|
|
|
+import lombok.SneakyThrows;
|
|
|
import org.springframework.web.bind.annotation.GetMapping;
|
|
|
import org.springframework.web.bind.annotation.PathVariable;
|
|
|
import org.springframework.web.bind.annotation.RequestParam;
|
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
|
|
|
|
import java.util.Random;
|
|
|
+import java.util.concurrent.TimeUnit;
|
|
|
|
|
|
@RestController
|
|
|
public class HelloController {
|
|
|
|
|
|
// http://localhost:8070/echo/helloProvider
|
|
|
+ @SneakyThrows
|
|
|
@GetMapping("/echo/{string}")
|
|
|
public String echo(@PathVariable("string") String string) {
|
|
|
System.out.println("echo:" + string);
|
|
|
+ TimeUnit.SECONDS.sleep(1);
|
|
|
return "echo:" + string;
|
|
|
}
|
|
|
|