mybaits xml配置文件格式问题.md
2017-06-30 本文已影响0人
cuiyuemin365
异常信息:
The content of element type "configuration" must match "(properties?,settings?,typeAliases?,typeHandlers?,objectFactory?,objectWrapperFactory?,plugins?,environments?,mappers?)".
mybatis-3-config.dtd 文件中有如下约束:
<!ELEMENT configuration (properties?, settings?, typeAliases?, typeHandlers?, objectFactory?, objectWrapperFactory?, reflectorFactory?, plugins?, environments?, databaseIdProvider?, mappers?)>
一些常见的DTD规则:
上面这个表出自Java核心技术-卷2
从上表中第五条可见,mybatis配置文件对元素出现的顺序是有要求的.