|
|
|
@ -1,16 +1,15 @@ |
|
|
|
package com.neo.controller; |
|
|
|
|
|
|
|
import org.springframework.web.bind.annotation.RequestMapping; |
|
|
|
import org.springframework.web.bind.annotation.RestController; |
|
|
|
import org.springframework.web.bind.annotation.GetMapping; |
|
|
|
import org.springframework.web.bind.annotation.RequestParam; |
|
|
|
import org.springframework.web.bind.annotation.*; |
|
|
|
import io.prometheus.client.Counter; |
|
|
|
import io.swagger.annotations.*; |
|
|
|
|
|
|
|
import javax.servlet.http.HttpServletResponse; |
|
|
|
|
|
|
|
|
|
|
|
@Api(value = "测试", description = "测试 API", position = 100, protocols = "http") |
|
|
|
@RestController |
|
|
|
@CrossOrigin(origins = "*") |
|
|
|
public class DockerController { |
|
|
|
// Counter |
|
|
|
// static final Counter requests = Counter.build() |
|
|
|
@ -26,7 +25,8 @@ public class DockerController { |
|
|
|
notes = "打招呼" |
|
|
|
) |
|
|
|
@RequestMapping("/hello") |
|
|
|
public String index() { |
|
|
|
public String index(HttpServletResponse response) { |
|
|
|
response.addHeader("Access-Allow-Control-Origin","*"); |
|
|
|
// Counter |
|
|
|
// requests.inc(); |
|
|
|
|
|
|
|
|