Java Reference
In-Depth Information
SqlMapConfig
SqlMaps
Input
Output
Hashtable
Hashtable
Mapped
Statement
POJO
POJO
Primitive
Primitive
Figure 3.1
Conceptual iBATIS
configuration hub
with SqlMapConfig
at the head of it all
Database
Database
3.6.1
The SQL Map configuration file
The SQL Map configuration file ( SqlMapConfig.xml ) is the central hub for config-
uring i BATIS , as you can see in the conceptual diagram in figure 3.1. Everything
from the database connection to the actual SqlMap s to be used is supplied to the
framework by this file.
The main configuration file is commonly named SqlMapConfig.xml .
Although it does not have to use that name, we will follow the convention
here.
NOTE
Listing 3.1 shows an example configuration file that we will discuss in the follow-
ing sections.
Listing 3.1
SqlMapConfig.xml
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE sqlMapConfig
PUBLIC "-//ibatis.apache.org//DTD SQL Map Config 2.0//EN"
"http://ibatis.apache.org/dtd/sql-map-config-2.dtd">
Search WWH ::




Custom Search