Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
O
order-group
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
order-group-application
order-group
Commits
40d3b3e6
Commit
40d3b3e6
authored
Feb 16, 2022
by
查志伟
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add
parent
1a48306b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
0 deletions
+19
-0
order-application-service/src/main/java/cn/freemud/config/PreReleaseBeanConfig.java
+19
-0
No files found.
order-application-service/src/main/java/cn/freemud/config/PreReleaseBeanConfig.java
View file @
40d3b3e6
...
@@ -81,6 +81,25 @@ public class PreReleaseBeanConfig {
...
@@ -81,6 +81,25 @@ public class PreReleaseBeanConfig {
return
RestTemplateUtils
.
getRestTemplateByType
(
map
);
return
RestTemplateUtils
.
getRestTemplateByType
(
map
);
}
}
@Profile
({
"pro"
})
@Bean
(
name
=
{
"stockRestTemplate"
})
public
RestTemplate
stockRestTemplatePro
(
@Autowired
StockCenterProperties
stockCenterProperties
)
{
Map
<
String
,
Integer
>
map
=
new
HashMap
(
16
);
if
(
stockCenterProperties
.
getRetryTimes
()
!=
null
)
{
map
.
put
(
"retryTimes"
,
stockCenterProperties
.
getRetryTimes
());
}
if
(
stockCenterProperties
.
getConnectTimeOut
()
!=
null
)
{
map
.
put
(
"connectTimeOut"
,
stockCenterProperties
.
getConnectTimeOut
());
}
if
(
stockCenterProperties
.
getReadTimeOut
()
!=
null
)
{
map
.
put
(
"readTimeOut"
,
stockCenterProperties
.
getReadTimeOut
());
}
return
RestTemplateUtils
.
getRestTemplateByType
(
map
);
}
@Profile
({
"pre-release"
})
@Profile
({
"pre-release"
})
@Bean
(
name
=
{
"productRestTemplate"
})
@Bean
(
name
=
{
"productRestTemplate"
})
public
RestTemplate
productRestTemplate
(
@Autowired
ProductCenterProperties
productCenterProperties
)
{
public
RestTemplate
productRestTemplate
(
@Autowired
ProductCenterProperties
productCenterProperties
)
{
...
...
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