update 使用 jackson 全局处理时间
parent
82509d3ffc
commit
bafb58cd8e
|
|
@ -25,23 +25,6 @@ import com.ruoyi.common.core.web.page.TableDataInfo;
|
|||
public class BaseController
|
||||
{
|
||||
|
||||
/**
|
||||
* 将前台传递过来的日期格式的字符串,自动转化为Date类型
|
||||
*/
|
||||
@InitBinder
|
||||
public void initBinder(WebDataBinder binder)
|
||||
{
|
||||
// Date 类型转换
|
||||
binder.registerCustomEditor(Date.class, new PropertyEditorSupport()
|
||||
{
|
||||
@Override
|
||||
public void setAsText(String text)
|
||||
{
|
||||
setValue(DateUtils.parseDate(text));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置请求分页数据
|
||||
*/
|
||||
|
|
|
|||
Loading…
Reference in New Issue