1
0
Code Issues Pull Requests Packages Projects Releases Wiki Activity GitHub Gitee

Gateway配置文件

This commit is contained in:
2022-11-06 00:18:46 +08:00
parent 529ef7528e
commit 7ec7fc1e4f
6 changed files with 68 additions and 3 deletions

View File

@@ -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;
}
}