Http客户端工具RestTemplate调用的时候报org.springframework.web.client.HttpServerErrorException: 500 null_Lancis的博客-CSDN博客

网站介绍:文章浏览阅读2.8k次。测试代码如下:@Testpublic void httpGet() { Users users = this.restTemplate.getForObject("http://localhost:8080/user/query/1", Users.class); System.out.println(users);}解决:看了下控制台报错,是方法的返回值字符串和视图解析器解析的页面名字字符串冲突导致的。回去看了下controller,结果发现之前为了测试thymeleaf吧@RestCont_org.springframework.web.client.httpservererrorexception: 500 null