Spring boot spring.batch.job.enabled=false not able to recognize

前端 未结 2 1206
爱一瞬间的悲伤
爱一瞬间的悲伤 2021-01-13 23:02

I tried spring.batch.job.enabled=false in application.properties and -Dspring.batch.job.enabled=false when running the jar file.

However

2条回答
  •  灰色年华
    2021-01-13 23:55

    I also faced the same issue, the property 'spring.batch.job.enabled=false' was not recognising at start up when we give this in properties file. It could be because the properties might not have loaded into context before the batch initiated.

    So i have set the property 'spring.batch.job.enabled=false' in standalone.xml as a system property like below.

      
              
      
    

    With this it SUCCESSFULLY worked & the spring batch jobs did not initialised on server start up.

    Please note that the system-properties must be placed right after the extensions tag in standalone.xml.

提交回复
热议问题