Component Catalog

Undertow

Undertow component provides the feature of a web server without depending on Servlet.

Usage

<dependency>
  <groupId>net.unit8.enkan</groupId>
  <artifactId>enkan-component-undertow</artifactId>
</dependency>

Properties

NameTypeDescriptionDefault
portintListen port80
hostStringHost address0.0.0.0
sslbooleanEnable SSL/TLSfalse
sslPortintSSL listen port443
keystorePathStringPath to keystore file-
keystorePasswordStringPassword for keystore-

Dependencies

  • ApplicationComponent

Jetty

Jetty component provides the feature of a web server based on Eclipse Jetty.

Usage

<dependency>
  <groupId>net.unit8.enkan</groupId>
  <artifactId>enkan-component-jetty</artifactId>
</dependency>

Properties

NameTypeDescriptionDefault
portintListen port80
hostStringHost address0.0.0.0
sslbooleanEnable SSL/TLSfalse
sslPortintSSL listen port443
keystorePathStringPath to keystore file-
keystorePasswordStringPassword for keystore-

Dependencies

  • ApplicationComponent

HikariCP

HikariCP component provides a high-performance JDBC connection pool.

Usage

<dependency>
  <groupId>net.unit8.enkan</groupId>
  <artifactId>enkan-component-HikariCP</artifactId>
</dependency>

Properties

Properties are passed via OptionMap in the constructor.

NameKey in OptionMapDescription
jdbcUrluriJDBC connection URL
usernameusernameDatabase username
passwordpasswordDatabase password
autoCommitautoCommit?Enable auto-commit
connectionTimeoutconnTimeoutConnection timeout in ms
idleTimeoutidleTimeoutIdle timeout in ms
maxPoolSizemaxPoolSizeMaximum pool size
minimumIdleminIdleMinimum idle connections

Doma2

Doma2 component provides the DAO-oriented database mapping framework.

Usage

<dependency>
  <groupId>net.unit8.enkan</groupId>
  <artifactId>enkan-component-doma2</artifactId>
</dependency>

Properties

NameTypeDescriptionDefault
dialectDialectSQL dialectStandardDialect
namingNamingNaming conventionNaming.DEFAULT
useLocalTransactionbooleanEnable local transactionstrue
maxRowsintMaximum result rows0
fetchSizeintFetch size for queries0
queryTimeoutintQuery timeout in seconds0
batchSizeintBatch size for operations0

Dependencies

  • DataSourceComponent

jOOQ

jOOQ component provides a DSL context for building type-safe SQL queries.

Usage

<dependency>
  <groupId>net.unit8.enkan</groupId>
  <artifactId>enkan-component-jooq</artifactId>
</dependency>

Dependencies

  • DataSourceComponent

JPA

JPA component provides a base for JPA entity manager integration.

Usage

<dependency>
  <groupId>net.unit8.enkan</groupId>
  <artifactId>enkan-component-jpa</artifactId>
</dependency>

Properties

NameTypeDescription
nameStringJPA persistence unit name
jpaPropertiesMapJPA configuration properties

EclipseLink

EclipseLink component provides an EntityManagerProvider implementation using EclipseLink.

Usage

<dependency>
  <groupId>net.unit8.enkan</groupId>
  <artifactId>enkan-component-eclipselink</artifactId>
</dependency>

Properties

NameTypeDescriptionDefault
sqlLogLevelStringLogging level for SQLFINE
managedClassesListEntity classes (via registerClass)[]

Dependencies

  • DataSourceComponent

Flyway

Flyway component provides automatic database migration on startup.

Usage

<dependency>
  <groupId>net.unit8.enkan</groupId>
  <artifactId>enkan-component-flyway</artifactId>
</dependency>

Properties

NameTypeDescriptionDefault
locationsString[]Migration script locations-
tableStringMigration metadata table nameschema_version
cleanBeforeMigrationbooleanClean database before migrationfalse

Dependencies

  • DataSourceComponent

Freemarker

Freemarker component provides a template engine for rendering HTML.

Usage

<dependency>
  <groupId>net.unit8.enkan</groupId>
  <artifactId>enkan-component-freemarker</artifactId>
</dependency>

Properties

NameTypeDescriptionDefault
prefixStringTemplate directory prefixtemplates
suffixStringTemplate file suffix.ftl
encodingStringFile encodingUTF-8

Thymeleaf

Thymeleaf component provides a template engine for rendering HTML.

Usage

<dependency>
  <groupId>net.unit8.enkan</groupId>
  <artifactId>enkan-component-thymeleaf</artifactId>
</dependency>

Properties

NameTypeDescriptionDefault
prefixStringTemplate directory prefixtemplates/
suffixStringTemplate file suffix.html
encodingStringFile encodingUTF-8

Jackson

Jackson component provides a bean converter using Jackson ObjectMapper.

Usage

<dependency>
  <groupId>net.unit8.enkan</groupId>
  <artifactId>enkan-component-jackson</artifactId>
</dependency>

S2UtilBeans

S2UtilBeans component provides a bean converter using S2 Util Beans.

Usage

<dependency>
  <groupId>net.unit8.enkan</groupId>
  <artifactId>enkan-component-s2util-beans</artifactId>
</dependency>

Metrics

Metrics component provides the feature of collecting application metrics using Dropwizard Metrics.

Usage

<dependency>
  <groupId>net.unit8.enkan</groupId>
  <artifactId>enkan-component-metrics</artifactId>
</dependency>

Properties

NameTypeDescriptionDefault
metricNameStringBase metric name prefixenkan