反復檢查之后,發現問題出在的代碼如下:
@ApiModelProperty(value = "材料鏈接地址", example = "{ApiHost}/storage/test.pdf")private String url;
結論:example的值包括了 `{` 和 `}` ,導致網頁解析的JSON數據失敗。這可能是Swagger2的漏洞。
解析辦法:?
@ApiModelProperty(value = "材料鏈接地址", example = "\"{ApiHost}/storage/test.pdf\"")private String url;
相關鏈接:?https://blog.csdn.net/weixin_36340771/article/details/132089563