Spring注入

private static ApplicationContext context = new ClassPathXmlApplicationContext("classpath*:config/spring/appcontext-*.xml");
private static SDKRegisterService sdkRegisterService = (SDKRegisterService)context.getBean("sdkRegisterService");
原文地址:https://www.cnblogs.com/cindy-2014/p/6515503.html