1"use strict";(globalThis.webpackChunkhasor_doc=globalThis.webpackChunkhasor_doc||[]).push([[7126],{4364(e,t,r){r.r(t),r.d(t,{assets:()=>l,contentTitle:()=>c,default:()=>u,frontMatter:()=>o,metadata:()=>i,toc:()=>a});const i=JSON.parse('{"id":"guides/webmvc/j2ee/filter","title":"4.8.2 Filter","description":"Hasor \u6846\u67b6\u5f00\u53d1\u624b\u518c\uff0c\u8986\u76d6 hasor-core\u3001hasor-web\u3001hasor-boot \u7684\u6838\u5fc3\u7528\u6cd5","source":"@site/docs/guides/webmvc/j2ee/filter.md","sourceDirName":"guides/webmvc/j2ee","slug":"/guides/webmvc/j2ee/filter","permalink":"/docs/guides/webmvc/j2ee/filter","draft":false,"unlisted":false,"editUrl":"https://gitee.com/zycgit/hasor-doc/tree/master/docs/guides/webmvc/j2ee/filter.md","tags":[],"version":"current","sidebarPosition":2,"frontMatter":{"id":"filter","sidebar_position":2,"title":"4.8.2 Filter","description":"Hasor \u6846\u67b6\u5f00\u53d1\u624b\u518c\uff0c\u8986\u76d6 hasor-core\u3001hasor-web\u3001hasor-boot \u7684\u6838\u5fc3\u7528\u6cd5"},"sidebar":"guides","previous":{"title":"4.8.1 Servlet","permalink":"/docs/guides/webmvc/j2ee/servlet"},"next":{"title":"4.8.3 Listener","permalink":"/docs/guides/webmvc/j2ee/listener"}}');var s=r(4848),n=r(8453);const o={id:"filter",sidebar_position:2,title:"4.8.2 Filter",description:"Hasor \u6846\u67b6\u5f00\u53d1\u624b\u518c\uff0c\u8986\u76d6 hasor-core\u3001hasor-web\u3001hasor-boot \u7684\u6838\u5fc3\u7528\u6cd5"},c="4.8.2 Filter",l={},a=[];function d(e){const t={code:"code",h1:"h1",header:"header",p:"p",pre:"pre",...(0,n.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(t.header,{children:(0,s.jsx)(t.h1,{id:"482-filter",children:"4.8.2 Filter"})}),"\n",(0,s.jsx)(t.p,{children:"\u4f7f\u7528 Filter \u5982\u4e0b\u6240\u793a\uff1a"}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-java",metastring:"title='\u4f8b\u5b50'",children:"public class MyFilter implements Filter {\n ...\n}\n"})}),"\n",(0,s.jsx)(t.p,{children:"\u7136\u540e\u6ce8\u518c Filter\uff1a"}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-java",metastring:"title='\u914d\u7f6e\u62e6\u622a\u5668'",children:'public class StartModule implements WebModule {\n public void loadModule(WebApiBinder apiBinder) throws Throwable {\n ...\n apiBinder.jeeFilter("/*").through(MyFilter.class);\n ...\n }\n}\n'})})]})}function u(e={}){const{wrapper:t}={...(0,n.R)(),...e.components};return t?(0,s.jsx)(t,{...e,children:(0,s.jsx)(d,{...e})}):d(e)}},8453(e,t,r){r.d(t,{R:()=>o,x:()=>c});var i=r(6540);const s={},n=i.createContext(s);function o(e){const t=i.useContext(n);return i.useMemo(function(){return"function"==typeof e?e(t):{...t,...e}},[t,e])}function c(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:o(e.components),i.createElement(n.Provider,{value:t},e.children)}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.