`

The request sent by the client was syntactically incorrect.

 
阅读更多

spring mvc报错:The request sent by the client was syntactically incorrect.    是Date格式转换的错误

  解决方案:建议先自动转成String类型,再手动转成Date类型

	public String list(ModelMap model,Long userId,String beginDate,String endDate){
		try {
			SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
			Map<String, Object> map = Maps.newHashMap();
			map.put("userId", userId);
			if (StringUtils.isNotEmpty(StringUtils.trim(beginDate))) {
				Date date = sdf.parse(beginDate);
				map.put("beginDate", date.getTime());
			}
			if (StringUtils.isNotEmpty(StringUtils.trim(endDate))) {
				Date date = sdf.parse(endDate);
				map.put("endDate", date.getTime());
			}

 

 

分享到:
评论

相关推荐

    servlet2.4doc

    The doFilter method of the Filter is called by the container each time a request/response pair is passed through the chain due to a client request for a resource at the end of the chain. doGet...

    SSD7 选择题。Multiple-Choice

    (b) the name of the table, the names of the table's attributes, the data types of the table's attributes, the formats of the table's attributes, and the maximum number of rows that the table can have...

    MIBBrowser8.rar

    the SNMP Trap and SNMP Inform packets that were sent from arbitrary SNMP devices or applications on the network. MIB Browser can monitor several SNMP devices simultaneously and contains features like...

    Extended Backus Naur Form

    It was developed as an extension of the original Backus Naur Form (BNF) by John Backus and Peter Naur in the 1960s. EBNF provides a more detailed and flexible method for defining the structure of a ...

    Design Concepts in Programming Languages

    The book's unique approach is based on a family of syntactically simple pedagogical languages that allow students to explore programming language concepts systematically. It takes as premise and ...

    Java.EE.and.HTML5.Enterprise.Application.Development

    Employ Syntactically Awesome Stylesheets, CSS3, and Sassy CSS Table of Contents Chapter 1 Introduction to Java EE and HTML5 Enterprise Development Chapter 2 Persistence Chapter 3 RESTful Resources ...

    The12thAstronaut.github.io:网站存储库

    "SCSS"是Sass(Syntactically Awesome Style Sheets)的预处理器,它扩展了CSS语言,引入了变量、嵌套规则、混合、函数等特性,使得CSS编写更易于维护和扩展。SCSS文件可以被编译成标准的CSS格式,供浏览器解析使用...

    快速JSON序列化Easyjson.zip

    such cases, so that they may be fixed sooner.Unsafe package is used by the code. While a non-unsafe version of easyjson can be made in the future, using unsafe package simplifies a lot of code by...

    tog-card-client

    【tog-card-client】是一个项目模板,它为开发React应用程序提供了一个基础框架,使用了现代前端技术栈,包括Typescript、Tailwind CSS、SASS、ESLint和Prettier。这个项目旨在帮助开发者快速启动一个新的React项目...

    The-First-Timers

    【标题】:“The-First-Timers”:一个关于幻想足球联赛的项目 在这个名为"The-First-Timers"的项目中,我们看到的是一场充满激情的幻想体育活动,特别是聚焦于足球领域的“第一个计时器”联赛。这个联赛已经进入了...

    CSS: The Missing Manual, 4th Edition

    ### CSS: The Missing Manual, 4th Edition - 关键知识点概览 #### 一、基础知识:HTML与CSS的结合 - **HTML5标签**:本书首先介绍了如何编写友好的HTML代码,特别是那些被现代浏览器所识别和支持的HTML5标签。这...

    bootstrap.min.js和bootstrap.min.css

    这通常通过覆盖默认的CSS样式或者使用SASS(Syntactically Awesome Style Sheets)预处理器来实现。另外,你还可以使用Bootstrap的CDN(内容分发网络)服务,这样无需将文件本地存储,而是直接从远程服务器加载,...

    Android代码-AQuery

    AQuery is a lightweight library that allows UI manipulation in a syntactically similar way to the Javascript library JQuery. AQuery aims to remove the boilerplate code that comes with UI manipulation ...

    Pragmatic Guide to Sass 3

    《Pragmatic Guide to Sass 3》是一本由Hampton Lintorn Catlin与Michael Lintorn Catlin共同编写的关于Sass(Syntactically Awesome Style Sheets)的专业指南。本书旨在帮助前端开发者更好地理解和运用Sass这一...

    node-sass.win32-x64-47_binding.node

    在Node.js开发环境中,我们经常会遇到处理CSS预处理器的需求,其中Sass(Syntactically Awesome Style Sheets)是一种广泛应用的语言,它扩展了CSS,提供了更强大的功能,如变量、嵌套规则、混合、函数等。...

    tv-app:https

    2. **Sass**:Sass(Syntactically Awesome Style Sheets)是一种CSS预处理器,允许开发者使用变量、嵌套规则、混合、函数等特性编写更易于维护和扩展的CSS代码。 3. **Webpack**:Webpack 是一个模块打包工具,能够...

    mern-azure-client

    标题"Mern-azure-client"揭示了我们正在讨论的是一个基于MERN栈的项目,它已经集成了Azure服务,特别是客户端部分。MERN是MongoDB、Express.js、React和Node.js的首字母缩写,是一种流行的JavaScript全栈开发框架。...

    dart-sass-1.22.9-windows-x64.zip

    Sass(Syntactically Awesome Style Sheets)是一种CSS预处理器,它扩展了CSS的功能,允许我们使用变量、嵌套规则、混合、函数等编程特性来编写更易于管理和维护的样式表。Dart Sass作为Sass的实现,与Ruby Sass保持...

Global site tag (gtag.js) - Google Analytics