Commit 1bf2f62f authored by 5743's avatar 5743

机易查初版框架性开发提交v1.2-由于ctronller是单例,DatabaseServiceFactory不可定义在方法中多次请求会导致阻塞

parent 1a410f85
......@@ -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) {
......
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