Description:
Field commentMapper in com.xxx.xxx.service.CommentService required a bean of type ‘com.xxx.xxx.dao.CommentMapper’ that could not be found.
The injection point has the following annotations:
- @org.springframework.beans.factory.annotation.Autowired(required=true)
Action:
Consider defining a bean of type ‘com.xxx.xxx.dao.CommentMapper’ in your configuration.
Disconnected from the target VM, address: ‘127.0.0.1:55098’, transport: ‘socket’
Process finished with exit code 0
在dao层加@Mapper注解
@Mapper
public interface CommentMapper {
// 查看帖子回复列表
List<Comment> selectCommentsByEntity(int entityType, int entityId, int offset, int limit);
// 查看帖子回复数量
int selectCommentCountByEntity(int entityType, int entityId);
}