load external config file in spring batch admin

前端 未结 3 989
暗喜
暗喜 2021-01-07 10:20

I downloaded the spring batch admin application in the github repo and I imported it in eclipse. it works perfectly.

Then, I asked myself how to import an external c

3条回答
  •  囚心锁ツ
    2021-01-07 10:30

    Spring batch admin searches configurations in specific paths.This page explains from which paths it loads resources:

    
    
    

    Note that the "override" location has no files in it in Spring Batch Admin distribution. This is a placeholder for users to add their own content.

    We managed to load external properties files placing xml configuration file under src/main/resources/META-INF/spring/batch/override/manager/env-context.xml which looks like this:

    
    
    
        
        
            
                
                    classpath:/org/springframework/batch/admin/bootstrap/batch.properties
                    classpath:batch-default.properties
                    classpath:batch-${ENVIRONMENT:hsql}.properties
                    classpath:batch-${ENVIRONMENT:mysql}.properties
                    
                    file:${spring.file.location}
                 
            
            
            
            
            
        
    
    

提交回复
热议问题