问题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
))