Mule3配置文件(有关jdbc配置)

简介: <?xml version="1.0" encoding="UTF-8"?>  <mule xmlns="http://www.mulesoft.org/schema/mule/core"        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"        xmlns:spring=
  1. <?xml version="1.0" encoding="UTF-8"?> 
  2. <mule xmlns="http://www.mulesoft.org/schema/mule/core" 
  3.       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
  4.       xmlns:spring="http://www.springframework.org/schema/beans" 
  5.       xmlns:context="http://www.springframework.org/schema/context" 
  6.       xmlns:http="http://www.mulesoft.org/schema/mule/http" 
  7.       xmlns:vm="http://www.mulesoft.org/schema/mule/vm" 
  8.       xmlns:jms="http://www.mulesoft.org/schema/mule/jms" 
  9.       xmlns:cxf="http://www.mulesoft.org/schema/mule/cxf" 
  10.       xmlns:tcp="http://www.mulesoft.org/schema/mule/tcp" 
  11.       xmlns:stdio="http://www.mulesoft.org/schema/mule/stdio" 
  12.       xmlns:file="http://www.mulesoft.org/schema/mule/file" 
  13.    xmlns:doc="http://www.mulesoft.org/schema/mule/documentation" 
  14.    xmlns:jee="http://www.springframework.org/schema/jee" 
  15.    xmlns:util="http://www.springframework.org/schema/util" 
  16.    xmlns:jdbc="http://www.mulesoft.org/schema/mule/jdbc" 
  17.       xsi:schemaLocation=" 
  18.         http://www.springframework.org/schema/beanshttp://www.springframework.org/schema/beans/spring-beans-3.0.xsd 
  19.         http://www.springframework.org/schema/contexthttp://www.springframework.org/schema/context/spring-context-3.0.xsd 
  20.         http://www.mulesoft.org/schema/mule/corehttp://www.mulesoft.org/schema/mule/core/3.1/mule.xsd 
  21.         http://www.mulesoft.org/schema/mule/httphttp://www.mulesoft.org/schema/mule/http/3.1/mule-http.xsd 
  22.         http://www.mulesoft.org/schema/mule/vmhttp://www.mulesoft.org/schema/mule/vm/3.1/mule-vm.xsd 
  23.         http://www.mulesoft.org/schema/mule/jmshttp://www.mulesoft.org/schema/mule/jms/3.1/mule-jms.xsd 
  24.         http://www.mulesoft.org/schema/mule/tcphttp://www.mulesoft.org/schema/mule/tcp/3.1/mule-tcp.xsd 
  25.         http://www.mulesoft.org/schema/mule/cxfhttp://www.mulesoft.org/schema/mule/cxf/3.1/mule-cxf.xsd 
  26.         http://www.mulesoft.org/schema/mule/stdiohttp://www.mulesoft.org/schema/mule/stdio/3.1/mule-stdio.xsd 
  27.         http://www.mulesoft.org/schema/mule/filehttp://www.mulesoft.org/schema/mule/file/3.1/mule-file.xsd 
  28.         http://www.mulesoft.org/schema/mule/jdbchttp://www.mulesoft.org/schema/mule/jdbc/3.1/mule-jdbc.xsd 
  29.         http://www.springframework.org/schema/jeehttp://www.springframework.org/schema/jee/spring-jee-3.0.xsd 
  30.        http://www.springframework.org/schema/utilhttp://www.springframework.org/schema/util/spring-util-3.0.xsd"> 
  31.  
  32. <custom-transformer name="muleservice" class="com.test.cxf.transferCxf" />  
  33.   
  34. <custom-transformer name="stringToInteger" class="com.test.cxf.StringToInteger" /> 
  35. <custom-transformer name="HttpRequestToNameString" 
  36.   class="org.mule.example.hello.HttpRequestToNameString" /> 
  37. <custom-transformer name="HttpRequestToParameter" class="org.mule.transport.servlet.transformers.HttpRequestToParameter"/> 
  38. <custom-transformer name="AToB" class="com.test.cxf.transformer.AToBTransformer"/> 
  39. <custom-transformer name="BToA" class="com.test.cxf.transformer.BToATransformer" /> 
  40.   
  41. <spring:bean id="dataSource" class="org.springframework.jdbc.datasource.DriverManagerDataSource"> 
  42.   <spring:property name="driverClassName" value="com.mysql.jdbc.Driver"/> 
  43.   <spring:property name="url" value="jdbc:mysql://localhost:3306/"/> 
  44.   <spring:property name="username" value="root"/> 
  45.   <spring:property name="password" value="123"/>   
  46. </spring:bean> 
  47.   
  48. <expression-transformer name="ExtractSymbol"> 
  49.         <return-argument evaluator="map-payload" expression="symbol" /> 
  50.     </expression-transformer> 
  51.     
  52.    <jdbc:connector name="jdbcConnector" dataSource-ref="dataSource" pollingFrequency="1000" queryTimeout="-1"> 
  53.      <jdbc:query key="saveUser" value="insert into user_base (username,password,email) values (#[map-payload:username],#[map-payload:password],#[map-payload:email])"/> 
  54.      <jdbc:query key="getAllUser" value="select * from user_base u"/> 
  55.     </jdbc:connector>  
  56.   
  57. <flow name="in"> 
  58.   <inbound-endpoint address="http://localhost:8889/service/AToB"       
  59.      exchange-pattern="request-response"> 
  60.      <cxf:jaxws-service serviceClass="com.test.cxf.newCxf.INewCxf" /> 
  61.   </inbound-endpoint> 
  62.   <component> 
  63.    <singleton-object class="com.test.cxf.newCxf.NewCxfImp"></singleton-object> 
  64.   </component> 
  65.   <custom-transformer class="com.test.cxf.transformer.AToBTransformer"></custom-transformer> 
  66.   <flow-ref name="out"/> 
  67. </flow> 
  68. <flow name="out">   
  69.   <outbound-endpoint address="http://xop.xiu.com:8080/Demo/cxf/cxftest"       
  70.      responseTransformer-refs="BToA" 
  71.      exchange-pattern="request-response"> 
  72.       <cxf:jaxws-client  serviceClass="com.test.cxf.ICxf" operation="getB" /> 
  73.   </outbound-endpoint> 
  74. </flow> 
  75. <flow name="jdbc_store"> 
  76.   <jdbc:outbound-endpoint queryKey="getAllUser" connector-ref="jdbcConnector" queryTimeout="100" exchange-pattern="request-response"> 
  77.    <jdbc:transaction action="ALWAYS_BEGIN"/> 
  78.   </jdbc:outbound-endpoint>  
  79. </flow> 
  80. </mule> 
  81.  
  82. jdbc的没写完,少了转换器,呵呵,读者注意了 
