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.
Uses virtual threads by default for high-throughput request handling.

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-
virtualThreadsbooleanUse virtual threads for request handlingtrue

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>

Properties

Name Type Description Default
dialect SQLDialect SQL dialect DEFAULT

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>

Micrometer

Micrometer component provides application metrics via the Micrometer facade.
Supports Prometheus, Datadog, CloudWatch, and other backends via pluggable MeterRegistry.

Usage

<dependency>
  <groupId>net.unit8.enkan</groupId>
  <artifactId>enkan-component-micrometer</artifactId>
</dependency>
// Default (SimpleMeterRegistry — suitable for development and REPL inspection)
MicrometerComponent micrometer = new MicrometerComponent();

// With Prometheus registry for production
MicrometerComponent micrometer = new MicrometerComponent(new PrometheusMeterRegistry(...));

Properties

Name Type Description Default
metricPrefix String Prefix for all meter names enkan

Tracked Metrics

  • {prefix}.http.server.requests — request duration (Timer)
  • {prefix}.http.server.errors — error count (Counter)
  • {prefix}.http.server.active.requests — in-flight request count (Gauge)

Dependencies

  • None (standalone component; inject into MicrometerMiddleware via the system)

Metrics (Deprecated)

Deprecated: Use enkan-component-micrometer instead. This module will be removed in a future major release.

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

OpenTelemetry

OpenTelemetry component wraps an OpenTelemetry instance and exposes a Tracer for use by TracingMiddleware.
Defaults to OpenTelemetry.noop() — no spans are emitted unless an SDK is configured at runtime
(e.g. via the OpenTelemetry Java Agent or an explicit SDK setup).

Usage

<dependency>
  <groupId>net.unit8.enkan</groupId>
  <artifactId>enkan-component-opentelemetry</artifactId>
</dependency>
// No-op (default) — suitable for development
OpenTelemetryComponent otel = new OpenTelemetryComponent();

// With a configured SDK instance
OpenTelemetryComponent otel = new OpenTelemetryComponent(GlobalOpenTelemetry.get());

Properties

Name Type Description Default
openTelemetry OpenTelemetry OpenTelemetry instance OpenTelemetry.noop()
instrumentationName String Tracer / instrumentation scope name "enkan"