JSR310(Date and Time API)Adapter

Table of contents

Provides an adapter to enable date and time details in JSR310 (Date and Time API). By using this adapter, JSR310 (Date and Time API) can be used with BeanUtil .

Important

The types supported by this adapter are as follows. Add the converter to the project for handling other types.

Module list

<!-- JSR310 adapter -->
<dependency>
  <groupId>com.nablarch.integration</groupId>
  <artifactId>nablarch-jsr310-adaptor</artifactId>
</dependency>

How to use

For details such as conversion possible types and conversion rules, see converter list.

Configuration

This function is enabled by adding the following to the component configuration file of System Repository .

<import file="JSR310.xml" />

Tip

The following work is required to change the format when converting from a string.

Create a class with a definition such as format
Add implementation class of DateTimeConfiguration and define the format of date and time. Referring to BasicDateTimeConfiguration is good.
Define the class that is added in the component configuration file

Define the component with the component name as dateTimeConfiguration.

An example is shown below.

<component name="dateTimeConfiguration" class="sample.SampleDateTimeConfiguration" />