springMvc時間格式化



<mvc:annotation-driven>  <mvc:message-converters register-defaults="true">  <bean class="org.springframework.http.converter.StringHttpMessageConverter">  <constructor-arg value="UTF-8"/>  </bean>  <bean class="org.springframework.http.converter.json.MappingJackson2HttpMessageConverter">  <property name="supportedMediaTypes">  <list>  <value>*/*</value>  <value>text/html</value>  <value>application/json</value>  </list>  </property>  <property name="objectMapper">  <bean class="com.fasterxml.jackson.databind.ObjectMapper">  <property name="dateFormat">  <bean class="java.text.SimpleDateFormat">  <constructor-arg type="java.lang.String" value="yyyy-MM-dd HH:mm:ss" />  </bean>  </property>  </bean>  </property>  </bean>  </mvc:message-converters> </mvc:annotation-driven>
相關文章
相關標籤/搜索