0
spring.datasource.data=classpath:/schema.sql
#spring.jpa.properties.hibernate.hbm2ddl.import_files=schema.sql

what's the difference between those 2? first one doesn't work on my project, but the other one works.

But, if i create new data(article), it errors out with id overlap msg. for example, schema.sql has 6 data(id 1~6), when I create new article, error says id 1 already exists. ID supposed to be 7...

and I'm already using these properties for unique data

spring.jpa.defer-datasource-initialization= true
spring.datasource.generate-unique-name=true</code>


and also my dto ID value strategy is set as below
 @Column
    @Id
    @GeneratedValue(strategy= GenerationType.IDENTITY)
    private Long id;

    @Column
    private String title;
    @Column
     private String content;
Samuel Yoo
  • 21
  • 2

0 Answers0