posts - 431,  comments - 344,  trackbacks - 0
          公告
           Don't Repeat Yourself
          座右銘:you can lose your money, you can spent all of it, and if you work hard you get it all back. But if you waste your time, you're never gonna get it back.
          公告本博客在此聲明部分文章為轉摘,只做資料收集使用。


          微信: szhourui
          QQ:109450684
          Email
          lsi.zhourui@gmail.com
          <2009年3月>
          22232425262728
          1234567
          891011121314
          15161718192021
          22232425262728
          2930311234

          留言簿(15)

          隨筆分類(1019)

          文章分類(3)

          文章檔案(21)

          收藏夾

          Link

          好友博客

          最新隨筆

          搜索

          •  

          積分與排名

          • 積分 - 860072
          • 排名 - 44

          最新評論

          閱讀排行榜

          @RequestParam注解用于在控制器中綁定請求參數到方法參數.
          用法如下:
          @RequestMapping
           public void advancedSearch(
             @RequestParam("queryStr") String queryStr,
             @RequestParam("showFlag") String showFlag,
             @RequestParam("totalnumber") String totalNumber,
             @RequestParam("upType") String upType,
             @RequestParam("jmesareq") String jmesaReq,
             @RequestParam("isExportOper") String isExportOper,

             HttpServletResponse response, final HttpServletRequest request,
             ModelMap model) {
            // get query structure and query type from page
            List<Long> cd_ids = new ArrayList<Long>();
            if(StringUtils.equals("invoke", jmesaReq)){
             cd_ids = (List<Long>)request.getSession().getAttribute(Constants.RESULT_IDS);
            }
           ....
           }

          使用這個注解參數默認是必需的, 但是可以把@RequestParam的required屬性設置為false從而讓這個參數可選.
          例如@RequestParam(value="name", required="false")
          posted on 2009-03-17 16:26 周銳 閱讀(11694) 評論(2)  編輯  收藏 所屬分類: Spring
          主站蜘蛛池模板: 启东市| 分宜县| 安丘市| 宜兰县| 永靖县| 台中县| 剑阁县| 安阳市| 西贡区| 浦县| 乐至县| 新乐市| 明水县| 九江市| 安陆市| 祁阳县| 岑巩县| 青铜峡市| 闸北区| 江山市| 泌阳县| 石城县| 兖州市| 新兴县| 鄄城县| 太原市| 革吉县| 民权县| 长泰县| 定结县| 当阳市| 浑源县| 重庆市| 朔州市| 兴山县| 安多县| 镇沅| 睢宁县| 神农架林区| 兴城市| 咸丰县|