Spring扫描Mybatis的mapper接口的三种配置方式

mybatis支持与spring结合使用,使得mybatis中的mapper接口能够做为spring容器中的bean被应用代码中相关类,如Service类,经过@Autowired自动注入进来。在使用方面须要在项目中引入如下包:java <dependency> <groupId>org.mybatis</groupId> <artifactId>mybatis-spring</a
相关文章
相关标签/搜索