{"id":64762,"date":"2025-05-03T09:40:31","date_gmt":"2025-05-03T01:40:31","guid":{"rendered":"https:\/\/fwq.ai\/blog\/64762\/"},"modified":"2025-05-03T09:40:31","modified_gmt":"2025-05-03T01:40:31","slug":"jdk%e5%92%8ccglib%e5%8a%a8%e6%80%81%e4%bb%a3%e7%90%86%e8%8e%b7%e5%8f%96%e4%bb%a3%e7%90%86%e5%af%b9%e8%b1%a1%e4%b8%ba%e7%a9%ba%e7%9a%84%e5%8e%9f%e5%9b%a0%e5%92%8c%e8%a7%a3%e5%86%b3%e6%96%b9%e6%b3%95-3","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/64762\/","title":{"rendered":"JDK\u548cCglib\u52a8\u6001\u4ee3\u7406\u83b7\u53d6\u4ee3\u7406\u5bf9\u8c61\u4e3a\u7a7a\u7684\u539f\u56e0\u548c\u89e3\u51b3\u65b9\u6cd5\u6709\u54ea\u4e9b\uff1f"},"content":{"rendered":"<p><img decoding=\"async\" src=\"https:\/\/img.php.cn\/upload\/article\/001\/246\/273\/173071962346819.jpg\" class=\"aligncenter\" title=\"JDK\u548cCglib\u52a8\u6001\u4ee3\u7406\u83b7\u53d6\u4ee3\u7406\u5bf9\u8c61\u4e3a\u7a7a\u7684\u539f\u56e0\u548c\u89e3\u51b3\u65b9\u6cd5\u6709\u54ea\u4e9b\uff1f\u63d2\u56fe\" alt=\"JDK\u548cCglib\u52a8\u6001\u4ee3\u7406\u83b7\u53d6\u4ee3\u7406\u5bf9\u8c61\u4e3a\u7a7a\u7684\u539f\u56e0\u548c\u89e3\u51b3\u65b9\u6cd5\u6709\u54ea\u4e9b\uff1f\u63d2\u56fe\" \/><\/p>\n<p><strong>jdk\u83b7\u53d6\u4ee3\u7406\u5bf9\u8c61\u4e3a\u7a7a\u7684\u539f\u56e0\u548c\u89e3\u51b3\u65b9\u6cd5<\/strong><\/p>\n<p>jdk\u52a8\u6001\u4ee3\u7406\u83b7\u53d6\u4ee3\u7406\u5bf9\u8c61\u4e3a\u7a7a\u7684\u539f\u56e0\u662f\u7531\u4e8e\u6ca1\u6709\u8bbe\u7f6e\u5b89\u5168\u7ba1\u7406\u5668\u3002\u89e3\u51b3\u65b9\u6cd5\u662f\u5728\u542f\u52a8\u7a0b\u5e8f\u65f6\u8bbe\u7f6e -djava.security.manager=\u5141\u8bb8\u7684\u5305 \u7cfb\u7edf\u5c5e\u6027\u3002<\/p>\n<p><strong>cglib\u52a8\u6001\u4ee3\u7406\u83b7\u53d6\u4ee3\u7406\u5bf9\u8c61\u4e3a\u7a7a\u7684\u539f\u56e0\u548c\u89e3\u51b3\u65b9\u6cd5<\/strong><\/p>\n<p>cglib\u52a8\u6001\u4ee3\u7406\u83b7\u53d6\u4ee3\u7406\u5bf9\u8c61\u4e3a\u7a7a\u7684\u539f\u56e0\u662f\u7531\u4e8e enhancer.callbackfilter \u672a\u8bbe\u7f6e\u3002\u89e3\u51b3\u65b9\u6cd5\u662f\u5728\u521b\u5efa\u4ee3\u7406\u65f6\u8bbe\u7f6e enhancer.callbackfilter\uff0c\u4ee5\u8fc7\u6ee4\u9700\u8981\u589e\u5f3a\u7684\u65b9\u6cd5\u3002\u4f8b\u5982\uff1a<\/p>\n<pre>enhancer.setCallbackFilter(new CallbackFilter() {\n    @Override\n    public int accept(Method method) {\n        return method.getName().equals(\"reathouse\") ? 0 : 1;\n    }\n});<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p>\u4ee5\u4e0a\u5c31\u662fJDK\u548cCglib\u83b7\u53d6\u4ee3\u7406\u5bf9\u8c61\u4e3a\u7a7a\u7684\u539f\u56e0\u548c\u89e3\u51b3\u65b9\u6cd5\u6709\u54ea\u4e9b\uff1f\u7684\u8be6\u7ec6\u5185\u5bb9\uff0c\u66f4\u591a\u8bf7\u5173\u6ce8IDCBABY\u5176\u5b83\u76f8\u5173\u6587\u7ae0\uff01<\/p>\n","protected":false},"excerpt":{"rendered":"<p>jdk\u83b7\u53d6\u4ee3\u7406\u5bf9\u8c61\u4e3a\u7a7a\u7684\u539f\u56e0\u548c\u89e3\u51b3\u65b9\u6cd5 jdk\u52a8\u6001\u4ee3\u7406\u83b7\u53d6\u4ee3\u7406\u5bf9\u8c61\u4e3a\u7a7a\u7684\u539f\u56e0\u662f\u7531\u4e8e\u6ca1\u6709\u8bbe\u7f6e\u5b89\u5168\u7ba1\u7406\u5668\u3002\u89e3\u51b3\u65b9\u6cd5\u662f\u5728\u542f\u52a8\u7a0b\u5e8f\u65f6\u8bbe\u7f6e -djava.security.manager=\u5141\u8bb8\u7684\u5305 \u7cfb\u7edf\u5c5e\u6027\u3002 cglib\u52a8\u6001\u4ee3\u7406\u83b7\u53d6\u4ee3\u7406\u5bf9\u8c61\u4e3a\u7a7a\u7684\u539f\u56e0\u548c\u89e3\u51b3\u65b9\u6cd5 cglib\u52a8\u6001\u4ee3\u7406\u83b7\u53d6\u4ee3\u7406\u5bf9\u8c61\u4e3a\u7a7a\u7684\u539f\u56e0\u662f\u7531\u4e8e enhancer.callbackfilter \u672a\u8bbe\u7f6e\u3002\u89e3\u51b3\u65b9\u6cd5\u662f\u5728\u521b\u5efa\u4ee3\u7406\u65f6\u8bbe\u7f6e enhancer.callbackfilter\uff0c\u4ee5\u8fc7\u6ee4\u9700\u8981\u589e\u5f3a\u7684\u65b9\u6cd5\u3002\u4f8b\u5982\uff1a enhancer.setCallbackFilter(new CallbackFilter() { @Override public int accept(Method method) { return method.getName().equals(&#8220;reathouse&#8221;) ? 0 : 1; } }); \u767b\u5f55\u540e\u590d\u5236 \u4ee5\u4e0a\u5c31\u662fJDK\u548cCglib\u83b7\u53d6\u4ee3\u7406\u5bf9\u8c61\u4e3a\u7a7a\u7684\u539f\u56e0\u548c\u89e3\u51b3\u65b9\u6cd5\u6709\u54ea\u4e9b\uff1f\u7684\u8be6\u7ec6\u5185\u5bb9\uff0c\u66f4\u591a\u8bf7\u5173\u6ce8IDCBABY\u5176\u5b83\u76f8\u5173\u6587\u7ae0\uff01<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[16],"tags":[],"class_list":["post-64762","post","type-post","status-publish","format-standard","hentry","category-16"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/64762","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/comments?post=64762"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/64762\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=64762"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=64762"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=64762"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}