Commit 183ddadc by liulianglang

打印调试

parent 764332a5
......@@ -112,9 +112,9 @@
</dependency>
<!-- 数据库驱动包 -->
<dependency>
<groupId>org.oracle</groupId>
<groupId>com.oracle</groupId>
<artifactId>ojdbc6</artifactId>
<version>10</version>
<version>11.2.0.3</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.jasypt/jasypt -->
<dependency>
......
......@@ -6,6 +6,7 @@ import org.apache.commons.lang.StringUtils;
import org.springblade.founder.log.LogOper;
import org.springblade.founder.utils.HttpUtil;
import org.springblade.founder.utils.R;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.context.request.RequestContextHolder;
......@@ -34,8 +35,8 @@ import java.util.Map;
@RestController
@RequestMapping("/forward")
public class ForwardController {
// @Value("httpUrl")
private String host = "http://127.0.0.1:9022/";
@Value("${httpUrl}")
private String host = "http://127.0.0.1:9026/";
@RequestMapping("/method")
public R method(HttpServletRequest request) {
......@@ -43,7 +44,11 @@ public class ForwardController {
if (StringUtils.isEmpty(url)) {
return R.error("url不能为空");
}
System.out.println("url:=="+url);
System.out.println("host:=="+host);
String type = request.getMethod();
System.out.println("url:=="+url+"type:==="+type);
HashMap<String, String> headers = new HashMap<>();
Enumeration<String> headerNames = request.getHeaderNames();
while (headerNames.hasMoreElements()) {
......@@ -51,6 +56,7 @@ public class ForwardController {
if ("blade-auth".equals(element) || "authorization".equals(element)) {
String header = request.getHeader(element);
headers.put(element, header);
System.out.println("header:=="+element);
}
}
if ("post".equalsIgnoreCase(type)) {
......@@ -117,7 +123,7 @@ public class ForwardController {
if (StringUtils.isEmpty(url)) {
return R.error("url不能为空");
}
System.out.println("url:=="+url);
HashMap<String, String> headers = new HashMap<>();
Enumeration<String> headerNames = request.getHeaderNames();
while (headerNames.hasMoreElements()) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment