How can I execute methods of a service created with the generator of MyEclipse Spring Batch?
Thanks for any help.
Below is an example of what I would do.
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.FileSystemXmlApplicationContext;
import org.springframework.test.context.ContextConfiguration;
public class Teste {
/**
* @param args
*/
public static void main(String[] args) {
String[] files = {“file:./resources/test-security-context.xml”,”file:./resources/test-service-context.xml”,
“file:./resources/test-dao-context.xml”,
“file:./resources/test-web-context.xml”};
ApplicationContext cxt = new FileSystemXmlApplicationContext(files);
EstadoCivilService ec = (EstadoCivilService) cxt.getBean(“EstadoCivilService”);
ec.loadEstadoCivils();
}
}