Search in sources :

Example 1 with EcLogAnnotation

use of com.easy.cloud.core.common.log.annotation.EcLogAnnotation in project dq-easy-cloud by dq-open-cloud.

the class EcBaseController method initBinder.

@EcLogAnnotation(logSwitch = false, analysisSwitch = false)
@InitBinder
public void initBinder(WebDataBinder webDataBinder) {
    DateFormat dateFormat = new SimpleDateFormat(EcDateFormatUtils.FORMAT_NORMAL_DAY);
    webDataBinder.registerCustomEditor(Date.class, new CustomDateEditor(dateFormat, true));
// webDataBinder.registerCustomEditor(Date.class, new CustomDateEditor(new SimpleDateFormat(DqDateFormatUtils.FORMAT_NORMAL), true));
}
Also used : CustomDateEditor(org.springframework.beans.propertyeditors.CustomDateEditor) SimpleDateFormat(java.text.SimpleDateFormat) DateFormat(java.text.DateFormat) SimpleDateFormat(java.text.SimpleDateFormat) InitBinder(org.springframework.web.bind.annotation.InitBinder) EcLogAnnotation(com.easy.cloud.core.common.log.annotation.EcLogAnnotation)

Aggregations

EcLogAnnotation (com.easy.cloud.core.common.log.annotation.EcLogAnnotation)1 DateFormat (java.text.DateFormat)1 SimpleDateFormat (java.text.SimpleDateFormat)1 CustomDateEditor (org.springframework.beans.propertyeditors.CustomDateEditor)1 InitBinder (org.springframework.web.bind.annotation.InitBinder)1