简体   繁体   中英

how to assign db script to spring.quartz.jdbc.schema

I am using quartz with spring boot. I want to use own db script to generate quartz tables during startup. I have generated tables_postgresql.sql file and put in src/main/resources. In application.properties, i assign value to
spring.quartz.jdbc.schema = \tables_postgresql.sql.

But it is not being picked up during start up. Can you please help me how to use this sql file during statrt up ?

Regards, Stephan

A bit late, I hope it helps others...
I created the file (that contains the create tables/idx statements):

src/main/resources/quartz.sql

And I configured the application.properties like this:

spring.quartz.jdbc.schema=classpath:quartz.sql

since the file is in the "resources" folder, it should not have a "/" (slash) or blank spaces.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM