运行spring cloud 的分布式事务时,报如下错误:
i.s.r.d.s.s.c.AbstractTableMetaCache : get table meta error:Failed to fetch schema of user_course_order表
java.sql.SQLException: Failed to fetch schema of user_course_order表
原因:
项目中使用了seata的分布式事务,而其中user_course_order表中没有主键
解决办法:
给user_course_order表加一个主键ID就可以了