I have a project with spring, hibernate and flyway to create a database schema. So i
spring.jpa.hibernate.ddl-auto: validate
in my application.properties file. This configuration works during normal startup (after packing the executable jar file and launching it from the terminal):
2014-10-06 10:06:17.863 INFO 7519 --- [ main] ohtool.hbm2ddl.SchemaValidator : HHH000229: Running schema validator
but when running tests through maven it is ignored.
1804 [main] INFO ohtool.hbm2ddl.SchemaExport - HHH000227: Running hbm2ddl schema export 1805 [main] DEBUG org.hibernate.SQL - drop table test_entity if exists 1806 [main] DEBUG org.hibernate.SQL - drop sequence hibernate_sequence 1807 [main] DEBUG org.hibernate.SQL - create table test_entity (id bigint not null, name varchar(255), primary key (id)) 1807 [main] DEBUG org.hibernate.SQL - create sequence hibernate_sequence 1808 [main] INFO ohtool.hbm2ddl.SchemaExport - HHH000230: Schema export complete
The main difference from the official flyout seems to be that I don't use spring-boot provided by maven-parent.
Full project here
source share