- 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(); // 为保证服务一直开着,利用输入流的阻塞来模拟
- }
- }
Mian加载spring容器
最新推荐文章于 2022-12-10 01:13:43 发布