April 2018
Intermediate to advanced
202 pages
4h 48m
English
With MyBatis, you can define a database connection using a Java API or a configuration XML file. The easiest way is to put an XML file in the classpath (the resources directory, when using Maven). The following is an example of such a configuration file:
<?xml version="1.0" encoding="UTF-8" ?><!DOCTYPE configurationPUBLIC "-//mybatis.org//DTD Config 3.0//EN" "http://mybatis.org/dtd/mybatis-3-config.dtd"><configuration> <environments default="development"> <environment id="development"> <transactionManager type="JDBC"/> <dataSource type="POOLED"> <property name="driver" value="org.h2.Driver"/> <property name="url" value="jdbc:h2:tcp://localhost/~/h2-databases/demo"/> <property name="username" value="sa"/> <property ...
Read now
Unlock full access