【发布时间】:2013-05-10 12:34:23
【问题描述】:
我的 resttemplate.exchange() 在 POST 请求上失败,服务器返回 500 错误。
我尝试将根日志记录级别设置为 DEBUG,但在返回 500 错误之前没有记录任何内容。为了确保我的日志记录配置正确,我在 resttemplate 调用之前添加了一行
HttpClient client = new DefaultHttpClient();
client.execute(new HttpGet("http://google.com"));
在这种情况下确实出现了很多日志消息。
那么如何让 RestTemplate 导出调试数据呢?
谢谢 杨
【问题讨论】:
标签: spring log4j resttemplate