mybatis-typehandlers-postgis

MyBatis Type Handlers for PostGIS

Лицензия

Лицензия

Категории

Категории

Geospatial Прикладные библиотеки PostGIS MyBatis Данные ORM
Группа

Группа

com.eyougo
Идентификатор

Идентификатор

mybatis-typehandlers-postgis
Последняя версия

Последняя версия

1.0
Дата

Дата

Тип

Тип

jar
Описание

Описание

mybatis-typehandlers-postgis
MyBatis Type Handlers for PostGIS
Ссылка на сайт

Ссылка на сайт

https://github.com/eyougo/mybatis-typehandlers-postgis
Система контроля версий

Система контроля версий

https://github.com/eyougo/mybatis-typehandlers-postgis

Скачать mybatis-typehandlers-postgis

Как подключить последнюю версию

<!-- https://jarcasting.com/artifacts/com.eyougo/mybatis-typehandlers-postgis/ -->
<dependency>
    <groupId>com.eyougo</groupId>
    <artifactId>mybatis-typehandlers-postgis</artifactId>
    <version>1.0</version>
</dependency>
// https://jarcasting.com/artifacts/com.eyougo/mybatis-typehandlers-postgis/
implementation 'com.eyougo:mybatis-typehandlers-postgis:1.0'
// https://jarcasting.com/artifacts/com.eyougo/mybatis-typehandlers-postgis/
implementation ("com.eyougo:mybatis-typehandlers-postgis:1.0")
'com.eyougo:mybatis-typehandlers-postgis:jar:1.0'
<dependency org="com.eyougo" name="mybatis-typehandlers-postgis" rev="1.0">
  <artifact name="mybatis-typehandlers-postgis" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.eyougo', module='mybatis-typehandlers-postgis', version='1.0')
)
libraryDependencies += "com.eyougo" % "mybatis-typehandlers-postgis" % "1.0"
[com.eyougo/mybatis-typehandlers-postgis "1.0"]

Зависимости

compile (2)

Идентификатор библиотеки Тип Версия
org.mybatis : mybatis jar 3.4.5
net.postgis : postgis-jdbc jar 2.2.1

test (2)

Идентификатор библиотеки Тип Версия
junit : junit jar 4.12
org.mockito : mockito-core jar 2.9.0

Модули Проекта

Данный проект не имеет модулей.

MyBatis Type Handlers for PostGIS

Build Status Maven central

The MyBatis type handlers supporting geometry types introduced in PostGIS: JDBC Geometry API

Requirements

Java 7 or higher.

The latest PostGIS JDBC API which it depends on was using the JRE7 version of PostgreSQL JDBC, so it requires Java 7 or higher.

Installation

If you are using Maven add the following dependency to your pom.xml:

<dependency>
    <groupId>com.eyougo</groupId>
    <artifactId>mybatis-typehandlers-postgis</artifactId>
    <version>1.0</version>
</dependency>

Configuration

  • If you are using MyBatis alone, add the type handlers to your mybatis-config.xml as follow:
<typeHandlers>
    <!-- ... -->
    <typeHandler handler="com.eyougo.mybatis.postgis.type.PointTypeHandler" />
    <typeHandler handler="com.eyougo.mybatis.postgis.type.PolygonTypeHandler" />
</typeHandlers>
  • If you are using MyBatis with Spring, add the type handlers package to the Spring configuration as follow:

With XML Configuration

<bean id="sqlSessionFactory" class="org.mybatis.spring.SqlSessionFactoryBean">
    <!-- ... -->
    <property name="typeAliasesPackage" value="com.eyougo.mybatis.postgis.type" />
</bean>

Or with Java configuration

@Bean
public SqlSessionFactory sqlSessionFactory(Configuration config) {
    SqlSessionFactoryBean factory = new SqlSessionFactoryBean();
    // ...
    factory.setTypeHandlersPackage("com.eyougo.mybatis.postgis.type");
    return factory.getObject();
}
  • If you are using MyBatis with Spring Boot, add the type handlers package to the configuration file as follow:

application.properties

mybatis.type-handlers-package = com.eyougo.mybatis.postgis.type

Or application.yml

mybatis:
    type-handlers-package: com.eyougo.mybatis.postgis.type

Supported types

The following type handlers are supported:

Type handler PostGIS Geometry API type Available version
PointTypeHandler org.postgis.Point 1.0
PolygonTypeHandler org.postgis.Polygon 1.0
LineStringTypeHandler org.postgis.LineString 1.0
MultiPointTypeHandler org.postgis.MultiPoint 1.0

Note: For more details of type handler, please refer to "MyBatis 3 REFERENCE DOCUMENTATION".

Версии библиотеки

Версия
1.0