spring中使用mule的配置经验总结

Mule-JDBC配置实例 最近一个集成项目需求如下:从Oracle临时表中轮询数据,将轮询结果插入到MSSQLSERVER数据库中,然后在确保数据插入MSSQLSERVER后,将Oracle临时表中的数据删除。由于初次接触Mule,一些概念和应用尚未搞明白,现将实现过程整理如下,仅供参考。         重点注意事项:         1.Mule版本:mule-standalone-3.3.0社区版; 阅读详情
在spring中使用mule时,有两种主要的方式,一种是将mule中的bean直接配置在spring的bean.xml文件中,统一由spring来管理;另一种是由mule自带的SpringConfigurationBuilder类来加载mule自己的配置文件mule-config.xml;采用第二种方式时,在spring中可以直接使用mule的配置文件,而不用再写配置文件。SpringConfigurationBuilder类在加载mule-config.xml文件时,由MuleApplicationContext类调用mule-to-spring.xsl文件,对mule-config.xml文件进行transform(转换),实际上就是在mule-config.xml文件的头上加入三个bean的定义,以实现对mule的启动、初始化、服务的注册(mule-config.xml文件中的服务),bean的定义如下(可以查看mule-to-spring.xsl):
<bean id="muleManager" class="org.mule.extras.spring.config.AutowireUMOManagerFactoryBean"/>
<bean id="muleNameProcessor" class="org.mule.extras.spring.config.MuleObjectNameProcessor"/>
<bean name="muleConfiguratrion" class="org.mule.config.MuleConfiguration">
            <property name="model">
                <value>
                    <xsl:value-of select="@model"/>
                </value>
            </property>
            <property name="recoverableMode">
                <value>
                    <xsl:value-of select="@recoverableMode"/>
                </value>
            </property>
            <property name="synchronous">
                <value>
                    <xsl:value-of select="@synchronous"/>
                </value>
            </property>
            <property name="synchronousReceive">
                <value>
                    <xsl:value-of select="@synchronousReceive"/>
                </value>
            </property>
            <property name="workingDirectory">
                <value>
                    <xsl:value-of select="@workingDirectory"/>
                </value>
            </property>
            <property name="serverUrl">
                <value>
                    <xsl:value-of select="@serverUrl"/>
                </value>
            </property>

            <xsl:apply-templates select="threading-profile" mode="global"/>
            <xsl:apply-templates select="queue-profile"/>
            <xsl:apply-templates select="pooling-profile"/>
            <xsl:apply-templates select="persistence-strategy"/>
            <xsl:apply-templates select="connection-strategy"/>
        </bean>
mule-springboot-module:Mule 4模块可嵌入Spring Boot应用程序 Spring Boot模块扩展 添加描述... ... ... 将此依赖项添加到您的应用程序pom.xml <groupId>com.kloudtek.mule.module.springboot</groupId> <artifactId>mule-springboot-module</artifactId> <version>1.0.0</version> ule子弹簧引导模块 立即下载

相关推荐

mule-spring-boot-starter

ule子弹簧启动启动器 Mule CE是一个开源集成工具。 Mule CE应用程序通常在Mule运行时内部运行。 使用mule-spring-boot-starter,您可以运行Spring Boot应用程序中嵌入的Mule CE。 这使Mule开发人员无需下载Mule运行时,创建Maven工件并将工件推送到Mule运行时即可快速原型化和/或部署Mule应用程序。 该项目将允许开发人员以与其他Spring Boot应用程序几乎相同的方式构建Mule应用程序。 Maven依赖关系: 要开始使用,只需将依赖项包含在pom文件中: <dependency> <groupId>net.taptech</groupId> <artifactId>mule-spring-boot-starter</artifactId> <version>1.5.9-SNAPSHOT</version

MULE学习笔记1

1、安装&配置 版本:mule 2.2.1 操作: 1) 下载、解压 2)配置环境变量:MULE_HOME、PATH 3)如果网络环境使用代理,找到%MULE_HOME%/conf目录下,找到wrapper.conf,修改 [java] view plaincopyprint? #wrapper.java.additional.=-Dhttp.proxyHos

涂作权的博客 1652

MuleESB集成webservice+restful(sprintboot+mybatis+mysql)+activeMQ+javamail

MuleESB集成webservice+restful(sprintboot+mybatis+mysql)+activeMQ+javamail,五天的研究成果,集成了我所关注的点,希望有更多的朋友一起学习进步。

mule esb 3.X

最近研究了一个月左右的MULEESB3.X,过程中非常苦于没有资料(查到的大部分是mule2.0的东西),鉴于MULE 3.X有点入门的感觉,赶紧记下,免得忘记。       首先对于MULE ESB3.X的使用问题,公司有想法做一个基础平台,而在处理多渠道融合方面(如:jms,tcp)等,MULE 有它自己非常强大的优势,加上现在的框架程序,非常注重于spring的融合问题,所以基本上我在想,

fanson163的专栏 1523

生成式引擎优化(GEO)全流程解析

生成式引擎优化(GEO)已成为AI时代数字营销新趋势,通过优化企业内容以提升在AI生成答案中的引用率。本文系统梳理了GEO优化的完整流程,包括:1)前期准备与市场调研;2)数据治理与知识库构建;3)模型适配与算法优化;4)内容权威性建设;5)本地化营销;6)效果监测与优化。研究显示,实施GEO的企业AI曝光率提升62%,转化率增长2.3倍。未来GEO将向多模态内容、实时个性化、垂直场景深化方向发展。企业需建立动态知识图谱,采用结构化数据标记,持续优化内容策略,以在AI搜索时代获取流量优势。

解锁AI流量新红利!🚀 GEO优化(生成引擎优化)助您掌控AI搜索,让AI成为您的品牌最佳代言人! 3254

H.264 Profile与Level详解:如何为不同应用场景选择合适的编码配置

本文深入解析了H.264编码标准中的Profile与Level概念,指导开发者如何为不同应用场景选择合适的配置。文章对比了Baseline、Main和High三大Profile的特性与适用场景,并解释了Level如何限定视频的分辨率、帧率与码率上限。通过实战指南,帮助读者在视频通话、在线点播和专业制作等场景中,平衡画质、兼容性与性能,实现高效编码。

rgv2345678的博客 242

Mule+Spring+jbpm

法一:完全在spring.xml里面配置mule的所有内容 该方法的缺点的是配置umo比mule语法更加繁琐 法二:两个配置分件都用,不过mule里面需要加入一些mule-spring的标记 其本质是将mule.xml转换成法一中的spring.xml 该方法比较适合在现有的spring应用中,加入mule   法三:在mule server的container内启动spring,各自

nbrremix的专栏 3100

MOOS-ivp实战:从零搭建水下机器人通信系统(Ubuntu 22.04版)

本文详细介绍了在Ubuntu 22.04系统上从零开始搭建MOOS-ivp水下机器人通信系统的完整实战流程。内容涵盖环境准备、核心安装、MOOSDB通信模型解析、自定义应用节点开发、以及调试监控工具链的使用,旨在帮助开发者快速掌握这一分布式机器人系统框架,构建稳定可靠的水下机器人通信与控制系统。

snow3的博客 636

Mule+Spring+jbpm

法一:完全在spring.xml里面配置mule的所有内容该方法的缺点的是配置umo比mule语法更加繁琐法二:两个配置分件都用,不过mule里面需要加入一些mule-spring的标记其本质是将mule.xml转换成法一中的spring.xml该方法比较适合在现有的spring应用中,加入mule 法三:在mule server的container内启动spring,各自用自己的配置文件格式

软件开发资料汇总 512

B0505S选型

    使用B0505S-1W已经有一段时间了,一直以来使用的是下面的电路,该电路摘自《CAN总线嵌入式开发——从入门到实战》一书。 参考金升阳的用户手册,手册上写道: 为了确保该模块能够高效可靠的工作,使用时,其输出最小负载不能小于额定负载的10%。若您所需功率确实较小,请在输出端并联一个电阻(电阻消耗功率与实际使用功率之和大于等于10%的额定功率)        由于使用该电源模...

动感小麦兜的博客 1万+

Spyglass功耗分析:从RTL到优化的全流程实践

本文详细介绍了在RTL设计阶段使用Spyglass进行早期功耗分析的全流程实践。通过一个真实项目案例,阐述了早期功耗分析的必要性,并手把手指导了从文件准备、GUI操作到报告解读与优化的完整步骤。文章重点说明了如何利用Spyglass实现功耗分析的“左移”,在编码阶段识别和修复功耗热点,从而避免后期高昂的修改成本,是低功耗芯片设计的关键技能。

purple的博客 1118

使用MULE接收并处理HTTP请求

一:插件安装Mule插件地址:mule - http://dist.muleforge.org/mule-ide/updates/3.4/二:配置mule安装目录Preferences->Mule->Mule Distributions三:新建Mule工程mule-config.xml配置文件 ~~

Duke之家 3235

C#与发那科机器人通信实战:从SDK配置到机械臂控制

本文详细介绍了如何使用C#与发那科机器人进行通信,从SDK配置到机械臂控制的完整实战流程。内容包括环境准备、通信连接建立、机械臂运动控制、异常处理与状态监控,以及高级功能实战,帮助开发者快速掌握工业机器人编程技术。

weixin_42524276的博客 459

关于mule中Spring使用中的一个问题

在mule中连接数据库时,大家通常喜欢使用spring的数据库连接以及bean的配置,但是在使用时会出现一些问题,即bean无法找到,这些,就是需要把bean的id属性改成name属性;可能是因为mule或者spring的问题,mule3.4.1识别spring bean的name属性而不是id属性; <?xml version="1.0" encoding="UTF-8"?...

aigang4878的博客 248

Unity大世界流式加载:工业级架构与优化秘籍

游戏大厂Unity大世界流式加载框架全景解析:从《原神》《和平精英》等标杆案例出发,深入剖析工业级流式加载的完整技术架构。文章系统介绍了大世界分区块管理、异步加载机制、资源优化策略、多平台适配方案,以及业务联动与团队协作流程。重点阐述了Addressable与AssetBundle应用、空间触发器设计、性能自适应等核心技术,并展望AI预测加载、云游戏等未来方向。全面展现了大厂如何通过流式加载技术实现无缝开放世界体验的技术路径与实践经验。

本博客聚焦游戏开发技巧、创业实战心得及大学热门课程干货。这里既有技术深度,也有思维广度,无论你是开发者、创业者还是高校学子,都能在这里找到适合自己的成长之路! 613

华为OD机试2025C卷-双十一最大花费金额[100分](Java_Python3_C++_C语言_JsNode_Go)实现100%通过率

双十一最大花费金额 - 动态规划解法 摘要:本文介绍了华为OD机试中"双十一最大花费金额"问题的动态规划解法。该问题要求在给定N件商品价格和优惠券面额X的情况下,选择若干商品使总花费不超过X且尽可能大。核心解法采用布尔型动态规划数组,记录每个金额是否可被拼出。算法时间复杂度为O(N*X),空间复杂度为O(X)。通过倒序遍历避免重复选择同一商品,最后从X向下查找第一个可达金额作为答案。文中提供了C++和Java的实现代码,并解释了与经典0-1背包问题的关系。 关键点: 问题本质是0-1背包/子集和问题的变体

2503_91057718的博客 48

mule3.X + spring3.X

对Mule3.X有了一些理解和铺垫以后,马上上一个非常有营养的例子,mule3.X结合spring3.X的例子。 原理:在数据库中存放一张user表,使用spring的JDBCTamplate去进行增删改查,然后再mule.xml中把spring的bean当做它自己的component来使用。 这么做符合我们的需求,即mule完成多渠道接入以及服务编排,比如外部服务通过tcp接入,mule配置

fanson163的专栏 2155

ET2012新版免狗免安装绿色软件

ET2012新版免狗免安祖昂绿色软件。,新界面,新视觉,

mule配置文件元素

创建spring bean与mule创建的对象一起放在mule的注册信息里。         mule创建的对象可以spring的属性对象             Gold       Platinum       Executive       mule可以使用spring属性              location="

chuanzhongdu1的专栏 2186

迈瑞BS系列全自动生化分析仪LIS协议接口手册(内含HL7和ASTM)

迈瑞BS系列全自动生化分析仪LIS协议接口手册,内含HL7和ASTM)

深度学习工具包 DeepLearningToolbox

深度学习工具包Deprecation notice.-----This toolbox is outdated and no longer maintained.There are much better tools available for deep learning than this toolbox, e.g. [Theano](http://deeplearning.net/software/theano/), [torch](http://torch.ch/) or [tensorflow](http://www.tensorflow.org/)I would suggest you use one of the tools mentioned above rather than use this toolbox.Best, Rasmus.DeepLearnToolbox================A Matlab toolbox for Deep Learning.Deep Learning is a new subfield of machine learning that focuses on learning deep hierarchical models of data.It is inspired by the human brain's apparent deep (layered, hierarchical) architecture.A good overview of the theory of Deep Learning theory is[Learning Deep Architectures for AI](http://www.iro.umontreal.ca/~bengioy/papers/ftml_book.pdf)For a more informal introduction, see the following videos by Geoffrey Hinton and Andrew Ng.* [The Next Generation of Neural Networks](http://www.youtube.com/watch?v=AyzOUbkUf3M) (Hinton, 2007)* [Recent Developments in Deep Learning](http://www.youtube.com/watch?v=VdIURAu1-aU) (Hinton, 2010)* [Unsupervised Feature Learning and Deep Learning](http://www.youtube.com/watch?v=ZmNOAtZIgIk) (Ng, 2011)If you use this toolbox in your research please cite [Prediction as a candidate for learning deep hierarchical models of data](http://www2.imm.dtu.dk/pubdb/views/publication_details.php?id=6284)```@MASTERSTHESIS\{IMM2012-06284, author = "R. B. Palm", title = "Prediction as a candidate for learning deep hierarchical models of data", year = "2012",}```Contact: rasmusbergpalm at gmail dot comDirectories included in the toolbox-----------------------------------`NN/` - A library for Feedforward Backpropagation Neural Networks`CNN/` - A library for Convolutional Neural Networks`DBN/` - A library for Deep Belief Networks`SAE/` - A library for Stacked Auto-Encoders`CAE/` - A library for Convolutional Auto-Encoders`util/` - Utility functions used by the libraries`data/` - Data used by the examples`tests/` - unit tests to verify toolbox is workingFor references on each library check REFS.mdSetup-----1. Download.2. addpath(genpath('DeepLearnToolbox'));Example: Deep Belief Network---------------------```matlabfunction test_example_DBNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit RBM and visualize its weightsrand('state',0)dbn.sizes = [100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);figure; visualize(dbn.rbm{1}.W'); % Visualize the RBM weights%% ex2 train a 100-100 hidden unit DBN and use its weights to initialize a NNrand('state',0)%train dbndbn.sizes = [100 100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);%unfold dbn to nnnn = dbnunfoldtonn(dbn, 10);nn.activation_function = 'sigm';%train nnopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.10, 'Too big error');```Example: Stacked Auto-Encoders---------------------```matlabfunction test_example_SAEload mnist_uint8;train_x = double(train_x)/255;test_x = double(test_x)/255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit SDAE and use it to initialize a FFNN% Setup and train a stacked denoising autoencoder (SDAE)rand('state',0)sae = saesetup([784 100]);sae.ae{1}.activation_function = 'sigm';sae.ae{1}.learningRate = 1;sae.ae{1}.inputZeroMaskedFraction = 0.5;opts.numepochs = 1;opts.batchsize = 100;sae = saetrain(sae, train_x, opts);visualize(sae.ae{1}.W{1}(:,2:end)')% Use the SDAE to initialize a FFNNnn = nnsetup([784 100 10]);nn.activation_function = 'sigm';nn.learningRate = 1;nn.W{1} = sae.ae{1}.W{1};% Train the FFNNopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.16, 'Too big error');```Example: Convolutional Neural Nets---------------------```matlabfunction test_example_CNNload mnist_uint8;train_x = double(reshape(train_x',28,28,60000))/255;test_x = double(reshape(test_x',28,28,10000))/255;train_y = double(train_y');test_y = double(test_y');%% ex1 Train a 6c-2s-12c-2s Convolutional neural network %will run 1 epoch in about 200 second and get around 11% error. %With 100 epochs you'll get around 1.2% errorrand('state',0)cnn.layers = { struct('type', 'i') %input layer struct('type', 'c', 'outputmaps', 6, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %sub sampling layer struct('type', 'c', 'outputmaps', 12, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %subsampling layer};cnn = cnnsetup(cnn, train_x, train_y);opts.alpha = 1;opts.batchsize = 50;opts.numepochs = 1;cnn = cnntrain(cnn, train_x, train_y, opts);[er, bad] = cnntest(cnn, test_x, test_y);%plot mean squared errorfigure; plot(cnn.rL);assert(er<0.12, 'Too big error');```Example: Neural Networks---------------------```matlabfunction test_example_NNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);% normalize[train_x, mu, sigma] = zscore(train_x);test_x = normalize(test_x, mu, sigma);%% ex1 vanilla neural netrand('state',0)nn = nnsetup([784 100 10]);opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samples[nn, L] = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.08, 'Too big error');%% ex2 neural net with L2 weight decayrand('state',0)nn = nnsetup([784 100 10]);nn.weightPenaltyL2 = 1e-4; % L2 weight decayopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex3 neural net with dropoutrand('state',0)nn = nnsetup([784 100 10]);nn.dropoutFraction = 0.5; % Dropout fraction opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex4 neural net with sigmoid activation functionrand('state',0)nn = nnsetup([784 100 10]);nn.activation_function = 'sigm'; % Sigmoid activation functionnn.learningRate = 1; % Sigm require a lower learning rateopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex5 plotting functionalityrand('state',0)nn = nnsetup([784 20 10]);opts.numepochs = 5; % Number of full sweeps through datann.output = 'softmax'; % use softmax outputopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex6 neural net with sigmoid activation and plotting of validation and training error% split training data into training and validation datavx = train_x(1:10000,:);tx = train_x(10001:end,:);vy = train_y(1:10000,:);ty = train_y(10001:end,:);rand('state',0)nn = nnsetup([784 20 10]); nn.output = 'softmax'; % use softmax outputopts.numepochs = 5; % Number of full sweeps through dataopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, tx, ty, opts, vx, vy); % nntrain takes validation set as last two arguments (optionally)[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');```[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/rasmusbergpalm/deeplearntoolbox/trend.png)](https://bitdeli.com/free "Bitdeli Badge")

ESB构架的MULE

ESB构架的MULE(声明:本文章来自飞马扬鞭的博客 http://hi.baidu.com/luohuazju,尊重作者的知识产权,向原作者致敬!)mule,就是传说中的一个ESB构架的实现,初步试用了一下,感觉它圈地圈得厉害,把AXIS,XFIRE,POP3,SMTP,SOCKET,HTTP,JMS等通信连接方式都包括进来,可能是为了一些和老系统的接口下载的地址是:http:/

ComingtoExpert的专栏 2036

大中型超市收银系统(可直接运行)

光步前台收银系统系统功能:商品销售、商品退货、挂单、收银员权限、会员销售、单品取消、整单取消、商品查询、脱机销售、脱机数据上传,基本资料下载,开钱箱、小票打印、收款结算,支持多币种付款方式(现金、储值卡、礼券、微信等),支持多种促销。运行环境:.net 4.0登陆信息用户名:1001 密码:123456内置商品信息,商品编码可输入00001000 - 00010000,测试效果相关功能键F5 结算 F9挂单 F11商品查询 F8退货 Insert单品取消 Del整单取消 F12开钱箱F2 会员 Ctrl+Z退出系统 Home 锁屏 相关源码待公开

MULE 配置文件读取和spring bean配置及扫描包

写在前面 Mule很多组件都是需要配置的,往往这些配置信息都需要放在配置文件里面,这样子才方便往后统一管理。Mule是在Spring基础上构建应用程序的,因此很多Spring的用法往往在Mule里面也是类似的。Spring注解的方便性不用说都知道,但是注解需要配合扫描包机制才能使注解正确工作。 在Flow里面读取配置文件属性 (1)properties文件需要放在/src/main/reso...

随风潜入夜,润物细无声。 1845

mule spring

一种简单一些的配置 muleContext.xml web.xml   contextConfigLocation   /WEB-INF/mule-spring-config.xml org.springframework.web.context.ContextLoaderListener     这样spring启动的时候,mule server也

rogerwang0618的专栏 849
上一篇: 索引的原理及索引建立的注意事项
下一篇: Maven2部署构件到Nexus时出现的错误处理
我爱看书
博客等级 码龄18年 0粉丝 5原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值