|
|
@ -2,6 +2,9 @@ package com.epmet.modules.test; |
|
|
|
|
|
|
|
import com.epmet.commons.tools.utils.HttpContextUtils; |
|
|
|
import com.epmet.commons.tools.utils.Result; |
|
|
|
import com.epmet.dto.form.TestFormDTO; |
|
|
|
import com.epmet.feign.OssFeignClient; |
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
import org.springframework.web.bind.annotation.PostMapping; |
|
|
|
import org.springframework.web.bind.annotation.RequestMapping; |
|
|
|
import org.springframework.web.bind.annotation.RestController; |
|
|
@ -12,6 +15,9 @@ import javax.servlet.http.HttpServletRequest; |
|
|
|
@RequestMapping("test") |
|
|
|
public class TestController { |
|
|
|
|
|
|
|
@Autowired |
|
|
|
private OssFeignClient ossFeignClient; |
|
|
|
|
|
|
|
@PostMapping("get-req-info") |
|
|
|
public Result testDomain(HttpServletRequest request) { |
|
|
|
String requestServerNameAndPort = HttpContextUtils.getRequestServerNameAndPort(); |
|
|
@ -27,4 +33,11 @@ public class TestController { |
|
|
|
return new Result(); |
|
|
|
} |
|
|
|
|
|
|
|
@PostMapping("test-ribbon-sender") |
|
|
|
public Result testRibbonSender() { |
|
|
|
TestFormDTO form = new TestFormDTO(40000l); |
|
|
|
Result result = ossFeignClient.testRibbonRcv(form); |
|
|
|
return result; |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|