{"id":62158,"date":"2026-01-19T14:09:59","date_gmt":"2026-01-19T06:09:59","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/62158.html"},"modified":"2026-01-19T14:09:59","modified_gmt":"2026-01-19T06:09:59","slug":"web%e5%bc%80%e5%8f%91%e8%bf%9b%e9%98%b6","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/62158.html","title":{"rendered":"Web\u5f00\u53d1\u8fdb\u9636"},"content":{"rendered":"<\/p>\n<h4>\u6587\u7ae0\u76ee\u5f55<\/h4>\n<ul>\n<li>1 \u9759\u6001\u8d44\u6e90\u8bbf\u95ee<\/li>\n<li>2 \u6587\u4ef6\u4e0a\u4f20<\/li>\n<li>\n<ul>\n<li>2.1 \u6587\u4ef6\u4e0a\u4f20\u539f\u7406<\/li>\n<li>2.2 SpringBoot\u5b9e\u73b0\u6587\u4ef6\u4e0a\u4f20\u529f\u80fd<\/li>\n<\/ul>\n<\/li>\n<li>3 \u62e6\u622a\u5668<\/li>\n<li>\n<ul>\n<li>3.1 \u62e6\u622a\u5668\u5b9a\u4e49<\/li>\n<li>3.2 \u62e6\u622a\u5668\u6ce8\u518c<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<h2>1 \u9759\u6001\u8d44\u6e90\u8bbf\u95ee<\/h2>\n<ul>\n<li>\n<p>\u4f7f\u7528IDEA\u521b\u5efaSpringBoot\u9879\u76ee&#xff0c;\u4f1a\u9ed8\u8ba4\u521b\u5efa\u51faclasspath:\/static\/\u76ee\u5f55&#xff0c;\u9759\u6001\u8d44\u6e90\u4e00\u822c\u653e\u5728\u8fd9\u4e2a\u76ee\u5f55\u4e0b\u3002\u5f53\u6ca1\u6709\u914d\u7f6e\u9759\u6001\u8d44\u6e90\u65f6&#xff0c;\/\u540e\u76f4\u63a5\u52a0\u9759\u6001\u8d44\u6e90\u7684\u540d\u79f0\u5373\u53ef\u8bbf\u95ee&#xff0c;\u4f8b\u5982&#xff1a;localhost:8080\/test.jpg\u3002<\/p>\n<\/li>\n<li>\n<p>\u5982\u679c\u9ed8\u8ba4\u7684\u9759\u6001\u8d44\u6e90\u8fc7\u6ee4\u7b56\u7565\u4e0d\u80fd\u6ee1\u8db3\u5f00\u53d1\u9700\u6c42&#xff0c;\u4e5f\u53ef\u4ee5\u81ea\u5b9a\u4e49\u9759\u6001\u8d44\u6e90\u8fc7\u6ee4\u7b56\u7565\u3002<\/p>\n<\/li>\n<li>\n<p>\u5728application.properties\u4e2d\u53ef\u4ee5\u76f4\u63a5\u5b9a\u4e49\u8fc7\u6ee4\u89c4\u5219\u548c\u9759\u6001\u8d44\u6e90\u4f4d\u7f6e\u3002\u901a\u8fc7static path\u8bbe\u7f6e\u865a\u62df\u8def\u5f84&#xff08;\u8fc7\u6ee4\u89c4\u5219&#xff09;&#xff0c;\u5728\u8d44\u6e90\u524d\u52a0\u4e00\u4e2a\u7edf\u4e00\u7684\u8def\u5f84&#xff0c;\u65b9\u4fbf\u7ba1\u7406&#xff1b;\u901a\u8fc7static locations\u8fdb\u884c\u4fee\u6539\u8def\u5f84&#xff0c;\u5c06\u9759\u6001\u8d44\u6e90\u653e\u5728\u81ea\u521b\u6587\u4ef6\u4e2d\u3002\u5176\u4e2d&#xff0c;classpath\u662f\u6574\u4e2a\u9879\u76ee\u7684\u7c7b\u8def\u5f84&#xff0c;\u5728target\/classes\u76ee\u5f55\u4e2d&#xff0c;\u662f\u6307\u5411\u9879\u76ee\u5185\u90e8\u8d44\u6e90\u6587\u4ef6\u7684&#034;\u5feb\u6377\u65b9\u5f0f&#034;\u3002<\/p>\n<p> spring<span class=\"token punctuation\">.<\/span>mvc<span class=\"token punctuation\">.<\/span><span class=\"token keyword\">static<\/span><span class=\"token operator\">&#8211;<\/span>path<span class=\"token operator\">&#8211;<\/span>pattern<span class=\"token operator\">&#061;<\/span><span class=\"token operator\">\/<\/span>images<span class=\"token comment\">\/**<br \/>\n<\/span> spring<span class=\"token punctuation\">.<\/span>web<span class=\"token punctuation\">.<\/span>resources<span class=\"token punctuation\">.<\/span><span class=\"token keyword\">static<\/span><span class=\"token operator\">&#8211;<\/span>locations<span class=\"token operator\">&#061;<\/span>classpath<span class=\"token operator\">:<\/span><span class=\"token operator\">\/<\/span>css<\/p>\n<p>\u8fc7\u6ee4\u89c4\u5219\u4e3a\/static\/**&#xff0c;\u9759\u6001\u8d44\u6e90\u4f4d\u7f6e\u4e3aclasspath:\/static\/\u3002<\/p>\n<\/li>\n<li>\n<p>\u6ce8\u610f&#xff1a;\u5728\u524d\u540e\u7aef\u5206\u79bb\u7684\u9879\u76ee\u4e2d&#xff0c;static\u4e0d\u4f1a\u5b58\u653e\u5185\u5bb9\u3002<\/p>\n<\/li>\n<li>\n<p>\u9879\u76ee\u7ed3\u6784&#xff1a;<\/p>\n<p> my<span class=\"token operator\">&#8211;<\/span>project<span class=\"token operator\">\/<\/span><br \/>\n\u251c\u2500\u2500 src<span class=\"token operator\">\/<\/span><br \/>\n\u2502   \u2514\u2500\u2500 main<span class=\"token operator\">\/<\/span><br \/>\n\u2502       \u251c\u2500\u2500 java<span class=\"token operator\">\/<\/span>          <span class=\"token comment\">\/\/ Java\u6e90\u4ee3\u7801<\/span><br \/>\n\u2502       \u2514\u2500\u2500 resources<span class=\"token operator\">\/<\/span>     <span class=\"token comment\">\/\/ \u8d44\u6e90\u6587\u4ef6<\/span><br \/>\n\u2502           \u251c\u2500\u2500 <span class=\"token keyword\">static<\/span><span class=\"token operator\">\/<\/span>    <span class=\"token comment\">\/\/ \u9759\u6001\u8d44\u6e90<\/span><br \/>\n\u2502           \u2502   \u251c\u2500\u2500 css<span class=\"token operator\">\/<\/span><br \/>\n\u2502           \u2502   \u251c\u2500\u2500 js<span class=\"token operator\">\/<\/span><br \/>\n\u2502           \u2502   \u2514\u2500\u2500 images<span class=\"token operator\">\/<\/span><br \/>\n\u2502           \u2514\u2500\u2500 application<span class=\"token punctuation\">.<\/span>properties<br \/>\n\u251c\u2500\u2500 target<span class=\"token operator\">\/<\/span><br \/>\n\u2502   \u2514\u2500\u2500 classes<span class=\"token operator\">\/<\/span>           <span class=\"token comment\">\/\/ \u7f16\u8bd1\u540e\u7684\u6587\u4ef6&#xff08;\u5728classpath\u4e2d&#xff09;<\/span><br \/>\n\u2502       \u251c\u2500\u2500 <span class=\"token keyword\">static<\/span><span class=\"token operator\">\/<\/span><br \/>\n\u2502       \u2502   \u251c\u2500\u2500 css<span class=\"token operator\">\/<\/span><br \/>\n\u2502       \u2502   \u251c\u2500\u2500 js<span class=\"token operator\">\/<\/span><br \/>\n\u2502       \u2502   \u2514\u2500\u2500 images<span class=\"token operator\">\/<\/span><br \/>\n\u2502       \u2514\u2500\u2500 application<span class=\"token punctuation\">.<\/span>properties<br \/>\n\u2514\u2500\u2500 pom<span class=\"token punctuation\">.<\/span>xml\n <\/li>\n<\/ul>\n<h2>2 \u6587\u4ef6\u4e0a\u4f20<\/h2>\n<h3>2.1 \u6587\u4ef6\u4e0a\u4f20\u539f\u7406<\/h3>\n<p>\u8868\u5355\u7684 enctype \u5c5e\u6027\u89c4\u5b9a\u5728\u53d1\u9001\u5230\u670d\u52a1\u5668\u4e4b\u524d\u5e94\u8be5\u5982\u4f55\u5bf9\u8868\u5355\u6570\u636e\u8fdb\u884c\u7f16\u7801\u3002 \u5f53enctype&#061;&#034;application\/x-www-form-urlencoded&#034;&#xff08;\u9ed8\u8ba4&#xff09;\u65f6&#xff0c;form\u8868\u5355\u4e2d\u7684\u6570\u636e\u683c\u5f0f\u4e3a&#xff1a;key&#061;value&amp;key&#061;value&#xff1b;\u5f53enctype&#061;&#034;multipart\/form-data&#034;\u65f6&#xff0c;\u5176\u4f20\u8f93\u6570\u636e\u5f62\u5f0f\u4e3a&#xff1a;<\/p>\n<p>POST <span class=\"token operator\">\/<\/span>upload HTTP<span class=\"token operator\">\/<\/span><span class=\"token number\">1.1<\/span><br \/>\n<span class=\"token class-name\">Content<\/span><span class=\"token operator\">&#8211;<\/span><span class=\"token class-name\">Type<\/span><span class=\"token operator\">:<\/span> multipart<span class=\"token operator\">\/<\/span>form<span class=\"token operator\">&#8211;<\/span>data<span class=\"token punctuation\">;<\/span> boundary<span class=\"token operator\">&#061;<\/span><span class=\"token operator\">&#8212;<\/span><span class=\"token operator\">&#8212;<\/span><span class=\"token class-name\">WebKitFormBoundaryABC123<\/span><\/p>\n<p><span class=\"token operator\">&#8212;<\/span><span class=\"token operator\">&#8212;<\/span><span class=\"token operator\">&#8212;<\/span><span class=\"token class-name\">WebKitFormBoundaryABC123<\/span><br \/>\n<span class=\"token class-name\">Content<\/span><span class=\"token operator\">&#8211;<\/span><span class=\"token class-name\">Disposition<\/span><span class=\"token operator\">:<\/span> form<span class=\"token operator\">&#8211;<\/span>data<span class=\"token punctuation\">;<\/span> name<span class=\"token operator\">&#061;<\/span><span class=\"token string\">&#034;username&#034;<\/span><\/p>\n<p>\u5f20\u4e09<br \/>\n<span class=\"token operator\">&#8212;<\/span><span class=\"token operator\">&#8212;<\/span><span class=\"token operator\">&#8212;<\/span><span class=\"token class-name\">WebKitFormBoundaryABC123<\/span><br \/>\n<span class=\"token class-name\">Content<\/span><span class=\"token operator\">&#8211;<\/span><span class=\"token class-name\">Disposition<\/span><span class=\"token operator\">:<\/span> form<span class=\"token operator\">&#8211;<\/span>data<span class=\"token punctuation\">;<\/span> name<span class=\"token operator\">&#061;<\/span><span class=\"token string\">&#034;avatar&#034;<\/span><span class=\"token punctuation\">;<\/span> filename<span class=\"token operator\">&#061;<\/span><span class=\"token string\">&#034;photo.jpg&#034;<\/span><br \/>\n<span class=\"token class-name\">Content<\/span><span class=\"token operator\">&#8211;<\/span><span class=\"token class-name\">Type<\/span><span class=\"token operator\">:<\/span> image<span class=\"token operator\">\/<\/span>jpeg<\/p>\n<p><span class=\"token punctuation\">[<\/span>\u8fd9\u91cc\u662fphoto<span class=\"token punctuation\">.<\/span>jpg\u6587\u4ef6\u7684\u4e8c\u8fdb\u5236\u6570\u636e<span class=\"token punctuation\">.<\/span><span class=\"token punctuation\">.<\/span><span class=\"token punctuation\">.<\/span><span class=\"token punctuation\">]<\/span><br \/>\n<span class=\"token operator\">&#8212;<\/span><span class=\"token operator\">&#8212;<\/span><span class=\"token operator\">&#8212;<\/span><span class=\"token class-name\">WebKitFormBoundaryABC123<\/span><br \/>\n<span class=\"token class-name\">Content<\/span><span class=\"token operator\">&#8211;<\/span><span class=\"token class-name\">Disposition<\/span><span class=\"token operator\">:<\/span> form<span class=\"token operator\">&#8211;<\/span>data<span class=\"token punctuation\">;<\/span> name<span class=\"token operator\">&#061;<\/span><span class=\"token string\">&#034;document&#034;<\/span><span class=\"token punctuation\">;<\/span> filename<span class=\"token operator\">&#061;<\/span><span class=\"token string\">&#034;report.pdf&#034;<\/span><br \/>\n<span class=\"token class-name\">Content<\/span><span class=\"token operator\">&#8211;<\/span><span class=\"token class-name\">Type<\/span><span class=\"token operator\">:<\/span> application<span class=\"token operator\">\/<\/span>pdf<\/p>\n<p><span class=\"token punctuation\">[<\/span>\u8fd9\u91cc\u662freport<span class=\"token punctuation\">.<\/span>pdf\u6587\u4ef6\u7684\u4e8c\u8fdb\u5236\u6570\u636e<span class=\"token punctuation\">.<\/span><span class=\"token punctuation\">.<\/span><span class=\"token punctuation\">.<\/span><span class=\"token punctuation\">]<\/span><br \/>\n<span class=\"token operator\">&#8212;<\/span><span class=\"token operator\">&#8212;<\/span><span class=\"token operator\">&#8212;<\/span><span class=\"token class-name\">WebKitFormBoundaryABC123<\/span><span class=\"token operator\">&#8212;<\/span><\/p>\n<h3>2.2 SpringBoot\u5b9e\u73b0\u6587\u4ef6\u4e0a\u4f20\u529f\u80fd<\/h3>\n<ul>\n<li>\n<p>SpringBoot\u5de5\u7a0b\u5d4c\u5165\u7684tomcat\u9650\u5236\u4e86\u8bf7\u6c42\u7684\u6587\u4ef6\u5927\u5c0f&#xff0c;\u6bcf\u4e2a\u6587\u4ef6\u7684\u914d\u7f6e\u6700\u5927\u4e3a1Mb&#xff0c;\u5355\u6b21\u8bf7\u6c42\u7684\u6587\u4ef6\u7684\u603b\u6570\u4e0d\u80fd\u5927\u4e8e10Mb\u3002<\/p>\n<\/li>\n<li>\n<p>\u8981\u66f4\u6539\u8fd9\u4e2a\u9ed8\u8ba4\u503c\u9700\u8981\u5728\u914d\u7f6e\u6587\u4ef6&#xff08;application.properties&#xff09;\u4e2d\u52a0\u5165\u4e24\u4e2a\u914d\u7f6e&#xff1a;<\/p>\n<p> spring<span class=\"token punctuation\">.<\/span>servlet<span class=\"token punctuation\">.<\/span>multipart<span class=\"token punctuation\">.<\/span>max<span class=\"token operator\">&#8211;<\/span>file<span class=\"token operator\">&#8211;<\/span>size<span class=\"token operator\">&#061;<\/span><span class=\"token number\">10<\/span>MB<br \/>\nspring<span class=\"token punctuation\">.<\/span>servlet<span class=\"token punctuation\">.<\/span>multipart<span class=\"token punctuation\">.<\/span>max<span class=\"token operator\">&#8211;<\/span>request<span class=\"token operator\">&#8211;<\/span>size<span class=\"token operator\">&#061;<\/span><span class=\"token number\">10<\/span>MB\n <\/li>\n<li>\n<p>\u5f53\u8868\u5355\u7684enctype&#061;&#034;multipart\/form-data&#034;\u65f6&#xff0c;\u53ef\u4ee5\u4f7f\u7528 MultipartFile \u83b7\u53d6\u4e0a\u4f20\u7684\u6587\u4ef6\u6570\u636e&#xff0c;\u518d\u901a\u8fc7transferTo\u65b9\u6cd5\u5c06\u5176\u5199\u5165\u5230\u78c1\u76d8\u4e2d\u3002<\/p>\n<\/li>\n<\/ul>\n<p><span class=\"token annotation punctuation\">&#064;RestController<\/span><br \/>\n<span class=\"token keyword\">public<\/span> <span class=\"token keyword\">class<\/span> <span class=\"token class-name\">FileUploadController<\/span> <span class=\"token punctuation\">{<\/span><br \/>\n    <span class=\"token annotation punctuation\">&#064;PostMapping<\/span><span class=\"token punctuation\">(<\/span><span class=\"token string\">&#034;\/upload&#034;<\/span><span class=\"token punctuation\">)<\/span><br \/>\n    <span class=\"token keyword\">public<\/span> <span class=\"token class-name\">String<\/span> <span class=\"token function\">upload<\/span><span class=\"token punctuation\">(<\/span><span class=\"token class-name\">String<\/span> nickname<span class=\"token punctuation\">,<\/span> <span class=\"token class-name\">MultipartFile<\/span> photo<span class=\"token punctuation\">,<\/span> <span class=\"token class-name\">HttpServletRequest<\/span> request<span class=\"token punctuation\">)<\/span><span class=\"token keyword\">throws<\/span> <span class=\"token class-name\">IOException<\/span><span class=\"token punctuation\">{<\/span><br \/>\n        <span class=\"token class-name\">System<\/span><span class=\"token punctuation\">.<\/span>out<span class=\"token punctuation\">.<\/span><span class=\"token function\">println<\/span><span class=\"token punctuation\">(<\/span>nickname<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><br \/>\n        <span class=\"token class-name\">System<\/span><span class=\"token punctuation\">.<\/span>out<span class=\"token punctuation\">.<\/span><span class=\"token function\">println<\/span><span class=\"token punctuation\">(<\/span>photo<span class=\"token punctuation\">.<\/span><span class=\"token function\">getOriginalFilename<\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><br \/>\n        <span class=\"token class-name\">System<\/span><span class=\"token punctuation\">.<\/span>out<span class=\"token punctuation\">.<\/span><span class=\"token function\">println<\/span><span class=\"token punctuation\">(<\/span>photo<span class=\"token punctuation\">.<\/span><span class=\"token function\">getContentType<\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><\/p>\n<p>        <span class=\"token class-name\">String<\/span> path <span class=\"token operator\">&#061;<\/span> request<span class=\"token punctuation\">.<\/span><span class=\"token function\">getServletContext<\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">.<\/span><span class=\"token function\">getRealPath<\/span><span class=\"token punctuation\">(<\/span><span class=\"token string\">&#034;\/upload\/&#034;<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><br \/>\n        <span class=\"token class-name\">System<\/span><span class=\"token punctuation\">.<\/span>out<span class=\"token punctuation\">.<\/span><span class=\"token function\">println<\/span><span class=\"token punctuation\">(<\/span>path<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><br \/>\n        <span class=\"token function\">saveFile<\/span><span class=\"token punctuation\">(<\/span>photo<span class=\"token punctuation\">,<\/span>path<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><br \/>\n        <span class=\"token keyword\">return<\/span> <span class=\"token string\">&#034;success upload&#034;<\/span><span class=\"token punctuation\">;<\/span><br \/>\n    <span class=\"token punctuation\">}<\/span><\/p>\n<p>    <span class=\"token keyword\">public<\/span> <span class=\"token keyword\">void<\/span> <span class=\"token function\">saveFile<\/span><span class=\"token punctuation\">(<\/span><span class=\"token class-name\">MultipartFile<\/span> photo<span class=\"token punctuation\">,<\/span><span class=\"token class-name\">String<\/span> path<span class=\"token punctuation\">)<\/span><span class=\"token keyword\">throws<\/span> <span class=\"token class-name\">IOException<\/span><span class=\"token punctuation\">{<\/span><br \/>\n        <span class=\"token class-name\">File<\/span> dir<span class=\"token operator\">&#061;<\/span><span class=\"token keyword\">new<\/span> <span class=\"token class-name\">File<\/span><span class=\"token punctuation\">(<\/span>path<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><br \/>\n        <span class=\"token keyword\">if<\/span> <span class=\"token punctuation\">(<\/span><span class=\"token operator\">!<\/span>dir<span class=\"token punctuation\">.<\/span><span class=\"token function\">exists<\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">{<\/span><br \/>\n            dir<span class=\"token punctuation\">.<\/span><span class=\"token function\">mkdir<\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><br \/>\n        <span class=\"token punctuation\">}<\/span><br \/>\n        <span class=\"token class-name\">File<\/span> file<span class=\"token operator\">&#061;<\/span><span class=\"token keyword\">new<\/span> <span class=\"token class-name\">File<\/span><span class=\"token punctuation\">(<\/span>path<span class=\"token operator\">&#043;<\/span>photo<span class=\"token punctuation\">.<\/span><span class=\"token function\">getOriginalFilename<\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><br \/>\n        photo<span class=\"token punctuation\">.<\/span><span class=\"token function\">transferTo<\/span><span class=\"token punctuation\">(<\/span>file<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><br \/>\n    <span class=\"token punctuation\">}<\/span><br \/>\n<span class=\"token punctuation\">}<\/span><\/p>\n<h2>3 \u62e6\u622a\u5668<\/h2>\n<p>\u62e6\u622a\u5668\u5728Web\u7cfb\u7edf\u4e2d\u975e\u5e38\u5e38\u89c1&#xff0c;\u5bf9\u4e8e\u67d0\u4e9b\u5168\u5c40\u7edf\u4e00\u7684\u64cd\u4f5c&#xff08;\u4e0d\u540c\u63a7\u5236\u5668\u53ef\u80fd\u9047\u89c1\u7684\u7edf\u4e00\u64cd\u4f5c&#xff09;&#xff0c;\u6211\u4eec\u53ef\u4ee5\u628a\u5b83\u63d0\u53d6\u5230\u62e6\u622a\u5668\u4e2d\u5b9e\u73b0\u3002\u603b\u7ed3\u8d77\u6765&#xff0c;\u62e6\u622a\u5668\u5927\u81f4\u6709\u4ee5\u4e0b\u51e0\u79cd\u4f7f\u7528\u573a\u666f&#xff1a;<\/p>\n<ul>\n<li>\u6743\u9650\u68c0\u67e5&#xff1a;\u5982\u767b\u5f55\u68c0\u6d4b&#xff0c;\u8fdb\u5165\u5904\u7406\u7a0b\u5e8f\u68c0\u6d4b\u662f\u5426\u767b\u5f55&#xff0c;\u5982\u679c\u6ca1\u6709&#xff0c;\u5219\u76f4\u63a5\u8fd4\u56de\u767b\u5f55\u9875\u9762\u3002<\/li>\n<li>\u6027\u80fd\u76d1\u63a7&#xff1a;\u6709\u65f6\u7cfb\u7edf\u5728\u67d0\u6bb5\u65f6\u95f4\u83ab\u540d\u5176\u5999\u5f88\u6162&#xff0c;\u53ef\u4ee5\u901a\u8fc7\u62e6\u622a\u5668\u5728\u8fdb\u5165\u5904\u7406\u7a0b\u5e8f\u4e4b\u524d\u8bb0\u5f55\u5f00\u59cb\u65f6\u95f4&#xff0c;\u5728\u5904\u7406\u5b8c\u540e\u8bb0\u5f55\u7ed3\u675f\u65f6\u95f4&#xff0c;\u4ece\u800c\u5f97\u5230\u8be5\u8bf7\u6c42\u7684\u5904\u7406\u65f6\u95f4\u3002<\/li>\n<li>\u901a\u7528\u884c\u4e3a&#xff1a;\u8bfb\u53d6cookie\u5f97\u5230\u7528\u6237\u4fe1\u606f\u5e76\u5c06\u7528\u6237\u5bf9\u8c61\u653e\u5165\u8bf7\u6c42&#xff0c;\u4ece\u800c\u65b9\u4fbf\u540e\u7eed\u6d41\u7a0b\u4f7f\u7528&#xff0c;\u8fd8\u6709\u63d0\u53d6Locale\u3001Theme\u4fe1\u606f\u7b49&#xff0c;\u53ea\u8981\u662f\u591a\u4e2a\u5904\u7406\u7a0b\u5e8f\u90fd\u9700\u8981\u7684&#xff0c;\u5373\u53ef\u4f7f\u7528\u62e6\u622a\u5668\u5b9e\u73b0\u3002<\/li>\n<li>\u7528\u6237\u63d0\u4ea4\u7684\u8bf7\u6c42\u90fd\u5148\u5230\u8fbe\u62e6\u622a\u5668&#xff0c;\u8c03\u7528prehandle&#xff0c;\u6700\u7ec8\u5230\u63a7\u5236\u5668\u7684\u76ee\u6807\u65b9\u6cd5\u4e2d&#xff0c;\u5230\u9875\u9762\u6e32\u67d3\u7ed3\u675f&#xff0c;\u518d\u8c03\u7528afterCompletion\u3002<\/li>\n<\/ul>\n<h3>3.1 \u62e6\u622a\u5668\u5b9a\u4e49<\/h3>\n<ul>\n<li>SpringBoot\u5b9a\u4e49\u4e86HandlerInterceptor\u63a5\u53e3\u6765\u5b9e\u73b0\u81ea\u5b9a\u4e49\u62e6\u622a\u5668\u7684\u529f\u80fd\u3002<\/li>\n<li>HandlerInterceptor\u63a5\u53e3\u5b9a\u4e49\u4e86preHandle\u3001postHandle\u3001afterCompletion\u4e09\u79cd\u65b9\u6cd5&#xff0c;\u901a\u8fc7\u91cd\u5199\u8fd9\u4e09\u79cd\u65b9\u6cd5\u5b9e\u73b0\u8bf7\u6c42\u524d\u3001\u8bf7\u6c42\u540e\u7b49\u64cd\u4f5c\u3002<\/li>\n<li>preHandle&#xff1a;\u5728Controller\u65b9\u6cd5\u4e4b\u524d\u6267\u884c\u3002<\/li>\n<li>postHandle&#xff1a;\u5728Controller\u65b9\u6cd5\u4e4b\u540e&#xff0c;\u89c6\u56fe\u6e32\u67d3\u4e4b\u524d\u6267\u884c\u3002<\/li>\n<li>afterCompletion&#xff1a;\u5728\u6574\u4e2a\u8bf7\u6c42\u5b8c\u6210\u4e4b\u540e\u6267\u884c\u3002<\/li>\n<\/ul>\n<p><span class=\"token comment\">\/\/\u6574\u4f53\u67b6\u6784<\/span><br \/>\n<span class=\"token comment\">\/\/ \u62e6\u622a\u5668\u5b9e\u73b0<\/span><br \/>\n<span class=\"token class-name\">LoginInterceptor<\/span> <span class=\"token punctuation\">(<\/span>\u5b9e\u73b0 <span class=\"token class-name\">HandlerInterceptor<\/span><span class=\"token punctuation\">)<\/span><\/p>\n<p><span class=\"token comment\">\/\/ \u914d\u7f6e\u7c7b<\/span><br \/>\n<span class=\"token class-name\">WebConfig<\/span> <span class=\"token punctuation\">(<\/span>\u5b9e\u73b0 <span class=\"token class-name\">WebMvcConfigurer<\/span><span class=\"token punctuation\">)<\/span><\/p>\n<p><span class=\"token keyword\">public<\/span> <span class=\"token keyword\">boolean<\/span> <span class=\"token function\">preHandle<\/span><span class=\"token punctuation\">(<\/span><br \/>\n    <span class=\"token class-name\">HttpServletRequest<\/span> request<span class=\"token punctuation\">,<\/span>   <span class=\"token comment\">\/\/ HTTP\u8bf7\u6c42\u5bf9\u8c61<\/span><br \/>\n    <span class=\"token class-name\">HttpServletResponse<\/span> response<span class=\"token punctuation\">,<\/span> <span class=\"token comment\">\/\/ HTTP\u54cd\u5e94\u5bf9\u8c61  <\/span><br \/>\n    <span class=\"token class-name\">Object<\/span> handler               <span class=\"token comment\">\/\/ \u5904\u7406\u8bf7\u6c42\u7684Controller\u65b9\u6cd5<\/span><br \/>\n<span class=\"token punctuation\">)<\/span> <span class=\"token keyword\">throws<\/span> <span class=\"token class-name\">Exception<\/span><\/p>\n<ul>\n<li>\u521b\u5efaInterceptor\u5305&#xff0c;\u5728\u4e0b\u9762\u521b\u5efaLoginInterceptor\u7c7b&#xff1a;<\/li>\n<\/ul>\n<p><span class=\"token keyword\">public<\/span> <span class=\"token keyword\">class<\/span> <span class=\"token class-name\">LoginInterceptor<\/span> <span class=\"token keyword\">implements<\/span> <span class=\"token class-name\">HandlerInterceptor<\/span> <span class=\"token punctuation\">{<\/span><br \/>\n<span class=\"token comment\">\/\/\u7ee7\u627f\u7cfb\u7edf\u7684\u62e6\u622a\u5668\u7c7bHandlerInterceptor<\/span><br \/>\n<span class=\"token comment\">\/\/\u91cd\u5199prehandle\u65b9\u6cd5<\/span><br \/>\n    <span class=\"token annotation punctuation\">&#064;Override<\/span><br \/>\n    <span class=\"token keyword\">public<\/span> <span class=\"token keyword\">boolean<\/span> <span class=\"token function\">preHandle<\/span><span class=\"token punctuation\">(<\/span><span class=\"token class-name\">HttpServletRequest<\/span> request<span class=\"token punctuation\">,<\/span> <span class=\"token class-name\">HttpServletResponse<\/span> response<span class=\"token punctuation\">,<\/span> <span class=\"token class-name\">Object<\/span> handler<span class=\"token punctuation\">)<\/span> <span class=\"token keyword\">throws<\/span> <span class=\"token class-name\">Exception<\/span> <span class=\"token punctuation\">{<\/span><br \/>\n        <span class=\"token class-name\">System<\/span><span class=\"token punctuation\">.<\/span>out<span class=\"token punctuation\">.<\/span><span class=\"token function\">println<\/span><span class=\"token punctuation\">(<\/span><span class=\"token string\">&#034;LoginInterceptor&#034;<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><br \/>\n        <span class=\"token keyword\">return<\/span> <span class=\"token boolean\">true<\/span><span class=\"token punctuation\">;<\/span><br \/>\n    <span class=\"token punctuation\">}<\/span><br \/>\n<span class=\"token punctuation\">}<\/span><\/p>\n<h3>3.2 \u62e6\u622a\u5668\u6ce8\u518c<\/h3>\n<ul>\n<li>addPathPatterns\u65b9\u6cd5\u5b9a\u4e49\u62e6\u622a\u7684\u5730\u5740\u3002<\/li>\n<li>excludePathPatterns\u5b9a\u4e49\u6392\u9664\u67d0\u4e9b\u5730\u5740\u4e0d\u88ab\u62e6\u622a\u3002<\/li>\n<li>\u6dfb\u52a0\u7684\u4e00\u4e2a\u62e6\u622a\u5668\u6ca1\u6709addPathPattern\u4efb\u4f55\u4e00\u4e2aurl\u5219\u9ed8\u8ba4\u62e6\u622a\u6240\u6709\u8bf7\u6c42\u3002<\/li>\n<li>\u5982\u679c\u6ca1\u6709excludePathPatterns\u4efb\u4f55\u4e00\u4e2a\u8bf7\u6c42&#xff0c;\u5219\u9ed8\u8ba4\u4e0d\u653e\u8fc7\u4efb\u4f55\u4e00\u4e2a\u8bf7\u6c42\u3002<\/li>\n<li>\u5728config\u4e0b\u521b\u5efaWebConfig\u7c7b&#xff1a;<\/li>\n<\/ul>\n<p><span class=\"token annotation punctuation\">&#064;Configuration<\/span>  <span class=\"token comment\">\/\/ \u58f0\u660e\u8fd9\u662f\u4e00\u4e2a\u914d\u7f6e\u7c7b<\/span><br \/>\n<span class=\"token keyword\">public<\/span> <span class=\"token keyword\">class<\/span> <span class=\"token class-name\">WebConfig<\/span> <span class=\"token keyword\">implements<\/span> <span class=\"token class-name\">WebMvcConfigurer<\/span> <span class=\"token punctuation\">{<\/span><br \/>\n<span class=\"token comment\">\/\/\u7ee7\u627fWebMvcConfiguer&#xff0c;\u4e00\u4e2a\u4e13\u95e8\u505a\u914d\u7f6e\u5668\u7684\u7c7b<\/span><br \/>\n    <span class=\"token comment\">\/\/\u91cd\u5199addInterceptors\u65b9\u6cd5<\/span><br \/>\n    <span class=\"token annotation punctuation\">&#064;Override<\/span><br \/>\n    <span class=\"token keyword\">public<\/span> <span class=\"token keyword\">void<\/span> <span class=\"token function\">addInterceptors<\/span><span class=\"token punctuation\">(<\/span><span class=\"token class-name\">InterceptorRegistry<\/span> registry<span class=\"token punctuation\">)<\/span> <span class=\"token punctuation\">{<\/span><br \/>\n    <span class=\"token comment\">\/\/InterceptorRegistry \u662f Spring MVC \u4e2d\u7528\u4e8e\u6ce8\u518c\u548c\u914d\u7f6e\u62e6\u622a\u5668\u7684\u6838\u5fc3\u5de5\u5177\u7c7b<\/span><br \/>\n    <span class=\"token comment\">\/\/ \u8fd9\u91cc\u7684 registry \u53c2\u6570\u5c31\u662f Spring \u81ea\u52a8\u4f20\u5165\u7684 InterceptorRegistry \u5b9e\u4f8b<\/span><br \/>\n        <span class=\"token comment\">\/\/ \u914d\u7f6e1&#xff1a;\u62e6\u622a\u6240\u6709\u8bf7\u6c42<\/span><br \/>\n        registry<span class=\"token punctuation\">.<\/span><span class=\"token function\">addInterceptor<\/span><span class=\"token punctuation\">(<\/span><span class=\"token keyword\">new<\/span> <span class=\"token class-name\">LoginInterceptor<\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><\/p>\n<p>        <span class=\"token comment\">\/\/ \u914d\u7f6e2&#xff1a;\u53ea\u62e6\u622a\u7279\u5b9a\u8def\u5f84<\/span><br \/>\n        <span class=\"token comment\">\/\/ \u53ea\u62e6\u622a\/user\u5f00\u5934\u7684\u8def\u5f84<\/span><br \/>\n        <span class=\"token comment\">\/\/ registry.addInterceptor(new LoginInterceptor()).addPathPatterns(&#034;\/user\/**&#034;);<\/span><br \/>\n    <span class=\"token punctuation\">}<\/span><br \/>\n<span class=\"token punctuation\">}<\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6587\u7ae0\u76ee\u5f551 \u9759\u6001\u8d44\u6e90\u8bbf\u95ee2 \u6587\u4ef6\u4e0a\u4f202.1 \u6587\u4ef6\u4e0a\u4f20\u539f\u74062.2 SpringBoot\u5b9e\u73b0\u6587\u4ef6\u4e0a\u4f20\u529f\u80fd3 \u62e6\u622a\u56683.1 \u62e6\u622a\u5668\u5b9a\u4e493.2 \u62e6\u622a\u5668\u6ce8\u518c1 \u9759\u6001\u8d44\u6e90\u8bbf\u95ee \u4f7f\u7528IDEA\u521b\u5efaSpringBoot\u9879\u76ee&#xff0c;\u4f1a\u9ed8\u8ba4\u521b\u5efa\u51faclasspath:\/static\/\u76ee\u5f55&#xff0c;\u9759\u6001\u8d44\u6e90\u4e00\u822c\u653e\u5728\u8fd9\u4e2a\u76ee\u5f55\u4e0b\u3002\u5f53\u6ca1\u6709\u914d\u7f6e\u9759\u6001\u8d44\u6e90\u65f6&#xff0c;\/\u540e\u76f4\u63a5\u52a0\u9759\u6001\u8d44\u6e90\u7684\u540d\u79f0\u5373\u53ef\u8bbf\u95ee&#xff0c;\u4f8b\u5982&#xff1a;localhost:8080\/test.jpg\u3002  \u5982\u679c\u9ed8\u8ba4<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[98,87],"topic":[],"class_list":["post-62158","post","type-post","status-publish","format-standard","hentry","category-server","tag-spring-boot","tag-87"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Web\u5f00\u53d1\u8fdb\u9636 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.wsisp.com\/helps\/62158.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Web\u5f00\u53d1\u8fdb\u9636 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"\u6587\u7ae0\u76ee\u5f551 \u9759\u6001\u8d44\u6e90\u8bbf\u95ee2 \u6587\u4ef6\u4e0a\u4f202.1 \u6587\u4ef6\u4e0a\u4f20\u539f\u74062.2 SpringBoot\u5b9e\u73b0\u6587\u4ef6\u4e0a\u4f20\u529f\u80fd3 \u62e6\u622a\u56683.1 \u62e6\u622a\u5668\u5b9a\u4e493.2 \u62e6\u622a\u5668\u6ce8\u518c1 \u9759\u6001\u8d44\u6e90\u8bbf\u95ee \u4f7f\u7528IDEA\u521b\u5efaSpringBoot\u9879\u76ee&#xff0c;\u4f1a\u9ed8\u8ba4\u521b\u5efa\u51faclasspath:\/static\/\u76ee\u5f55&#xff0c;\u9759\u6001\u8d44\u6e90\u4e00\u822c\u653e\u5728\u8fd9\u4e2a\u76ee\u5f55\u4e0b\u3002\u5f53\u6ca1\u6709\u914d\u7f6e\u9759\u6001\u8d44\u6e90\u65f6&#xff0c;\/\u540e\u76f4\u63a5\u52a0\u9759\u6001\u8d44\u6e90\u7684\u540d\u79f0\u5373\u53ef\u8bbf\u95ee&#xff0c;\u4f8b\u5982&#xff1a;localhost:8080\/test.jpg\u3002 \u5982\u679c\u9ed8\u8ba4\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/62158.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2026-01-19T06:09:59+00:00\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/62158.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/62158.html\",\"name\":\"Web\u5f00\u53d1\u8fdb\u9636 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2026-01-19T06:09:59+00:00\",\"dateModified\":\"2026-01-19T06:09:59+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/62158.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/62158.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/62158.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Web\u5f00\u53d1\u8fdb\u9636\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\",\"url\":\"https:\/\/www.wsisp.com\/helps\/\",\"name\":\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"description\":\"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"contentUrl\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"caption\":\"admin\"},\"sameAs\":[\"http:\/\/wp.wsisp.com\"],\"url\":\"https:\/\/www.wsisp.com\/helps\/author\/admin\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Web\u5f00\u53d1\u8fdb\u9636 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.wsisp.com\/helps\/62158.html","og_locale":"zh_CN","og_type":"article","og_title":"Web\u5f00\u53d1\u8fdb\u9636 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"\u6587\u7ae0\u76ee\u5f551 \u9759\u6001\u8d44\u6e90\u8bbf\u95ee2 \u6587\u4ef6\u4e0a\u4f202.1 \u6587\u4ef6\u4e0a\u4f20\u539f\u74062.2 SpringBoot\u5b9e\u73b0\u6587\u4ef6\u4e0a\u4f20\u529f\u80fd3 \u62e6\u622a\u56683.1 \u62e6\u622a\u5668\u5b9a\u4e493.2 \u62e6\u622a\u5668\u6ce8\u518c1 \u9759\u6001\u8d44\u6e90\u8bbf\u95ee \u4f7f\u7528IDEA\u521b\u5efaSpringBoot\u9879\u76ee&#xff0c;\u4f1a\u9ed8\u8ba4\u521b\u5efa\u51faclasspath:\/static\/\u76ee\u5f55&#xff0c;\u9759\u6001\u8d44\u6e90\u4e00\u822c\u653e\u5728\u8fd9\u4e2a\u76ee\u5f55\u4e0b\u3002\u5f53\u6ca1\u6709\u914d\u7f6e\u9759\u6001\u8d44\u6e90\u65f6&#xff0c;\/\u540e\u76f4\u63a5\u52a0\u9759\u6001\u8d44\u6e90\u7684\u540d\u79f0\u5373\u53ef\u8bbf\u95ee&#xff0c;\u4f8b\u5982&#xff1a;localhost:8080\/test.jpg\u3002 \u5982\u679c\u9ed8\u8ba4","og_url":"https:\/\/www.wsisp.com\/helps\/62158.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2026-01-19T06:09:59+00:00","author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"2 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/62158.html","url":"https:\/\/www.wsisp.com\/helps\/62158.html","name":"Web\u5f00\u53d1\u8fdb\u9636 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2026-01-19T06:09:59+00:00","dateModified":"2026-01-19T06:09:59+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/62158.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/62158.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/62158.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"Web\u5f00\u53d1\u8fdb\u9636"}]},{"@type":"WebSite","@id":"https:\/\/www.wsisp.com\/helps\/#website","url":"https:\/\/www.wsisp.com\/helps\/","name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","description":"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41","name":"admin","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/","url":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","contentUrl":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","caption":"admin"},"sameAs":["http:\/\/wp.wsisp.com"],"url":"https:\/\/www.wsisp.com\/helps\/author\/admin"}]}},"_links":{"self":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/62158","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/comments?post=62158"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/62158\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=62158"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=62158"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=62158"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=62158"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}