解释:JavaBean的主键类型只能是int类型,因为在映射关系配置是自动增长的,String类型是不能自动增长的,所以会报错。 转载于:https://www.cnblogs.com/quanquan666/p/10288761.html