1.springboot配置文件application.yml里面添加mybatis依赖
代码 如下:
mybatis:
type-aliases-package: com.jerryl.activiti.entity
mapper-locations: classpath:mapper/*.xml
check-config-location: true
2.pom.xml里面添加mybatis依赖
代码如下:
<dependency>
<groupId>org.mybatis.spring.boot</groupId>
<artifactId>mybatis-spring-boot-starter</artifactId>
<version>1.3.2</version>
</dependency>
3、创建Mapper
package com.jerryl.mapper;
import com.jerryl.activiti.entity.DeploymentEntity;
import org.apache.ibatis.annotations.Mapper;
/**
* @Description TODO
* @Date 2019/8/27 15:18
* @Created by xiayunan
*/
@Mapper
public interface DeploymentMapper {
int insertOne(DeploymentEntity deploymentEntity);
}
4、创建XML
5.测试