在Spring MVC框架中 时间 类型的数据无法自动绑定,需要
在bien的日期属性用@DateTimeFormat注解

joda-time-2.9.9.jar
<dependency> <groupId>joda-time</groupId> <artifactId>joda-time</artifactId>
<version>2.9.9</version> </dependency> @Scope("prototype")
//是否是单例注解,prototype:不是单例,singleton:单例,默认值 @Component public class Bbs_detail {
private Integer id; private String title; private String picPath; private
String author; @DateTimeFormat(pattern = "yyyy-MM-dd") private Date createDate;
@DateTimeFormat(pattern = "yyyy-MM-dd") private Date modifyDate; private
Integer accessCount;

友情链接
ioDraw流程图
API参考文档
OK工具箱
云服务器优惠
阿里云优惠券
腾讯云优惠券
华为云优惠券
站点信息
问题反馈
邮箱:ixiaoyang8@qq.com
QQ群:637538335
关注微信