List of usage examples for org.springframework.batch.core.jsr.configuration.xml JsrXmlApplicationContext JsrXmlApplicationContext
public JsrXmlApplicationContext()
Create a new context instance with no job parameters.
From source file:org.springframework.batch.core.jsr.configuration.xml.JsrBeanDefinitionDocumentReaderTests.java
@Test public void testGetJobProperties() { Document document = getDocument("/META-INF/batch-jobs/jsrPropertyPreparseTestJob.xml"); @SuppressWarnings("resource") JsrXmlApplicationContext applicationContext = new JsrXmlApplicationContext(); JsrBeanDefinitionDocumentReader documentReader = new JsrBeanDefinitionDocumentReader(applicationContext); documentReader.initProperties(document.getDocumentElement()); Properties documentJobProperties = documentReader.getJobProperties(); assertNotNull(documentJobProperties); assertTrue("Wrong number of job properties", documentJobProperties.size() == 3); assertEquals("jobProperty1Value", documentJobProperties.getProperty("jobProperty1")); assertEquals("jobProperty1Value", documentJobProperties.getProperty("jobProperty2")); assertEquals("", documentJobProperties.getProperty("jobProperty3")); }