Experience tells us that this error is due to configuration file missing configuration ~ ~ ~
Add the following configuration to the MyBatis:
<mappers>
<mapper resource= "Org/mybatis/builder/authormapper.xml"/>
<mapper resource= "org /mybatis/builder/blogmapper.xml "/>
<mapper resource=" Org/mybatis/builder/postmapper.xml "/>
</mappers>
It's also possible that:
To extend:
Mapper (mappers)
Now that MyBatis's behavior has been configured by the above elements, we need to define the SQL mapping statement. But first we need to tell MyBatis where to find these statements. Java does not provide a good way to find this automatically, so the best way is to tell MyBatis where to find the mapping file. You can use resource references relative to the classpath, or fully qualify the resource locator (including the URL of the file:///), or the class name and package name. For example:
<!--Using classpath Relative Resources-<mappers> <mapper resource= "org/mybatis/builder/ Authormapper.xml "/> <mapper resource=" Org/mybatis/builder/blogmapper.xml "/> <mapper resource=" org/ Mybatis/builder/postmapper.xml "/> </mappers>
<!--Using URL fully qualified paths-
<mappers>
<mapper url= "file:///var/mappers/ Authormapper.xml "/>
<mapper url=" File:///var/mappers/BlogMapper.xml "/> <mapper url=
" file:/// Var/mappers/postmapper.xml "/>
</mappers>
<!--Using Mapper interface Classes-
<mappers>
<mapper class= " Org.mybatis.builder.AuthorMapper "/>
<mapper class=" Org.mybatis.builder.BlogMapper "/>
< Mapper class= "Org.mybatis.builder.PostMapper"/>
</mappers>
<!--Register all interfaces in a package as mappers--
<mappers>
<package name= " Org.mybatis.builder "/>
</mappers>
The above methods 1 and 2 are XML definitions, and 3 and 4 are annotation definitions
XML definitions are commonly used in a way that uses the following:
<select id= "Testmybatisworks" resulttype= "Java.util.HashMap" >
<![ cdata[
{call pqueryasyncnoticelist (
#{0,mode=in,jdbctype=integer}
)
}
]]>
</ Select>
The annotations are:
/**
* "proc list" with stored procedure query get list
* @param asyncstatus
* @return
*
/@Select ("Exec pqueryasyncnoticelist #{asyncstatus} ")
@Options (statementtype=statementtype.callable)
list<map<string, object>> GetList2 (int asyncstatus);
The moment Rose Posture ~ ~ ~ Roar roar