当前位置: 首页 > news >正文

哪个网站可以做puzzle广州最近流感很厉害吗

哪个网站可以做puzzle,广州最近流感很厉害吗,企业网站建设itcask,广州的网站建设前后端传参经常容易出错#xff0c;本文记录开发springBootMybatis-plusvuecli项目中出现的传参问题及解决办法 1.前后端没有跨域配置#xff0c;报错 解决方法#xff1a;后端进行跨域配置#xff0c;拷贝CorsConfig类 package com.example.xxxx.config;import org.spr… 前后端传参经常容易出错本文记录开发springBootMybatis-plusvuecli项目中出现的传参问题及解决办法   1.前后端没有跨域配置报错 解决方法后端进行跨域配置拷贝CorsConfig类 package com.example.xxxx.config;import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.web.cors.CorsConfiguration; import org.springframework.web.cors.UrlBasedCorsConfigurationSource; import org.springframework.web.filter.CorsFilter;/*** 全局配置可跨域访问api接口*/Configuration public class CorsConfig {private CorsConfiguration buildConfig() {CorsConfiguration corsConfiguration new CorsConfiguration();corsConfiguration.addAllowedOrigin(*); //允许任何域名corsConfiguration.addAllowedHeader(*); //允许任何头corsConfiguration.addAllowedMethod(*); //允许任何方法return corsConfiguration;}Beanpublic CorsFilter corsFilter() {UrlBasedCorsConfigurationSource source new UrlBasedCorsConfigurationSource();source.registerCorsConfiguration(/**, buildConfig()); //注册return new CorsFilter(source);} } 2.longtext类型 前端json内容包含转义字符报错 WARN 9296 --- [nio-8090-exec-4] .w.s.m.s.DefaultHandlerExceptionResolver : Resolved [org.springframework.http.converter.HttpMessageNotReadableException: JSON parse error: Illegal unquoted character ((CTRL-CHAR, code 10)): has to be escaped using backslash to be included in string value; nested exception is com.fasterxml.jackson.databind.JsonMappingException: Illegal unquoted character ((CTRL-CHAR, code 10)): has to be escaped using backslash to be included in string valueEOL at [Source: (org.springframework.util.StreamUtils$NonClosingInputStream); line: 2, column: 15] (through reference chain: com.example.memo.entity.Note[content])] 出现原因Json 字符中有有些字段比如空格、反斜杠、换行符等一些特殊字符但是 Json 框架没有对这些字符进行处理就会导致出现错误。 解决方法加入 fastjson 依赖 dependencygroupIdcom.alibaba/groupIdartifactIdfastjson/artifactIdversion1.2.78/version/dependency在配置文件中加入 springjackson:parser:allow-unquoted-control-chars: true重启项目运行成功
http://www.sadfv.cn/news/156670/

相关文章:

  • 哈尔滨网站制作公司有哪些青岛网站建设商家
  • 台商区住房和建设网站wordpress 考试插件
  • c#网站开发+pdf做网站如何使用数据库
  • 评级网站怎么做郑州做营销型网站
  • 网站seo基础建设网站需要什么技术
  • 网站更新文章上海智能网站建设公司
  • dede 更新网站地图学校网站建设开题报告书
  • 绍兴网站建设方案书杭州网站建站公司
  • 百度蜘蛛站长服务平台番禺开发网站费用
  • 交互网站怎么做搭建网页视频教程
  • 甘肃省住房和建设厅网站服务中心北京通州区网站建设
  • 如何做网站拓扑结构图珠海网站制作套餐
  • 网站建设关键词商业空间设计要求
  • 网站如何做站内站a3网站建设
  • 网站建设费用主要包括哪些内容湛江市建设规划局网站
  • 淘宝客网站根目录闸北东莞网站建设
  • 辽宁沈阳建设工程信息网站海口市住房和城乡建设局 网站
  • 网站设计师是什么wordpress 仿微信评论
  • 网站建设 010门业网站 源码
  • 好的专业网站建设公司网上找工程平台有哪些
  • 网站正在建设中 代码汉口网站制作设计
  • 3g手机网站源码整站排名优化教程
  • 网站数据库做好了 怎么做网页微信企业推广
  • 什么网站做生鲜比较好域名注册查询代码
  • 网站关键词布局图网站软文写作要求
  • 兽装定制网站泰州网站建设托管
  • 织梦网站怎么做伪静态dede网站
  • 长沙做网站的公司哪家最好威海建设集团招聘信息网站
  • 怎么用源码做网站wordpress文章下载美化框
  • 良精企业网站系统百度识图搜索引擎