Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
E
enterprise-service-platform
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
赵啸非
enterprise-service-platform
Commits
be70518c
Commit
be70518c
authored
Mar 24, 2025
by
赵啸非
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改配置文件
parent
3084a7c1
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
4 deletions
+8
-4
enterprise-service-manager/src/main/java/com/mortals/xhx/busiz/web/ProxyController.java
.../main/java/com/mortals/xhx/busiz/web/ProxyController.java
+8
-4
No files found.
enterprise-service-manager/src/main/java/com/mortals/xhx/busiz/web/ProxyController.java
View file @
be70518c
package
com.mortals.xhx.busiz.web
;
package
com.mortals.xhx.busiz.web
;
import
cn.hutool.http.HttpUtil
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONObject
;
import
com.alibaba.fastjson.JSONObject
;
import
com.mortals.framework.annotation.UnAuth
;
import
com.mortals.framework.annotation.UnAuth
;
...
@@ -17,6 +18,7 @@ import org.springframework.web.reactive.function.client.WebClient;
...
@@ -17,6 +18,7 @@ import org.springframework.web.reactive.function.client.WebClient;
import
reactor.core.publisher.Mono
;
import
reactor.core.publisher.Mono
;
import
java.io.IOException
;
import
java.io.IOException
;
import
java.nio.charset.Charset
;
import
java.util.Map
;
import
java.util.Map
;
@RestController
@RestController
...
@@ -177,14 +179,16 @@ public class ProxyController {
...
@@ -177,14 +179,16 @@ public class ProxyController {
}
else
if
(
"get"
.
equalsIgnoreCase
(
method
))
{
}
else
if
(
"get"
.
equalsIgnoreCase
(
method
))
{
Map
<
String
,
String
>
map
=
req
.
toJavaObject
(
Map
.
class
);
Map
<
String
,
Object
>
map
=
req
.
toJavaObject
(
Map
.
class
);
String
bodyParams
=
getBodyParams
(
map
);
/* String bodyParams = getBodyParams(map);
log
.
info
(
bodyParams
);
log.info(bodyParams);*/
String
urlGet
=
HttpUtil
.
urlWithForm
(
url
.
toString
(),
map
,
Charset
.
forName
(
"utf-8"
),
false
);
//url拼接参数
//url拼接参数
Request
.
Builder
requestBuilder
=
new
Request
.
Builder
()
Request
.
Builder
requestBuilder
=
new
Request
.
Builder
()
.
url
(
url
+
bodyParams
)
.
url
(
url
Get
)
.
get
();
.
get
();
// 透传 Headers(过滤掉 Host 避免冲突)
// 透传 Headers(过滤掉 Host 避免冲突)
headers
.
forEach
((
key
,
value
)
->
{
headers
.
forEach
((
key
,
value
)
->
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment