mule3.4.0 sdtio通过接收控制台信息
?
?
测试代码:
import org.mule.api.MuleContext;import org.mule.api.context.MuleContextFactory;import org.mule.config.spring.SpringXmlConfigurationBuilder;import org.mule.context.DefaultMuleContextFactory;/** * <p> * 1.控制台接收信息 * 2.mule 发送邮件信息 * <p> * * 创建日期 2013-8-20<br> * @author $Author$<br> * @version $Revision$ $Date$ * @since 3.0.0 */public class SendMailMain { public static void main(String[] args) { try { System.setProperty("mule.verbose.exceptions","true"); System.out.println(System.getProperty("java.endorsed.dirs")); String configFile = "mule-stdio-config.xml"; String[] configFileArr = new String[] {configFile }; MuleContextFactory muleContextFactory = new DefaultMuleContextFactory(); MuleContext muleContext = muleContextFactory .createMuleContext(new SpringXmlConfigurationBuilder(configFileArr)); muleContext.start(); } catch (Exception e) { e.printStackTrace(); } }}
?