美文网首页
SpringBoot+Mybatis

SpringBoot+Mybatis

作者: whynotybb | 来源:发表于2019-07-12 11:21 被阅读0次

配置文件包括application.properties,以及mybatis-config.xml和mapper.xml

目录结构:

配置文件目录结构

具体内容如下:

application.properties

application配置包括了数据源的配置,以及mybatisconfig。

mybatis-config配置

userMapper.xml

userMapper.xml

userMapper里面写sql语句

与UserMapper接口里面写sql注解。这时不需要UserMapper.xml文件。

UserMapper interface

UserService.java

service

相关文章

网友评论

      本文标题:SpringBoot+Mybatis

      本文链接:https://www.haomeiwen.com/subject/yacekctx.html