Passing argument with spaces to Spring batch CommandLineJobRunner
In configuring the spring batch jobs, I have a need to pass argument to CommandLineJobRunner which have spaces. For example : java -cp "../../myproject.jar" org.springframework.batch.core.launch.
stackoverflow.com
잘못된 예제_
--spring.batch.job.names=insertJob -name=bom kim
위와 같이 파라미터 값에 공백이 발생할 경우, 인자를 2개로 인식하기 때문에 job 파라미터 전체를 ""로 감싸줘야한다.
해결_
--spring.batch.job.names=insertJob "-name=bom kim"