<bean id="onlService" class="dap.service.bo.onlineManager.impl.OnlSvrBOImpl"> <property name="svrMap"> <map> <entry> <key><value>20</value></key> <ref bean="cardOnlBO"/> </entry> <entry> <key><value>21</value></key> <ref bean="warrantBO"/> </entry> </map> </property> <property name="methods"> <map> <!-- 开通 --> <entry key="01" value="onlineOpened"/> <!-- 查询 --> <entry key="02" value="onlineQry"/> <!-- 更新、替换 --> <entry key="03" value="onlineUpd"/> <!-- 锁定、挂失 --> <entry key="04" value="onlineLocked"/> <!-- 解挂、解锁 --> <entry key="05" value="onlineUnLocked"/> <!-- 注销 取消 --> <entry key="06" value="onlineLogout"/> <!-- 解除绑定 --> <entry key="07" value="onlineUnBind"/> <!-- 单笔限额更新 <entry key="08" value="onlineUpdAmt"/> --> <!-- 同步 --> <entry key="09" value="onlineSync"/> <!-- 生效 --> <entry key="10" value="onlineInure"/> </map> </property> </bean> /** * 交易代码前两位字符对应的业务处理对象 */ private Map svrMap; /** * 交易代码后两位对应的业务处理方法 */ private Map methods; String txnCode = reqMsg.getTxnCode(); String pref = txnCode.trim().substring(0, 2); String oper = txnCode.trim().substring(2); IManagerBO mgerBO = (IManagerBO) svrMap.get(pref); String method = (String) methods.get(oper); rspMsg = (SerRspMsg) MethodUtils.invokeMethod(mgerBO, method, reqMsg);