{"id":1686,"date":"2017-07-24T15:50:24","date_gmt":"2017-07-24T07:50:24","guid":{"rendered":"http:\/\/www.xttblog.com\/?p=1686"},"modified":"2017-07-24T15:50:24","modified_gmt":"2017-07-24T07:50:24","slug":"parameterizableviewcontroller%ef%bc%88%e5%8f%82%e6%95%b0%e5%8c%96%e8%a7%86%e5%9b%be%e6%8e%a7%e5%88%b6%e5%99%a8%ef%bc%89","status":"publish","type":"post","link":"https:\/\/www.xttblog.com\/?p=1686","title":{"rendered":"ParameterizableViewController\uff08\u53c2\u6570\u5316\u89c6\u56fe\u63a7\u5236\u5668\uff09"},"content":{"rendered":"<p>\n\tParameterizableViewController\u53c2\u6570\u5316\u89c6\u56fe\u63a7\u5236\u5668\uff0c\u4e0d\u8fdb\u884c\u529f\u80fd\u5904\u7406\uff08\u5373\u9759\u6001\u89c6\u56fe\uff09\uff0c\u6839\u636e\u53c2\u6570\u7684\u903b\u8f91\u89c6\u56fe\u540d\u76f4\u63a5\u9009\u62e9\u9700\u8981\u5c55\u793a\u7684\u89c6\u56fe\u3002&nbsp;\n<\/p>\n<p>\n\t\u8be5\u63a7\u5236\u5668\u63a5\u6536\u5230\u8bf7\u6c42\u540e\u76f4\u63a5\u9009\u62e9\u53c2\u6570\u5316\u7684\u89c6\u56fe\uff0c\u8fd9\u6837\u7684\u597d\u5904\u662f\u5728\u914d\u7f6e\u6587\u4ef6\u4e2d\u914d\u7f6e\uff0c\u4ece\u800c\u907f\u514d\u7a0b\u5e8f\u7684\u786c\u7f16\u7801\uff0c\u6bd4\u5982\u50cf\u5e2e\u52a9\u9875\u9762\u7b49\u4e0d\u9700\u8981\u8fdb\u884c\u529f\u80fd\u5904\u7406\uff0c\u56e0\u6b64\u76f4\u63a5\u4f7f\u7528\u8be5\u63a7\u5236\u5668\u6620\u5c04\u5230\u89c6\u56fe\u3002\n<\/p>\n<p>\n\t\u4e0b\u9762\u6765\u770b\u4e00\u4e2a\u5b9e\u9645\u4f7f\u7528\u4e2d\u7684\u4e00\u4e2a\u4f8b\u5b50\uff1a\n<\/p>\n<p>\n\t\u9879\u76ee\u89c4\u5b9a\u6240\u6709\u7684Url\u90fd\u5fc5\u987b\u4e3a.action\u7ed3\u5c3e\uff0c\u4f46\u662f\u6211\u6709\u4e00\u4e2ahtml\u7684\u9875\u9762\u5c31\u662f\u4e00\u4e2a\u666e\u901a\u9875\u9762\u3002\u4f46\u662f\u53c8\u4e0d\u80fd\u76f4\u63a5\u66b4\u6f0f\u8fd9\u4e2a\u8d44\u6e90\uff08xxx.html\u76f4\u63a5\u8bbf\u95ee\uff09\u3002\u901a\u5e38\u4eba\u4eec\u5c31\u60f3\u5230\uff0c\u6211\u5199\u4e00\u4e2aController\u7c7b\u6765\u5b9e\u73b0\u5c31\u53ef\u4ee5\u4e86\u3002\u7136\u540e\u5199\u4e00\u4e2a\u65b9\u6cd5\uff0c\u8fd4\u56de\u8fd9\u4e2a\u9875\u9762\u3002 \u4f8b\u5982\u4e0b\u9762\u7684\u4ee3\u7801\uff1a\n<\/p>\n<pre class=\"brush:java;\">\r\n@Controller\r\n@RequestMapping(&quot;\/&quot;)\r\npublic class HomeHandler {\r\n    @Autowired@Qualifier(&quot;helloWorldClient&quot;)\r\n    HelloCXF helloCxf;\r\n    @RequestMapping(&quot;home&quot;)\r\n    public String home(HttpServletRequest request,Model model){\r\n        return &quot;xttblog.html&quot;\r\n    }\r\n}<\/pre>\n<p>\n\t\u4e0a\u9762\u7684\u4ee3\u7801\u5b8c\u5168\u53ef\u884c\u3002\u4f46\u662f\u4ee3\u7801\u6709\u70b9\u591a\uff0c\u80fd\u4e0d\u80fd\u6709\u66f4\u7b80\u6d01\u7684\u5b9e\u73b0\u65b9\u6cd5\u5462\uff1f\n<\/p>\n<p>\n\t\u7b54\u6848\u662f\u6709\u7684\u3002SpringMVC\u7ed9\u6211\u4eec\u63d0\u4f9b\u4e00\u4e2a\u63a7\u5236\u5668ParameterizableViewController\u3002org.springframework.web.servlet.mvc.ParameterizableViewController \u53ef\u4ee5\u4ea7\u751f\u540c\u4e0a\u9762\u4e00\u6837\u7684\u6548\u679c\uff0c\u4f46\u662f\u6211\u4eec\u53ea\u9700\u8981\u5728\u914d\u7f6e\u6587\u4ef6\u4e2d\u53bb\u914d\u7f6e\u5c31\u53ef\u4ee5\u4e86\u3002\n<\/p>\n<pre class=\"brush:xml;\">\r\n&lt;bean name=&quot;\/index.action&quot; class=&quot;org.springframework.web.servlet.mvc.ParameterizableViewController&quot;&gt;\r\n     &lt;property name=&quot;viewName&quot; value=&quot;\/index.jsp&quot;\/&gt;\r\n&lt;\/bean&gt;\r\n<\/pre>\n<!-- <audio autoplay=\"autoplay\" height=\"100\" width=\"100\" hidden=\"true\"><source src=\"https:\/\/c.coka.la\/orAvPR.mp3\" type=\"audio\/mp3\"\/><\/audio><img decoding=\"async\" src=\"https:\/\/images.weserv.nl\/?url=https:\/\/ws3.sinaimg.cn\/large\/8fa5dcfcgy1g4em3rzar5j20ib089ae0.jpg\" alt=\"\u4e1a\u4f59\u8349\u516c\u4f17\u53f7\"\/> --><p><!-- <img decoding=\"async\" src=\"https:\/\/raw.githubusercontent.com\/xmt1139057136\/xttblog\/master\/8fa5dcfcgy1g4em3rzar5j20ib089ae0.jpg\" alt=\"\u4e1a\u4f59\u8349\u516c\u4f17\u53f7\"\/>--><img decoding=\"async\" src=\"https:\/\/saas.51autoparts.cn\/api\/admin\/sys-file\/oss\/file?fileName=84db51f8561e448f9a4fda2eff0811f9.jpg\" alt=\"\u4e1a\u4f59\u8349\u516c\u4f17\u53f7\"\/><\/p><p>\u6700\u540e\uff0c\u6b22\u8fce\u5173\u6ce8\u6211\u7684\u4e2a\u4eba\u5fae\u4fe1\u516c\u4f17\u53f7\uff1a\u4e1a\u4f59\u8349\uff08yyucao\uff09\uff01<b>\u53ef\u52a0\u4f5c\u8005\u5fae\u4fe1\u53f7\uff1a<font color=\"red\">xttblog2<\/font>\u3002\u5907\u6ce8\uff1a\u201c1\u201d\uff0c\u6dfb\u52a0\u535a\u4e3b\u5fae\u4fe1\u62c9\u4f60\u8fdb\u5fae\u4fe1\u7fa4\u3002\u5907\u6ce8\u9519\u8bef\u4e0d\u4f1a\u540c\u610f\u597d\u53cb\u7533\u8bf7\u3002<\/b>\u518d\u6b21\u611f\u8c22\u60a8\u7684\u5173\u6ce8\uff01\u540e\u7eed\u6709\u7cbe\u5f69\u5185\u5bb9\u4f1a\u7b2c\u4e00\u65f6\u95f4\u53d1\u7ed9\u60a8\uff01\u539f\u521b\u6587\u7ae0\u6295\u7a3f\u8bf7\u53d1\u9001\u81f3532009913@qq.com\u90ae\u7bb1\u3002\u5546\u52a1\u5408\u4f5c\u4e5f\u53ef\u6dfb\u52a0\u4f5c\u8005\u5fae\u4fe1\u8fdb\u884c\u8054\u7cfb\uff01<\/p><p>\u672c\u6587\u539f\u6587\u51fa\u5904\uff1a<a href=\"https:\/\/www.xttblog.com\">\u4e1a\u4f59\u8349<\/a>\uff1a &raquo; <a href=\"https:\/\/www.xttblog.com\/?p=1686\">ParameterizableViewController\uff08\u53c2\u6570\u5316\u89c6\u56fe\u63a7\u5236\u5668\uff09<\/a><\/p><!-- <div class=\"bd-reward-stl\"><button id=\"bdRewardBtn\"><span><\/span><\/button><\/div> -->","protected":false},"excerpt":{"rendered":"<p>ParameterizableViewController\u53c2\u6570\u5316\u89c6\u56fe\u63a7\u5236\u5668\uff0c\u4e0d\u8fdb\u884c\u529f\u80fd\u5904\u7406\uff08\u5373\u9759\u6001\u89c6\u56fe\uff09\uff0c\u6839\u636e [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[1368,1397,1359,413],"class_list":["post-1686","post","type-post","status-publish","format-standard","hentry","category-java","tag-controller","tag-parameterizableviewcontroller","tag-spring-mvc-","tag-springmvc"],"_links":{"self":[{"href":"https:\/\/www.xttblog.com\/index.php?rest_route=\/wp\/v2\/posts\/1686","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.xttblog.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.xttblog.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.xttblog.com\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.xttblog.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1686"}],"version-history":[{"count":1,"href":"https:\/\/www.xttblog.com\/index.php?rest_route=\/wp\/v2\/posts\/1686\/revisions"}],"predecessor-version":[{"id":1687,"href":"https:\/\/www.xttblog.com\/index.php?rest_route=\/wp\/v2\/posts\/1686\/revisions\/1687"}],"wp:attachment":[{"href":"https:\/\/www.xttblog.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1686"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.xttblog.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1686"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.xttblog.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1686"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}