springboot2.0整合mybatis(简洁版)

springboot2.0整合mybatis(简洁版)

参考文章

springboot1.5

https://blog.csdn.net/Winter_chen001/article/details/77249029

springboot2.0

https://segmentfault.com/a/1190000017211657
https://blog.csdn.net/qq_28410283/article/details/86700635
https://www.jianshu.com/p/df5af59fef43

我的整合

预览

在这里插入图片描述
在这里插入图片描述

在这里插入图片描述

打包源码

sb-mybatis1.0(最基本带分页2020-01-17).7z-蓝奏下载
sb-mybatis-giee仓库

常见错误及解决

MySql数据库时区异常

MySql数据库时区异常,java.sql.SQLException: The server time zone value ‘?й???׼ʱ?’ is unrecognized or represents more than one time zone.
解决:https://www.cnblogs.com/godwithus/p/9788790.html

使用druid数据源与springboot2.0不兼容

springboot1.5配置
https://blog.csdn.net/Winter_chen001/article/details/77249029

springboot: 1.5.6使用以下没有问题,sp2.0使用以下出现问题
        <!-- druid的starter --> 
        <dependency>
            <groupId>com.alibaba</groupId>
            <artifactId>druid-spring-boot-starter</artifactId>
            <version>1.1.0</version>
        </dependency>
报错
	springboot2.0应该使用
        <!-- druid的starter --> 
        <dependency>
            <groupId>com.alibaba</groupId>
            <artifactId>druid-spring-boot-starter</artifactId>
            <version>1.1.9</version>
        </dependency>	

发布了10 篇原创文章 · 获赞 1 · 访问量 500

猜你喜欢

转载自blog.csdn.net/weixin_45733134/article/details/104024435