applicationContext-service.xml 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <beans xmlns="http://www.springframework.org/schema/beans"
  3. xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:aop="http://www.springframework.org/schema/aop"
  4. xmlns:tx="http://www.springframework.org/schema/tx"
  5. xsi:schemaLocation="
  6. http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
  7. http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx.xsd
  8. http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop.xsd">
  9. <!-- Spring的xml配置中的属性变量加载 -->
  10. <bean id="propertyConfigurer"
  11. class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
  12. <property name="locations">
  13. <list>
  14. <value>classpath:application-minicore.properties</value>
  15. </list>
  16. </property>
  17. <property name="ignoreUnresolvablePlaceholders" value="true"/>
  18. </bean>
  19. <!-- 扫描系统交易的预处理加载注册,不欲加入不影响使用 -->
  20. <!-- <bean id="searchExecProcess" class="com.miniframe.core.SearchExecProcess"/>-->
  21. <!-- 客户端通讯服务类 同步通讯:com.miniframe.httpclient.HttpClient,
  22. 异步通讯:com.miniframe.httpclient.HttpAsyncClient
  23. 双向加密:com.miniframe.httpclient.HttpSslClient -->
  24. <!-- 同步通讯 -->
  25. <bean id="httpSyncClient" class="com.miniframe.httpclient.HttpClient"/>
  26. <!-- 异步通讯 -->
  27. <bean id="httpAsyncClient" class="com.miniframe.httpclient.HttpAsyncClient"/>
  28. <!-- 双向加密 -->
  29. <!-- <bean id="httpSslClient" class="com.miniframe.httpclient.HttpSslClient">-->
  30. <!-- &lt;!&ndash; 服务器端证书 jks格式 &ndash;&gt;-->
  31. <!-- <property name="jksStoreClassPath" value="server.jks"/>-->
  32. <!-- &lt;!&ndash; 服务器端证书密码 &ndash;&gt;-->
  33. <!-- <property name="jksPassWord" value="123456"/>-->
  34. <!-- &lt;!&ndash; 客户端证书 p12格式 &ndash;&gt;-->
  35. <!-- <property name="p12ClassPath" value="client.p12"/>-->
  36. <!-- &lt;!&ndash; 客户端证书密码 &ndash;&gt;-->
  37. <!-- <property name="p12PassWord" value="123456"/>-->
  38. <!-- </bean>-->
  39. <!-- 路由前处理,为判断权限等拦截使用 -->
  40. <bean id="preHttpRouteProxy" class="com.miniframe.httpservice.PreHttpRouteProxy"/>
  41. <!-- 交易前处理,预留接口例子 -->
  42. <bean id="preProcessFlow" class="com.miniframe.httpservice.PreProcessFlow"/>
  43. <!-- 交易后处理,预留接口例子 -->
  44. <bean id="nextProcessFlow" class="com.miniframe.httpservice.NextProcessFlow"/>
  45. <!-- 交易后处理,预留接口例子 -->
  46. <bean id="errorProcessFlow" class="com.miniframe.httpservice.ErrorProcessFlow"/>
  47. <!--  通讯异步路由代理 通讯同步机制: com.miniframe.httpproxy.HttpRouteProxy
  48. 通讯异步机制: com.miniframe.httpproxy.HttpAyncRouteProxy -->
  49. <bean id="httpRouteProxy" class="com.miniframe.httpproxy.HttpAyncRouteProxy">
  50. <!-- 路由代理的前处理,需要拦截增加头信息等,返回非空为错误,必须包含错误的信息报文 -->
  51. <property name="preHttpRouteProxy" ref="preHttpRouteProxy" />
  52. <property name="uriMap">
  53. <map>
  54. <!-- <entry key="/TransServlet/service/block" value="lb:gzl.block-upchain-service/TransServlet"/>-->
  55. <!-- <entry key="/TransServlet/service/browser" value="lb:gzl.block-browser-service/TransServlet"/>-->
  56. </map>
  57. </property>
  58. </bean>
  59. <!-- Http服务器 -->
  60. <bean id="httpTransService" class="com.miniframe.httpserver.HttpTransService">
  61. <!-- 路由代理 -->
  62. <property name="httpRouteProxy" ref="httpRouteProxy" />
  63. <!-- 交易前处理 -->
  64. <property name="preProcessFlow" ref="preProcessFlow" />
  65. <!-- 交易后处理 -->
  66. <property name="nextProcessFlow" ref="nextProcessFlow" />
  67. <!-- 交易错误处理 -->
  68. <property name="errorProcessFlow" ref="errorProcessFlow" />
  69. <!-- 是否将交易码转化为URL -->
  70. <property name="code2uri" value="false"/>
  71. <!-- 客户端http头传送内容 -->
  72. <property name="clienthttpHead" value="x-auth-token,x-auth-user"/>
  73. <!-- 服务器端http返回头传送内容 -->
  74. <property name="serverHttpHead" value="x-auth-token,x-auth-user"/>
  75. <!-- 心跳错误检测码 -->
  76. <property name="hearterrorcode" value="${mf.minicore.hearterrorcode}"/>
  77. <!-- 交易码的key -->
  78. <property name="transCode" value="transCode"/>
  79. <!-- 返回码key -->
  80. <property name="returnCode" value="returnCode"/>
  81. <!-- 返回信息key -->
  82. <property name="returnMsg" value="returnMsg"/>
  83. <!-- 缺省异常的返回码 -->
  84. <property name="exceptionReturnCode" value="${mf.minicore.systemerror}"/>
  85. <!-- 缺省异常的返回信息 -->
  86. <property name="exceptionReturnMsg" value="系统交易调用失败!"/>
  87. <!-- 正常的返回码 -->
  88. <property name="normalReturnCode" value="${mf.minicore.success}"/>
  89. <!-- 正常的返回信息 -->
  90. <property name="normalReturnMsg" value="系统交易调用成功!"/>
  91. </bean>
  92. </beans>