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
          <2016年5月>
          24252627282930
          1234567
          891011121314
          15161718192021
          22232425262728
          2930311234

          留言簿(15)

          隨筆分類(1019)

          文章分類(3)

          文章檔案(21)

          收藏夾

          Link

          好友博客

          最新隨筆

          搜索

          •  

          積分與排名

          • 積分 - 860744
          • 排名 - 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 周銳 閱讀(11695) 評論(2)  編輯  收藏 所屬分類: Spring
          主站蜘蛛池模板: 井研县| 博兴县| 思茅市| 双江| 台安县| 延川县| 隆化县| 津南区| 彰武县| 晋中市| 彝良县| 平潭县| 浮山县| 宁夏| 新宾| 青川县| 肇东市| 临高县| 马边| 杭锦旗| 南昌市| 牟定县| 迁西县| 海安县| 姜堰市| 玛纳斯县| 绍兴市| 云和县| 沈丘县| 皋兰县| 时尚| 银川市| 思茅市| 阳春市| 余庆县| 贞丰县| 景德镇市| 太谷县| 九龙县| 泰和县| 化隆|