Issue
I have a spring batch job up and running and tables are created in H2.Few tables are auto generated tables in spring batch like job_instance etc. How can i add a prefix to these auto generated tables using properties file in java code?
nwg.nca.sar.batch.appTablePrefix=SOCA_
Tried using this
and
spring.batch.table-prefix=SOCA_
None of them worked.
Any help appreciated. Thanks
Solution
Are you using Spring Boot? Then it's
spring.batch.jdbc.table-prefix
It used to be spring.batch.table-prefix
up until Spring Boot 2.4.
You can find more information on all the properties in the reference documentation: https://docs.spring.io/spring-boot/docs/2.6.4/reference/html/application-properties.html#application-properties.integration.spring.batch.jdbc.table-prefix
Answered By - Henning
Answer Checked By - Terry (JavaFixing Volunteer)