Main quartz and other independent spring framework use springbean

In order to obtain the context, injection, etc. of the following series of spring beans, first of all, the first source should come from the container of sping. In main or quart and other frameworks independent of spring, it needs to be used in a suitable source,
similar to this Get the first one, and then based on this, there will be a series of downstream ico, di, you cannot get the spring context bean from the new object (http://www.blogjava.net/wmcoo/articles/334044.html)
ApplicationContext context = new ClassPathXmlApplicationContext("classpath:weblogicContext.xml");

PaymentForSercviceVS h=(PaymentForSercviceVS)context.getBean("paymentForServiceVS");
Annotation injection, constructor injection requires get set method



to get spring bean
http://www.blogjava.net/ wmcoo/articles/334044.html

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326930410&siteId=291194637