admin 管理员组

文章数量: 1184232

1. 服务启动报错

(1)运行界面

Can't map parameter "Serializable id" to "Long id". Consider to declare/implement a mapping method: "Long map(Serializable value)". Occured at 'T selectById(Serializable id)' in 'BaseMapper'.

(2)问题

java: Ambiguous constructors found for creating java.lang.Long: Long(long), Long(java.lang.String). Either declare parameterless constructor or annotate the default constructor with an annotation named @Default. Occured at 'Long selectCount(Wrapper queryWrapper)' in 'BaseMapper'.

java: Can't map parameter "Serializable id" to "Long id". Consider to declare/implement a mapping method: "Long map(Serializable value)". Occured at 'T selectById(Serializable id)' in 'BaseMapper'.

2. 解决

mapper注解引入错误

改为:

import org.apache.ibatis.annotations.Mapper;

本文标签: parameter Serializable java mAP Id