Package org.soybeanMilk.core.config

Examples of org.soybeanMilk.core.config.Configuration


   * 创建空的配置对象,用于从配置文件解析并设置其属性
   * @return
   */
  protected Configuration createConfigurationInstance()
  {
    return new Configuration();
  }
View Full Code Here


  @Before
  public void setUp()
  {
    try
    {
      Configuration cfg=new ConfigurationParser().parse("org/soybeanMilk/test/unit/core/TestDefaultExecutor.cfg.xml");
      executor=new DefaultExecutor(cfg);
    }
    catch(Exception e)
    {
      log.error("",e);
View Full Code Here

public class ExampleConfigFile
{
  public static void main(String[] args) throws Exception
  {
    Configuration cfg=new ConfigurationParser().parse(
        "example/"+Constants.DEFAULT_CONFIG_FILE);
   
    Executor executor=new DefaultExecutor(cfg);
   
    ConvertableObjectSource os = new HashMapObjectSource();
View Full Code Here

public class ExampleMain
{
  public static void main(String[] args) throws Exception
  {
    Configuration cfg=new ConfigurationParser().parse(
        "example/"+Constants.DEFAULT_CONFIG_FILE);
   
    Executor executor=new DefaultExecutor(cfg);
   
    ConvertableObjectSource os = new HashMapObjectSource();
View Full Code Here

*/
public class ExampleMain
{
  public static void main(String[] args) throws Exception
  {
    Configuration cfg=new ConfigurationParser().parse(
        "org/soybeanMilk/example/"+Constants.DEFAULT_CONFIG_FILE);
   
    DefaultResolverObjectFactory drof=(DefaultResolverObjectFactory)cfg.getResolverObjectFactory();
    drof.setExternalResolverObjectFactory(new SpringBeanFactory());
   
    Executor executor=new DefaultExecutor(cfg);
   
    ObjectSource os = new HashMapObjectSource();
View Full Code Here

    //定义解决对象工厂
    DefaultResolverFactory rf=new DefaultResolverFactory();
    rf.addResolver(resolverId, new HelloResolver());
   
    //创建配置
    Configuration cfg=new Configuration(rf);
   
    //创建动作
    Action action=new Action(actionName);
   
    {
      Invoke invoke=new Invoke(
          null,
          "hello",
          new Arg[]{new Arg(argKey_hello_to), new Arg(argKey_hello_repeat)},
          resultKey_hello,
          new FactoryResolverProvider(rf, resolverId));
     
      action.addExecutable(invoke);
    }
    {
      Invoke invoke=new Invoke(
          null,
          "printObject",
          new Arg[]{new Arg(resultKey_hello)},
          null,
          HelloResolver.class);
     
      action.addExecutable(invoke);
    }
   
    cfg.addExecutable(action);
   
    //创建执行器
    Executor executor=new DefaultExecutor(cfg);
   
    ConvertableObjectSource os = new HashMapObjectSource(new DefaultGenericConverter());
View Full Code Here

public class ExampleConfigFile
{
  public static void main(String[] args) throws Exception
  {
    Configuration cfg=new ConfigurationParser().parse(
        "example/"+Constants.DEFAULT_CONFIG_FILE);
   
    Executor executor=new DefaultExecutor(cfg);
   
    ConvertableObjectSource os = new HashMapObjectSource();
View Full Code Here

  @Before
  public void setUp() throws Exception
  {
    try
    {
      Configuration cfg=new ConfigurationParser().parse("org/soybeanMilk/test/unit/core/TestInvoke.cfg.xml");
      executor=new DefaultExecutor(cfg);
    }
    catch(Exception e)
    {
      log.error("",e);
View Full Code Here

public class ExampleConfigFile
{
  public static void main(String[] args) throws Exception
  {
    Configuration cfg=new ConfigurationParser().parse("example/"+Constants.DEFAULT_CONFIG_FILE);
   
    Executor executor=new DefaultExecutor(cfg);
   
    ConvertableObjectSource os = new HashMapObjectSource();
   
View Full Code Here

TOP

Related Classes of org.soybeanMilk.core.config.Configuration

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.