Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
leaf-hlcm
Project
Project
Details
Activity
Releases
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
hlcm
leaf-hlcm
Commits
1bf2f62f
Commit
1bf2f62f
authored
Sep 25, 2024
by
5743
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
机易查初版框架性开发提交v1.2-由于ctronller是单例,DatabaseServiceFactory不可定义在方法中多次请求会导致阻塞
parent
1a410f85
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
3 deletions
+7
-3
JYCInterfaceController.java
...s/hlcm/hlinteface/controllers/JYCInterfaceController.java
+7
-3
No files found.
src/main/java/com/hand/hls/hlcm/hlinteface/controllers/JYCInterfaceController.java
View file @
1bf2f62f
...
...
@@ -19,11 +19,15 @@ import java.io.IOException;
@Controller
public
class
JYCInterfaceController
extends
BaseController
{
private
static
final
RateLimiter
rateLimiter
=
RateLimiter
.
create
(
1.0
);
// 每秒允许1
个请求
private
static
final
RateLimiter
rateLimiter
=
RateLimiter
.
create
(
2.0
);
// 每秒允许2
个请求
private
static
final
String
IP_LIMIT
=
"39.97.244.233,39.98.188.246"
;
private
static
final
String
WJ
=
"wj"
;
private
static
final
String
BM_PATH
=
"cont.jyc_equno_query"
;
private
static
final
String
WJFL_FIELD
=
"WJFL"
;
DatabaseServiceFactory
dsf
=
ObjectRegistryHolder
.
getInstanceOfType
(
DatabaseServiceFactory
.
class
);
CompositeMap
context
=
new
CompositeMap
();
public
boolean
checkInterfacePara
(
String
equNo
,
String
type
,
String
reqClientIp
,
JSONObject
resultjson
){
...
...
@@ -61,8 +65,8 @@ public class JYCInterfaceController extends BaseController {
try
{
boolean
checkFlag
=
checkInterfacePara
(
equNo
,
type
,
reqClientIp
,
resultjson
);
if
(
checkFlag
)
{
DatabaseServiceFactory
dsf
=
ObjectRegistryHolder
.
getInstanceOfType
(
DatabaseServiceFactory
.
class
);
CompositeMap
context
=
new
CompositeMap
();
//
DatabaseServiceFactory dsf = ObjectRegistryHolder.getInstanceOfType(DatabaseServiceFactory.class);
//
CompositeMap context = new CompositeMap();
CompositeMap
param
=
new
CompositeMap
();
Boolean
existsFlag
=
false
;
if
(
equNo
!=
null
)
{
...
...
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