• 如果您觉得本站非常有看点,那么赶紧使用Ctrl+D 收藏吧

Java FileSystemXmlApplicationContext类的典型用法和代码示例

java 1次浏览

本文整理汇总了Java中org.apache.xbean.spring.context.FileSystemXmlApplicationContext的典型用法代码示例。如果您正苦于以下问题:Java FileSystemXmlApplicationContext类的具体用法?Java FileSystemXmlApplicationContext怎么用?Java FileSystemXmlApplicationContext使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。

FileSystemXmlApplicationContext类属于org.apache.xbean.spring.context包,在下文中一共展示了FileSystemXmlApplicationContext类的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: main

点赞 3

import org.apache.xbean.spring.context.FileSystemXmlApplicationContext; //导入依赖的package包/类
public static void main(String[] args) 
{
	ReportUser user = new ReportUser();
	user.setName(args[0]);
	user.setPassword(args[1]);
	user.setEmail(args[2]);
	user.setRootAdmin(true);
	
	try 
	{
		FileSystemXmlApplicationContext appContext = new FileSystemXmlApplicationContext(
				"database/spring/applicationContext.xml");

		UserProvider userProvider = (UserProvider) appContext.getBean("userProvider", UserProvider.class);
		userProvider.insertUser(user);			
	} 
	catch (Exception e) 
	{
		e.printStackTrace();
	}
}
 

开发者ID:mtpettyp,
项目名称:openreports,
代码行数:22,
代码来源:AdminUserCreator.java

示例2: main

点赞 3

import org.apache.xbean.spring.context.FileSystemXmlApplicationContext; //导入依赖的package包/类
public static void main(String... args) throws Exception {
    if (args.length == 0) {
     System.err.println("Please define a configuration file!");
     return;
    }
    String config = args[0];
    System.out.println("Starting broker with the following configuration: " + config);
    System.setProperty("activemq.base", System.getProperty("user.dir"));
    
    FileSystemXmlApplicationContext context = new FileSystemXmlApplicationContext(config);             
 
    Publisher publisher = new Publisher();
    for (int i = 0; i < 100; i++) {                                 
      publisher.sendMessage(new String[]{"JAVA", "IONA"});               
    }                                                                    
 
}
 

开发者ID:xuzhikethinker,
项目名称:t4f-data,
代码行数:18,
代码来源:XBeanBroker.java

示例3: main

点赞 2

import org.apache.xbean.spring.context.FileSystemXmlApplicationContext; //导入依赖的package包/类
public static void main(String[] args)
{
	FileSystemXmlApplicationContext appContext = new FileSystemXmlApplicationContext(
		"database/spring/applicationContext.xml");

	LocalSessionFactoryBean sessionFactory = (LocalSessionFactoryBean) appContext
		.getBean("&sessionFactory", LocalSessionFactoryBean.class);

	sessionFactory.createDatabaseSchema();
}
 

开发者ID:mtpettyp,
项目名称:openreports,
代码行数:11,
代码来源:SchemaExporter.java

示例4: main

点赞 2

import org.apache.xbean.spring.context.FileSystemXmlApplicationContext; //导入依赖的package包/类
public static void main(String[] args)
{
	FileSystemXmlApplicationContext appContext = new FileSystemXmlApplicationContext(
			"database/spring/applicationContext.xml");
	
	LocalSessionFactoryBean sessionFactory = (LocalSessionFactoryBean) appContext
			.getBean("&sessionFactory", LocalSessionFactoryBean.class);
	
	sessionFactory.updateDatabaseSchema();	
}
 

开发者ID:mtpettyp,
项目名称:openreports,
代码行数:11,
代码来源:SchemaUpdater.java

示例5: startServiceMix

点赞 2

import org.apache.xbean.spring.context.FileSystemXmlApplicationContext; //导入依赖的package包/类
private void startServiceMix() throws MojoExecutionException {
    ClassLoader old = Thread.currentThread().getContextClassLoader();
    try {
        Thread.currentThread().setContextClassLoader(getClassLoader());
        context = new FileSystemXmlApplicationContext("file:///"
                + servicemixConfig.getAbsolutePath());
        context.getBean("jbi");
    } catch (Exception e) {
        throw new MojoExecutionException(
                "Unable to start the ServiceMix container", e);
    } finally {
        Thread.currentThread().setContextClassLoader(old);
    }
}
 

开发者ID:hitakaken,
项目名称:bigfoot-maven-plugins,
代码行数:15,
代码来源:ServiceMixEmbeddedMojo.java

示例6: main

点赞 2

import org.apache.xbean.spring.context.FileSystemXmlApplicationContext; //导入依赖的package包/类
public static void main(String... args) throws Exception {
	BrokerService broker = new BrokerService();
	broker.addConnector("tcp://localhost:61616");
	broker.setPersistent(false);
	broker.start();
	
	FileSystemXmlApplicationContext context = new FileSystemXmlApplicationContext("src/main/resources/org/apache/activemq/book/ch7/spring-client.xml");
	SpringPublisher publisher = (SpringPublisher)context.getBean("stockPublisher");
	publisher.start();
}
 

开发者ID:xuzhikethinker,
项目名称:t4f-data,
代码行数:11,
代码来源:SpringClient.java

示例7: getContext

点赞 2

import org.apache.xbean.spring.context.FileSystemXmlApplicationContext; //导入依赖的package包/类
public ApplicationContext getContext() {
	String[] CONTEXT_CONFIG_LOCATION = {"src/main/webapp/WEB-INF/action-servlet.xml"};
	ApplicationContext context = new FileSystemXmlApplicationContext(CONTEXT_CONFIG_LOCATION);
	return context;
}
 

开发者ID:darciopacifico,
项目名称:omr,
代码行数:6,
代码来源:DownloadArquivoServlet.java


版权声明:本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系管理员进行删除。
喜欢 (0)