Recently, I encountered mybatis in the project, and the project kept reporting errors, Document root element "mapper", must match DOCTYPE root "null", I checked the mapper configuration repeatedly, but I couldn't find where the configuration was wrong, and finally found that the mapper configuration header was missing. .
In fact, in the configuration file of configuration, the header is like this:
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE configuration PUBLIC "-//mybatis.org//DTD Config 3.0//EN "
"http://mybatis.org/dtd/mybatis-3-config.dtd">And
the configuration file header in mapper.xml is like this, and it cannot be missing:
<?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">
Document root element "mapper", must match DOCTYPE root "null"报凑
Guess you like
Origin http://43.154.161.224:23101/article/api/json?id=326480246&siteId=291194637
Recommended
Ranking