Commit 4a45ed6b authored by liuzicheng's avatar liuzicheng

初始化项目

parent 2e03888a
......@@ -39,9 +39,9 @@ public class CommandProxy {
ChannelConfig channelConfig = new ChannelConfig();
channelConfig.setAppId(appId);
this.setLocalContext(requestBody,channelConfig);
log.info("[浙农请求request:处理command:{}------------>{}]",command.getClass().getSimpleName(),decodeBody);
log.info("[浙农请求request:处理:{}------------>{}]",command.getClass().getSimpleName(),decodeBody);
JsonResult result = command.doAction();
log.info("[浙农请求response:处理command:{}=============>{}]",command.getClass().getSimpleName(),JSON.toJSONString(result));
log.info("[浙农请求response:处理:{}=============>{}]",command.getClass().getSimpleName(),JSON.toJSONString(result));
return result;
}
......
package com.jqtx.windows.web.config;
import com.jqtx.windows.command.CreditSubmitCommand;
import com.jqtx.windows.common.factory.AbstractCommand;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.CommandLineRunner;
import org.springframework.stereotype.Component;
......@@ -11,6 +13,10 @@ import java.util.HashMap;
@Slf4j
public class RouterConfig implements CommandLineRunner {
@Autowired
private CreditSubmitCommand creditSubmitCommand;
private static HashMap<String, AbstractCommand> commandHashMap = new HashMap<>();
public static AbstractCommand getCommand(String method) {
......@@ -22,6 +28,6 @@ public class RouterConfig implements CommandLineRunner {
@Override
public void run(String... args) throws Exception {
commandHashMap.put("check_user",null);
commandHashMap.put("creditSubmit",creditSubmitCommand);
}
}
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