Package io.nflow.engine.config.db
Class H2DatabaseConfiguration
- java.lang.Object
-
- io.nflow.engine.config.db.DatabaseConfiguration
-
- io.nflow.engine.config.db.H2DatabaseConfiguration
-
@Profile("nflow.db.h2") @Configuration public class H2DatabaseConfiguration extends DatabaseConfiguration
Configuration for H2 database.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classH2DatabaseConfiguration.H2SQLVariantsSQL variants optimized for H2.
-
Field Summary
-
Fields inherited from class io.nflow.engine.config.db.DatabaseConfiguration
NFLOW_DATABASE_INITIALIZER
-
-
Constructor Summary
Constructors Constructor Description H2DatabaseConfiguration()Create a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.h2.tools.Serverh2ConsoleServer(Environment env)Creates a console server for connecting to the in-memory database.org.h2.tools.Serverh2TcpServer(Environment env)Creates a server for connecting to the in-memory database.SQLVariantssqlVariants(Environment env)Creates the SQL variants for the database.-
Methods inherited from class io.nflow.engine.config.db.DatabaseConfiguration
checkDatabaseConfiguration, nflowDatabaseInitializer, nflowDatasource, nflowDatasource, nflowJdbcTemplate, nflowNamedParameterJdbcTemplate, nflowTransactionTemplate, property, property
-
-
-
-
Method Detail
-
h2TcpServer
@Bean(initMethod="start", destroyMethod="stop") public org.h2.tools.Server h2TcpServer(Environment env) throws SQLException
Creates a server for connecting to the in-memory database.- Parameters:
env- The Spring environemnt for getting the configuration properties.- Returns:
- A TCP server.
- Throws:
SQLException- If H2 server could not start
-
h2ConsoleServer
@Bean(initMethod="start", destroyMethod="stop") public org.h2.tools.Server h2ConsoleServer(Environment env) throws SQLException
Creates a console server for connecting to the in-memory database.- Parameters:
env- The Spring environemnt for getting the configuration properties.- Returns:
- A TCP server.
- Throws:
SQLException- If H2 server could not start
-
sqlVariants
@Bean public SQLVariants sqlVariants(Environment env)
Creates the SQL variants for the database.- Specified by:
sqlVariantsin classDatabaseConfiguration- Parameters:
env- The Spring environment.- Returns:
- SQL variants optimized for the database.
-
-