首页
IT
登录
6mi
u
盘
搜
搜 索
IT
Mybatis配置篇
Mybatis配置篇
xiaoxiao
2021-03-25
6
resource文件夹下新建Configuration.xml
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<
configuration
>
<
typeAliases
>
<
typeAlias
alias
=
"User"
type
=
"com.yihaomen.mybatis.model.User"
/>
</
typeAliases
>
<
environments
default
=
"development"
>
<
environment
id
=
"development"
>
<
transactionManager
type
=
"JDBC"
/>
<
dataSource
type
=
"POOLED"
>
<
property
name
=
"driver"
value
=
"com.mysql.jdbc.Driver"
/>
<
property
name
=
"url"
value
=
"jdbc:mysql://127.0.0.1:3306/mybatis"
/>
<
property
name
=
"username"
value
=
"springtest"
/>
<
property
name
=
"password"
value
=
"springtest"
/>
</
dataSource
>
</
environment
>
</
environments
>
</
configuration
>
转载请注明原文地址: https://ju.6miu.com/read-200333.html
技术
最新回复
(
0
)