【GitLab】Failed to read HTTP message: org.springframework.http.converter.HttpMessageNotReadableExcep

问题:

Failed to read HTTP message: org.springframework.http.converter.HttpMessageNotReadableException: JSON parse 
    error: Cannot deserialize instance of `java.lang.String` out of START_OBJECT token; nested exception is 
    com.fasterxml.jackson.databind.exc.MismatchedInputException: Cannot deserialize instance of
     `java.lang.String` out of START_OBJECT token at [Source: (PushbackInputStream); line: 1, column: 449]
     (through reference chain: java.util.LinkedHashMap["project"])

解决:

这个错误是因为GitLab11.10之后,使用Webhook返回响应JSON对象会无法使用Jackson进行反序列化导致。

因此只需要在SpringCloud配置中心(config server)中增加过滤器代码进行Json数据序列化就可以了。

网上有很多例子这里就不贴出代码了。

你可能感兴趣的:(SpringCloud,GitLab)