I have worked on a project using spring-batch and spring-boot.
I followed the exact rules how to integrate it by: 1. removing all @EnableBatchProcessing 2. adding Se
You can override spring-batch-admin
default context loading configuration. In src/main/resources/META-INF/spring/batch/override/manager/
you can place env-context.xml
file with configuration of resources which need to be loaded.
Here is spring batch admin one which can be used as starting point so you can do something like:
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
<!-- Use this to set additional properties on beans at run time -->
<bean id="placeholderProperties" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
<property name="locations">
<list>
<value>classpath:/org/springframework/batch/admin/bootstrap/batch.properties</value>
<value>classpath:batch-default.properties</value>
<value>classpath:batch-${ENVIRONMENT:hsql}.properties</value>
<!-- this line you can add-->
<value>file:///etc/location/services/myapp.properties</value>
</list>
</property>
<property name="systemPropertiesModeName" value="SYSTEM_PROPERTIES_MODE_OVERRIDE" />
<property name="ignoreResourceNotFound" value="true" />
<property name="ignoreUnresolvablePlaceholders" value="false" />
<property name="order" value="1" />
</bean>
</beans>
I forked the github project and I added the fix to prevent the placeholder error. You can get the new code here: https://github.com/vesperaba/spring-batch-admin-spring-boot.
The issue was SpringBatch has it's own PropertyPlaceholder and you have to overwrite it but to do that you have to manually import some files in order to avoid the one define it.
Here you can find the new conf: https://github.com/vesperaba/spring-batch-admin-spring-boot/blob/master/src/main/java/de/codecentric/batch/config/MainV2Configuration.java