Can't Import properties after integrating spring-batch-admin into existed spring boot

后端 未结 2 1926
小鲜肉
小鲜肉 2021-01-13 14:18

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

2条回答
  •  [愿得一人]
    2021-01-13 14:50

    You can override spring-batch-admindefault 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:

    
    
    
        
        
            
                
                    classpath:/org/springframework/batch/admin/bootstrap/batch.properties
                    classpath:batch-default.properties
                    classpath:batch-${ENVIRONMENT:hsql}.properties
                    
                    file:///etc/location/services/myapp.properties  
                
            
            
            
            
            
        
    
    
    

提交回复
热议问题