https://github.com/mybatis/typehandlers-threeten-extra
MyBatis type handlers for ThreeTen Extra (http://www.threeten.org/threeten-extra/)
https://github.com/mybatis/typehandlers-threeten-extra
java
Last synced: about 1 year ago
JSON representation
MyBatis type handlers for ThreeTen Extra (http://www.threeten.org/threeten-extra/)
- Host: GitHub
- URL: https://github.com/mybatis/typehandlers-threeten-extra
- Owner: mybatis
- License: apache-2.0
- Created: 2017-03-03T14:34:53.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2025-04-13T00:28:05.000Z (about 1 year ago)
- Last Synced: 2025-04-13T01:25:51.235Z (about 1 year ago)
- Topics: java
- Language: Java
- Size: 1.04 MB
- Stars: 6
- Watchers: 9
- Forks: 5
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# MyBatis Type Handlers for ThreeTen-Extra
[](https://github.com/mybatis/typehandlers-threeten-extra/actions/workflows/ci.yaml)
[](https://coveralls.io/github/mybatis/typehandlers-threeten-extra?branch=master)
[](https://maven-badges.herokuapp.com/maven-central/org.mybatis/mybatis-typehandlers-threeten-extra)
[](https://oss.sonatype.org/content/repositories/snapshots/org/mybatis/mybatis-typehandlers-threeten-extra/)
[](https://www.apache.org/licenses/LICENSE-2.0.html)

The MyBatis type handlers supporting types of [ThreeTen-Extra](https://www.threeten.org/threeten-extra/).
## Installation
If you are using Maven add the following dependency to your `pom.xml`:
```xml
org.mybatis
mybatis-typehandlers-threeten-extra
1.0.0
```
If you are using Gradle add the following dependency to your `build.gradle`:
```groovy
compile("org.mybatis:mybatis-typehandlers-threeten-extra:1.0.0")
```
## Configuration
Add following configuration to your `mybatis-config.xml`:
```xml
```
## Supported types
The following type handlers are supported:
| Type handler | ThreeTen-Extra type | JDBC types |
| ------------ | ------------------- | ---------- |
| `DayOfMonthTypeHandler` | `org.threeten.extra.DayOfMonth` | `INTEGER` |
| `DayOfYearTypeHandler` | `org.threeten.extra.DayOfYear` | `INTEGER` |
| `SecondsTypeHandler` | `org.threeten.extra.Seconds` | `INTEGER` |
| `MinutesTypeHandler` | `org.threeten.extra.Minutes` | `INTEGER` |
| `HoursTypeHandler` | `org.threeten.extra.Hours` | `INTEGER` |
| `DaysTypeHandler` | `org.threeten.extra.Days` | `INTEGER` |
| `WeeksTypeHandler` | `org.threeten.extra.Weeks` | `INTEGER` |
| `MonthsTypeHandler` | `org.threeten.extra.Months` | `INTEGER` |
| `YearsTypeHandler` | `org.threeten.extra.Years` | `INTEGER` |
| `YearWeekTypeHandler` | `org.threeten.extra.YearWeek` | `VARCHAR` or `LONGVARCHAR` |
| `YearQuarterTypeHandler` | `org.threeten.extra.YearQuarter` | `VARCHAR` or `LONGVARCHAR` |
> **Note:**
>
> For more details of type handler, please refer to "[MyBatis 3 REFERENCE DOCUMENTATION](https://www.mybatis.org/mybatis-3/configuration.html#typeHandlers)".