/h2-embedded

Embed H2 programmatically with REST API and basic frontend

Primary LanguageJavaGNU General Public License v3.0GPL-3.0

H2Embedded

Embed H2 programmatically with a REST API using SpringBoot and Spring Security

Build h2-embedded Quality Gate Status

H2 Console

The H2 Web Console is available on deployed instance

To login use the ADMIN role credentials found in: org.systemexception.h2embedded.SecurityConfig or use jdbc url and user/password from application.properties

Documentation

Check the bundled documentation

Monitoring

Actuators are deployed (e.g.), verify management.port in application.properties:

Further endpoints: Spring Reference

Usage

Use postman or curl to interact with data, e.g.

curl -i -H "Accept: application/json" -H "Content-Type:application/json" -X POST --data '{"dataValue":"'$data'"}' http://xxx.xxx.xxx.xxx:8080/api/data -u user:password

Additionally a JMeter test plan is available.

Security

Check credentials in org.systemexception.h2embedded.SecurityConfig and add them to your REST utility for basic authentication.

Frontend

A very basic frontend is available

  • to add an item enter the data to be saved and click the + icon
  • to update an item click the value, edit it and click update