<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE configuration PUBLIC "-//mybatis.org//DTD Config 3.1//EN"
"http://mybatis.org/dtd/mybatis-3-config.dtd">
<configuration>
<typeAliases>
<typeAlias alias="UserinfoDao" type="org.mybatis.dao.UserinfoDao" />
</typeAliases>
<properties resource="config.properties" />
<environments default="development">
<environment id="development">
<transactionManager type="JDBC" />
<dataSource type="POOLED">
<property name="driver" value="${driver}" />
<property name="url" value="${url}" />
<property name="username" value="${username}" />
<property name="password" value="${password}" />
</dataSource>
</environment>
</environments>
<mappers>
<mapper resource="org/mybatis/xml/Userinfo.xml" />
</mappers>
</configuration>
为什么我这么配置xml有以下提示错误那
The content of element type "configuration" must match "(properties?,settings?,typeAliases?,typeHandlers?,objectFactory?,objectWrapperFactory?,plugins?,environments?,databaseIdProvider?,mappers?)".
请问哪位能给指点一下
------解决方案--------------------
properties?,settings?,typeAliases?,
properties必须在第一
<properties resource="config.properties" />挪到<configuration>后就行