solved it like this:
private ContentManager contentManager;
private static String[] getConfigLocations() {
return new String[] {
"classpath:/applicationContext-resources.xml",
"classpath:/applicationContext-dao.xml",
"classpath:/applicationContext-service.xml",
"classpath:/applicationContext.xml" };
}
public static void main(String[] args) {
ApplicationContext context = new
ClassPathXmlApplicationContext(getConfigLocations());
BeanFactory factory = context;
CustomerInformationReader ciReader = new
CustomerInformationReader();
ciReader.setContentManager((ContentManager)
factory.getBean("contentManager"));
}
public void setContentManager(ContentManager contentManager) {
this.contentManager = contentManager;
}
[email protected] wrote:
>
> Is it possible to add a main method entry point to a
> struts/spring/hibernate project?
> so i can make an commandline version?
>
> i need to read a file into the database every 24 hours and would like
> to reuse all the code.
>
>
>
> thanks,
>
> tibi
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]