-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: execute sql file on server startup
PostPosted: Fri Aug 05, 2016 9:42 am 
Newbie

Joined: Fri Aug 05, 2016 9:36 am
Posts: 1
according to spring documentation http://docs.spring.io/spring-boot/docs/current/reference/html/howto-database-initialization.html
import.sql file should be executed on starup, however it is not in my case.
This is how my project catalog lookslike
Image

and this is my application.properties:
Code:
spring.datasource.driver-class-name=oracle.jdbc.driver.OracleDriver
spring.jpa.hibernate.ddl-auto="none"
spring.jpa.properties.hibernate.globally_quoted_identifiers=true
spring.jpa.database-platform=org.hibernate.dialect.Oracle10gDialect
spring.jpa.show-sql=true


What am i doing wrong?


Top
 Profile  
 
 Post subject: Re: execute sql file on server startup
PostPosted: Fri Aug 05, 2016 3:57 pm 
Hibernate Team
Hibernate Team

Joined: Thu Sep 11, 2014 2:50 am
Posts: 1628
Location: Romania
Try with:

Code:
spring.jpa.hibernate.hbm2ddl.import_files="my-script.sql"


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.