博客
关于我
SpringBoot集成mybatis
阅读量:337 次
发布时间:2019-03-04

本文共 643 字,大约阅读时间需要 2 分钟。

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依赖

代码如下:

org.mybatis.spring.boot
mybatis-spring-boot-starter
1.3.2

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 */@Mapperpublic interface DeploymentMapper {    int insertOne(DeploymentEntity deploymentEntity);}

4、创建XML

 

5.测试

转载地址:http://pjne.baihongyu.com/

你可能感兴趣的文章
浏览器页面呈现过程
查看>>
HTML5新特性
查看>>
async/await剖析
查看>>
cmp命令
查看>>
一次编辑
查看>>
简单工厂模式
查看>>
代理模式
查看>>
Js中Currying的应用
查看>>
长按键入
查看>>
Vuex和普通全局对象
查看>>
上升下降字符串
查看>>
JavaScript中的链式调用
查看>>
day-04-列表
查看>>
day-13-匿名函数-内置函数2-闭包
查看>>
Linux 磁盘管理(df fu fdisk mkfs mount)
查看>>
力扣125. 验证回文串-C语言实现-简单题
查看>>
空间向量
查看>>
第一类曲面积分
查看>>
常数项级数
查看>>
Mybatis的介绍和基本使用
查看>>