| 123456789101112131415161718192021 |
- package com.izouma.awesomeadmin.web;
- import java.beans.PropertyEditorSupport;
- import java.util.Date;
- import org.springframework.web.bind.WebDataBinder;
- import org.springframework.web.bind.annotation.InitBinder;
- public class BaseController {
- @InitBinder
- protected void initBinder(WebDataBinder binder) {
- binder.registerCustomEditor(Date.class, new PropertyEditorSupport() {
- @Override
- public void setAsText(String value) {
- setValue(new Date(Long.valueOf(value)));
- }
- });
- }
- }
|