Apart from standard spring bootdependencies, you need to include hyperon-runtime-spring-boot-starter dependency, available in Maven Central.
Add hyperon-runtime-spring-boot-starter dependency to pom.xml file:
Another needed dependency is the JDBC driver to the database of choice, e.g., h2, oracle, mssql, postgresql:
With the above setup, all the configuration that is needed is application.properties file with database properties:
By default, by including hyperon-runtime-spring-boot-starter Spring Boot with try to auto-configure HyperonEngine component using previously supplied database properties failing with adequate message if properties are not available.
After successfully configuring properties while starting the application, spring will create HyperonEngine bean available in the spring application context, which can then be injected anywhere:
To override default auto-configuration, you need to define HyperonEngine bean in the @Configuration class:
Existing auto-configured DataSource and HyperonRuntimeProperties can be used simply by injecting them:
If you want to disable hyperon temporarily for some reason, you can do it with property hyperon.runtime.enabled set to false: