各位大佬,我今天在搞mybatis plus的时候使用本身的selectById方法,报错如下:
Servlet.service() for servlet [dispatcherServlet] in context with path [/server] threw exception [Request processing failed; nested exception is org.apache.ibatis.binding.BindingException: Invalid bound statement (not found): com.yss.cn.modules.mapper.TBaseAuthMapper.selectById] with root cause
org.apache.ibatis.binding.BindingException: Invalid bound statement (not found): com.yss.cn.modules.mapper.TBaseAuthMapper.selectById
在网上百度了一下:有的说的需要加@TableId 注解,加了但是不行,各个代码如下:
serviceImpl:
@Autowired
private TBaseAuthMapper tBaseAuthMapper;
@Override
public TBaseAuthResult findTBaseAuthResultById(Integer id){
return BeanUtil.cast(tBaseAuthMapper.selectById(id), TBaseAuthResult.class);
}
mapper:
public interface TBaseAuthMapper extends BaseMapper<TBaseAuth> {
}
TBaseAuth:
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("t_base_auth")
public class TBaseAuth implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 序号
*/
@TableId(value = "id", type = IdType.AUTO)
private Long id;
...
}
哪位大佬帮忙解决一下,万分感谢!!!