Hi,
I have some jobs that run, using Spring's JobDetailBean. I need one of the jobs to read and write files, so I want to load them in using getResourceAsStream, but I am not sure how to provide the context to my JobClass.
Say, in my applicationContext.xml file, I have this:
Can I, in my code, somehow get that file, via the application context?Code:<bean..... <property name="jobDataAsMap"> <map> <entry key="logFileLocation"><value>classpath:resources/logarchive.txt</value></entry> ....
Code:context = new StaticWebApplicationContext(); Resource r = context.getResource(logFileLocation);


Reply With Quote