[英]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.
我已经生成了 tables_postgresql.sql 文件并放入了 src/main/resources。 In application.properties, i assign value to
在 application.properties 中,我将值分配给
spring.quartz.jdbc.schema = \tables_postgresql.sql. 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 ?
你能帮我在 statrt up 期间如何使用这个 sql 文件吗?
Regards, Stephan问候,斯蒂芬
A bit late, I hope it helps others...有点晚了,我希望它可以帮助别人......
I created the file (that contains the create tables/idx statements):我创建了文件(包含创建表/idx 语句):
src/main/resources/quartz.sql
And I configured the application.properties
like this:我像这样配置了
application.properties
:
spring.quartz.jdbc.schema=classpath:quartz.sql
since the file is in the "resources" folder, it should not have a "/" (slash) or blank spaces.由于该文件位于“resources”文件夹中,因此不应包含“/”(斜杠)或空格。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.