![](https://img-blog.csdnimg.cn/20201014180756724.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
mybatis
傻小菜
这个作者很懒,什么都没留下…
展开
-
数据库命名规则引发的错误
Cause: java.sql.SQLSyntaxErrorException: Unknown column 'user_name' in 'field list'原创 2021-07-27 16:33:36 · 271 阅读 · 0 评论 -
整合项目中的单元测试在启动类所在的子模块中进行测试
需要导入的依赖有junit依赖@RunWith(SpringRunner.class)@SpringBootTest(classes = ApiApplication.class)public class UserMapperTest { @Resource private UserMapper userMapper; @Test public void queryByName(){ User user= userMapper.queryByNa.原创 2021-07-26 14:23:50 · 414 阅读 · 0 评论 -
mapper.xml
<?xml version="1.0" encoding="UTF-8" ?><!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"><mapper namespace="com.pxl.mapper.UserMapper"> <select id="queryAll原创 2021-07-26 13:44:22 · 107 阅读 · 0 评论 -
数据库数据源配置
数据源的配置spring: datasource: username: root password: 123456 url: jdbc:mysql://localhost:3306/mybatis?useUnicode=true&characterEncoding=utf-8&serverTimezone=GMT driver-class-name: com.mysql.cj.jdbc.Driver type: com.alibaba.dru.原创 2021-07-26 13:14:56 · 539 阅读 · 0 评论 -
数据库连接错误serverTimezone
java.sql.SQLException: The server time zone value '�й���ʱ��' is unrecognized or represents more than one time zone原创 2021-07-23 14:12:37 · 641 阅读 · 0 评论 -
mybatis----配置文件固定代码
spring: datasource: username: root password: 123456 url: jdbc:mysql://localhost:3306/mybatis?useUnicode=true&characterEncoding=utf-8 driver-class-name: com.mysql.jdbc.Driver type: com.alibaba.druid.pool.DruidDataSource #Spr原创 2021-07-23 11:27:37 · 88 阅读 · 0 评论 -
Mybatis-plus入门级使用
mybatis-plus新手教学原创 2021-04-18 11:43:14 · 73 阅读 · 0 评论 -
mybatis-plus查询数据库读到空值null
数据库字段可以是任意形式但是实体类字段必须采用驼峰命名法,否则查询数据时会为空原创 2021-04-17 21:56:26 · 1211 阅读 · 0 评论