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);
}
|