Spring
dzbxq89
这个作者很懒,什么都没留下…
展开
-
springboot-restTemplate
学习时使用的是spring,到公司后使用的框架是spring的升级版,springboot在工程中使用时将前后台分开,前台调用前台工程的Controller,之后使用restTemplate ,再去调用后台工程的控制层。restTemplate 使用时发现无法传递list。当时不知道具体的原理。只是发现接收后类型变成hashMap。解决的方法是转成json。传递字符串。接收时也接收为字符串后使原创 2017-02-25 17:09:47 · 551 阅读 · 0 评论 -
关于springCloud下使用resttemplate
在springCloud环境下使用resttemplate要注意是否为resttemplate对象是否为spring注入。实际工程中使用验证,如果要通过eureka进行连接,必须使用spring注入后的才可以。反之如果想要使用resttemplate连接其他未在eureka管理的接口时。必须自行在工程中实例化resttemplate。实际理由未知。工程中亲测...原创 2017-06-28 14:20:01 · 1747 阅读 · 0 评论