java启动spring容器

package com.usi.jrtx.quartz.job;

import java.io.IOException;

import org.springframework.context.support.ClassPathXmlApplicationContext;

@SuppressWarnings("resource")
public class Start {
	
	public static void main(String[] args) throws IOException{
		ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext(
				new String[] { "classpath:applicationContext.xml" });
		context.start();
		System.out.println("服务启动成功!");
		System.in.read(); // 为保证服务一直开着,利用输入流的阻塞来模拟
	}
	
}

你可能感兴趣的:(java启动spring容器)