Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/arun-gupta/spring-hibernate-hsql

Spring Boot application using Hibernate with in-memory HSQL database
https://github.com/arun-gupta/spring-hibernate-hsql

database hibernate java maven spring spring-boot

Last synced: about 2 months ago
JSON representation

Spring Boot application using Hibernate with in-memory HSQL database

Awesome Lists containing this project

README

        

= Spring Boot + Hibernate + H2 In-memory Database on Java 9

== Run the application

. Run the application:
+
```
mvn spring-boot:run
```
+
. Package the JAR:
+
```
mvn package
```

== Create employees

```
curl -X POST -H "Content-Type: text/plain" -d "Leonard" http://localhost:8080
{"id":"1","status":"success"}
```

== Get employees

```
curl http://localhost:8080/1
```

== Check in HSQLDB

. Connect using http://localhost:8080/console
. Use JDBC URL `jdbc:h2:mem:app_db`
. Run the query `SELECT * FROM EMPLOYEE`