MyBatis-Plus入门问题汇总

问题1:
Caused by: java.lang.ClassNotFoundException: net.bytebuddy.dynamic.loading.ClassInjector$UsingReflection
解决办法:
到仓库删除net.bytebuddy的包,重新构建依赖包

问题二:
INFOStarted UserMapperTest in 6.793 seconds (JVM running for 9.343)
DEBUG==> Preparing: INSERT INTO mp_user ( user_id, user_name, age, manager_id, create_time ) VALUES ( ?, ?, ?, ?, ? )
DEBUG==> Parameters: 1194878204687458305(Long), 刘明强(String), 31(Integer), 2(Long), 2019-11-14T15:22:17.564(LocalDateTime)

org.springframework.jdbc.BadSqlGrammarException:
Error updating database. Cause: java.sql.SQLSyntaxErrorException: Table ‘mp.mp_user’ doesn’t exist
The error may exist in com/dsf/mp/annotation/dao/UserMapper.java (best guess)
The error may involve com.dsf.mp.annotation.dao.UserMapper.insert-Inline
The error occurred while setting parameters
SQL: INSERT INTO mp_user ( user_id, user_name, age, manager_id, create_time ) VALUES ( ?, ?, ?, ?, ? )
##Cause: java.sql.SQLSyntaxErrorException: Table ‘mp.mp_user’ doesn’t exist
; bad SQL grammar []; nested exception is java.sql.SQLSyntaxErrorException: Table ‘mp.mp_user’ doesn’t exist
SQL: INSERT INTO user ( id, name, age, manager_id, create_time ) VALUES ( ?, ?, ?, ?, ? )
##Cause: java.sql.SQLIntegrityConstraintViolationException: Cannot add or update a child row: a foreign key constraint fails (mp.user, CONSTRAINT manager_fk FOREIGN KEY (manager_id) REFERENCES user (id))
; Cannot add or update a child row: a foreign key constraint fails (mp.user, CONSTRAINT manager_fk FOREIGN KEY (manager_id) REFERENCES user (id)); nested exception is java.sql.SQLIntegrityConstraintViolationException: Cannot add or update a child row: a foreign key constraint fails (mp.user, CONSTRAINT manager_fk FOREIGN KEY (manager_id) REFERENCES user (id))
在这里插入图片描述
在这里插入图片描述

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值