Gateway配置文件
This commit is contained in:
@@ -3,6 +3,7 @@ package com.cxyxiaomo.epp.controller;
|
||||
// 提供 restful 服务
|
||||
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
@RestController
|
||||
@@ -11,4 +12,14 @@ public class TestController {
|
||||
public String helloWorld() {
|
||||
return "Hello World!";
|
||||
}
|
||||
|
||||
@GetMapping("/error")
|
||||
public String error() throws Exception {
|
||||
throw new Exception("这是一个异常");
|
||||
}
|
||||
|
||||
@GetMapping("/hi/{id}")
|
||||
public String hi(@PathVariable("id") String id) {
|
||||
return id;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user