![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
SSM框架
SkyFire1121
软件开发、信息安全
展开
-
SpringMVC在使用JSON时出现错误:charset=UTF-8' not supported和Required request body is missing
1. 问题:SpringMVC在使用JSON时出现Error: Content type 'application/json;charset=UTF-8' not supported和Required request body is missing。这个问题是在SSM框架中测试json出现的。(1)请求json串,输出json中的JS中的代码和Java代码$.ajax({ typ原创 2018-01-20 23:23:09 · 4179 阅读 · 0 评论 -
SSM整合时,使用校验器hibernate-validator时报错。
javax.servlet.ServletException: Servlet.init() for servlet [springmvc] threw exception org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:478) org.apache.catalina.valv原创 2018-01-19 19:22:21 · 1414 阅读 · 4 评论 -
SpringMVC+HibernateValidator,读取在properties文件中的错误提示信息为乱码
1. properties文件中的校验错误提交信息: items.name.length.error=请输入1到30个字符的商品名称 items.createtime.isNull=请输入商品的生产日期2. springmvc.xml中的配置为: 3. Java代码if (bindingResult.hasErrors()) { List allErrors原创 2018-01-19 21:26:21 · 1253 阅读 · 0 评论