I worked on a project using spring-batch and spring-boot.
I followed the exact rules for how to integrate it: 1. removing all @EnableBatchProcessing 2. adding ServletConfiguration and WebappConfiguration (as well as importing them using
@Import({ ServletConfiguration.class, WebappConfiguration.class })
add details:
batch-mysql.properties
MySQL business diagrams
and modified application.properties with:
server.servletPath=/*
spring.freemarker.checkTemplateLocation=false
ENVIRONMENT=mysql
Now here is a side effect. My application uses applicationContext.xml in addition to it java config.
that applicationContext has some placeholders:
<context:property-placeholder
location="file:///etc/location/services/myapp.properties"/>
<bean name="configuration" class="com.mycompany.commons.configuration.factory.BeanAwareConfigurationFactory">
<property name="serviceId" value="${serviceId}"/>
...
</bean>
As soon as I turned on spring-batch-admin, I got this error:
Caused by: java.lang.IllegalArgumentException: Could not resolve placeholder 'serviceId' in string value "${serviceId}"
at
...
I tried @PropertySource to import it, but it did not work:
@PropertySource("file:///etc/location/services/myapp.properties")
public class Application extends SpringBootServletInitializer {
public static void main(String[] args) {
SpringApplication.run(Application.class, args);
System.out.printf("Started processor service app");
}
spring-batch-admin spring-boot, .
, ?