MyBaties--Mapper configuration
Posted Nyan
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了MyBaties--Mapper configuration相关的知识,希望对你有一定的参考价值。
method one:
<!-- 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>
method two:
<!-- 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>
method three:
<!-- Using mapper interface classes --> <mappers> <mapper class="org.mybatis.builder.AuthorMapper"/> <mapper class="org.mybatis.builder.BlogMapper"/> <mapper class="org.mybatis.builder.PostMapper"/> </mappers>
method four:
<!-- Register all interfaces in a package as mappers --> <mappers> <package name="org.mybatis.builder"/> </mappers>
以上是关于MyBaties--Mapper configuration的主要内容,如果未能解决你的问题,请参考以下文章
没有configure的文件,无法执行./configure命令怎么解决