# xbatis2
**Repository Path**: xuebusi/xbatis2
## Basic Information
- **Project Name**: xbatis2
- **Description**: 使用SpringBoot + Mybatis 的xml配置方式实现数据库表的基础操作
- **Primary Language**: Java
- **License**: Not specified
- **Default Branch**: master
- **Homepage**: None
- **GVP Project**: No
## Statistics
- **Stars**: 0
- **Forks**: 0
- **Created**: 2017-09-24
- **Last Updated**: 2021-02-10
## Categories & Tags
**Categories**: Uncategorized
**Tags**: None
## README
# xbatis2
使用SpringBoot + Mybatis 的xml配置方式实现数据库表的基础操作
# 使用Mybatis注解开发需要配置的几个关键点
* (1) pom.xml文件中要引入Mybatis的依赖包(这里使用的是SpringBoot整合Mybatis的依赖):
org.mybatis.spring.boot
mybatis-spring-boot-starter
1.2.0
* (2) 在SpringBoot的启动类上面添加 @MapperScan("com.xuebusi.mapper") 注解,并指定Mapper接口所在的包路径
* (3) 在Mapper接口中定义接口方法,不需要定义实现,# 使用Mybatis注解开发需要配置的几个关键点
* (1) pom.xml文件中要引入Mybatis的依赖包(这里使用的是SpringBoot整合Mybatis的依赖):
org.mybatis.spring.boot
mybatis-spring-boot-starter
1.2.0
* (2) 在SpringBoot的启动类上面添加 @MapperScan("com.xuebusi.mapper") 注解,并指定Mapper接口所在的包路径
* (3) 在application.yml文件中配置指定mapper映射xml文件的路径:
mybatis:
mapper-locations: classpath:mapper/*.xml
* (4) 在Mapper接口中只需要定义接口方法,不需要定义实现,也不需要在方法上使用任何注解
* (5) 在*Mapper.xml文件中编写sql语句,使用