目录
相关文章
|
8月前
|
SQL Java 数据库连接
jdbc的执行流程|不同数据库的驱动配置
jdbc的执行流程|不同数据库的驱动配置
|
9月前
|
XML Java 数据库连接
java202304java学习笔记第六十五天-ssm-声明式控制-基于xml的声明式配置-原始jdbc操作1
java202304java学习笔记第六十五天-ssm-声明式控制-基于xml的声明式配置-原始jdbc操作1
44 0
|
2天前
|
前端开发 Java BI
Servlet+Jsp+JDBC实现房屋租赁管理系统(源码+数据库+论文+系统详细配置指导+ppt)
Servlet+Jsp+JDBC实现房屋租赁管理系统(源码+数据库+论文+系统详细配置指导+ppt)
|
2天前
|
Java 数据库连接 数据库
Flink全托管,holo 库同步到另一个库,报错failed to get user from ak 亲,请问是哪种权限缺失?Flink 配置中使用的是holo. jdbc 的user和password 。
Flink全托管,holo 库同步到另一个库,报错failed to get user from ak 亲,请问是哪种权限缺失?Flink 配置中使用的是holo. jdbc 的user和password 。
42 1
|
5月前
|
Java 关系型数据库 MySQL
|
8月前
|
SQL 算法 Java
Myqsql使用Sharding-JDBC配置详解3
Myqsql使用Sharding-JDBC配置详解3
67 0
|
8月前
|
SQL 算法 Java
Myqsql使用Sharding-JDBC配置详解2
Myqsql使用Sharding-JDBC配置详解2
127 0
|
8月前
|
SQL 监控 算法
Myqsql使用Sharding-JDBC配置详解1
Myqsql使用Sharding-JDBC配置详解1
46 0
|
9月前
|
XML Java 数据库连接
java202304java学习笔记第六十五天-ssm-声明式控制-基于xml的声明式配置-原始jdbc操作2
java202304java学习笔记第六十五天-ssm-声明式控制-基于xml的声明式配置-原始jdbc操作2
52 0
|
10月前
|
SQL 算法 Java
springboot中sharding jdbc绑定表配置实战
springboot中sharding jdbc绑定表配置实战