Request method 'GET' not supported

Tomcat 报错信息如下:
HTTP Status 405 - Request method 'GET' not supported


type Status report


message Request method 'GET' not supported


description The specified HTTP method is not allowed for the requested resource (Request method 'GET' not supported).


Apache Tomcat/6.0.33

在网上搜了一下大家都说是servlet的doget 或dopost方法没有重写

我的根本就不是这情况我是用Json往控制器传输数据的时候报的错 原因是json对日期的封装没有弄好

就是json传时间的原因 如果之有年月日 那很简单 如果有时分秒就要小心了在bean里的get和set方法上加注解如下

@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss", timezone="GMT+08:00")

在bean类前面加

@JsonIdentityInfo(generator=ObjectIdGenerators.IntSequenceGenerator.class, property="jsonid")这样就能解决十分秒的问题了

原文详细信息见我百度空间

http://hi.baidu.com/294286540/item/b509bb0e04a2a77bbfe97e80


  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值