When modifying the MyBatis configuration file, add the Typealiases node and report a builderexception:
org.apache.ibatis.exceptions.PersistenceException: # # # Error Building sqlsession.### Cause: Org.apache.ibatis.builder.BuilderException:Error creating document instance. 35; columnnumber:17; Content with element type "configuration" must match "(Properties?,settings?,typealiases?,typehandlers?,objectfactory?, Objectwrapperfactory?,plugins?,environments?,databaseidprovider?,mappers?) " . At org.apache.ibatis.exceptions.ExceptionFactory.wrapException (exceptionfactory.java:+) at Org.apache.ibatis.session.SqlSessionFactoryBuilder.build (Sqlsessionfactorybuilder.java:) at Org.apache.ibatis.session.SqlSessionFactoryBuilder.build (Sqlsessionfactorybuilder.java:66)
The reason is that the version of mybatis3.x uses the DTD as the XML format to validate the document. In the XML specification, the DTD is in strict order, in the exception of the error has been listed in the corresponding order, should be:
Properties>settings>typealiases>typehandlers>objectfactory>objectwrapperfactory>plugins> Environments>databaseidprovider>mappers
The contents of the MyBatis element type "configuration" must match ".....