Question

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 ?

Was it helpful?

Solution

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top