Springboot中使用 actuator工具時 報Could not find acceptable representation

形成這種結果的緣由是 ,Spring沒法找到合適的視圖解析器  。spring

網上找了一圈都是說其餘緣由的解決方法。json

本身debug一遍 ,其實很簡單。app

因爲個人項目使用了fastjsonConfig , 又指定了惟一的MediaType 爲json ,spring-boot

而actuator 須要的mediaType是 application/vnd.spring-boot.actuator.v2+jsondebug

因此添加mediaType便可blog

FastJsonHttpMessageConverter

 

相關文章
相關標籤/搜索