JSON
huanglaoxie1986
这个作者很懒,什么都没留下…
展开
-
egg:如何设置返回的数据格式是json,还是xml
设置返回的数据格式为xml用Content-Type设置‘text/html’:xml格式‘text/xml’ :xml格式3: ‘application/json’ :json代码如下:返回的结果是xml格式,一般默认是jsonpublic async suggestion() {const { ctx } = this;const resultXml = await ct...原创 2018-12-13 10:26:17 · 8715 阅读 · 0 评论 -
SpringBoot报错:No converter found for return value of type: class
报错原因:Entity类的get,set方法名首字母写错的,写成大写了,应该是小写。最好是它自动生成get,set方法。自动生成get,set方法:快捷键Ctrl+ N 或是右键鼠标找到,Getter和Setter报错:No converter found for return value of type: classhis application has no explicit map...原创 2018-12-14 13:00:55 · 4849 阅读 · 0 评论