문제

I am working on jhipster Release 0.7.0 and i want to add data in in-memory database.

There is a way to add data using CSV file.

But i need to do it using java so is there any other option to add data in database by using java classes ?

도움이 되었습니까?

해결책

The "normal" way to do it is using Liquibase, using the files in your /src/main/resources/config/liquibase directory.

If you want to do it directly in Java, the easiest way would be to use JPA, using your JPA Repositories. Have a look at the methods provided by Spring Data JPA, if you call one of the sample repositories.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top