阅读背景:

spring-boot 实现通过访问路径后加参数返回json数据

来源:互联网 
https://localhost:8080/order/getCustomerAccount?format=json  只要在url后面加上format的参数既可,controller方法返回一个object就可以了。不用加什么@ResponseBody注解。继承WebMvcConfigurerAdapter类重写configureContentNegotiation方法即可 https://localhost:8080/order/getCustomerAccount



你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: