|
@@ -1,7 +1,5 @@
|
|
|
package com.uas.eis.serviceImpl;
|
|
|
|
|
|
-import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.forwardedUrl;
|
|
|
-
|
|
|
import java.util.ArrayList;
|
|
|
import java.util.Arrays;
|
|
|
import java.util.HashMap;
|
|
@@ -17,7 +15,7 @@ import org.springframework.stereotype.Service;
|
|
|
import org.springframework.util.StringUtils;
|
|
|
|
|
|
import com.alibaba.fastjson.JSON;
|
|
|
-import com.uas.eis.core.support.ActionProperties;
|
|
|
+import com.uas.eis.core.support.ActionConfig;
|
|
|
import com.uas.eis.core.support.TokenHandler;
|
|
|
import com.uas.eis.dao.BaseDao;
|
|
|
import com.uas.eis.entity.QueryArgs;
|
|
@@ -33,6 +31,8 @@ public class QueryServiceImpl implements QueryService {
|
|
|
|
|
|
@Autowired
|
|
|
private BaseDao baseDao;
|
|
|
+ @Autowired
|
|
|
+ private ActionConfig actionConfig;
|
|
|
|
|
|
@Override
|
|
|
public String login(String username, String password) {
|
|
@@ -59,12 +59,12 @@ public class QueryServiceImpl implements QueryService {
|
|
|
return false;
|
|
|
}
|
|
|
|
|
|
- String apiAction = ActionProperties.getProperty("api_action");
|
|
|
+ String apiAction = actionConfig.getApiAction();
|
|
|
if(action.startsWith(apiAction)) {
|
|
|
return true;
|
|
|
}
|
|
|
|
|
|
- String[] publicActions = ActionProperties.getProperty("public_action").split(";");
|
|
|
+ String[] publicActions = actionConfig.getPublicActions();
|
|
|
for(String publicAction : publicActions) {
|
|
|
if(publicAction.equals(action)) {
|
|
|
return true;
|