{"id":1620,"date":"2025-09-18T22:55:24","date_gmt":"2025-09-18T14:55:24","guid":{"rendered":"https:\/\/blog.ttwow.top\/?p=1620"},"modified":"2026-06-19T17:02:08","modified_gmt":"2026-06-19T09:02:08","slug":"mybatiscodehelper-pro%e6%bf%80%e6%b4%bb","status":"publish","type":"post","link":"https:\/\/blog.ttwow.top\/?p=1620","title":{"rendered":"MyBatisCodeHelper-Pro\u6fc0\u6d3b"},"content":{"rendered":"<p>\u53c2\u8003\uff1a<a href=\"https:\/\/blog.csdn.net\/weixin_37555975\/article\/details\/147319559\">https:\/\/blog.csdn.net\/weixin_37555975\/article\/details\/147319559<\/a><\/p>\n<h1>\u66ff\u6362\u6b65\u9aa4<\/h1>\n<pre><code class=\"language-xml\">&lt;dependency&gt;\n            &lt;groupId&gt;com.google.code.gson&lt;\/groupId&gt;\n            &lt;artifactId&gt;gson&lt;\/artifactId&gt;\n            &lt;version&gt;2.13.0&lt;\/version&gt;\n        &lt;\/dependency&gt;\n        &lt;!-- javassist --&gt;\n        &lt;dependency&gt;\n            &lt;groupId&gt;org.javassist&lt;\/groupId&gt;\n            &lt;artifactId&gt;javassist&lt;\/artifactId&gt;\n            &lt;version&gt;3.28.0-GA&lt;\/version&gt;\n        &lt;\/dependency&gt;<\/code><\/pre>\n<pre><code class=\"language-java\">import org.apache.ibatis.javassist.*;\n\nimport java.io.IOException;\n\npublic class PJNew {\n\n    public static void main(String[] args) throws NotFoundException, CannotCompileException, IOException {\n        ClassPool classPool = ClassPool.getDefault();\n        classPool.appendClassPath(&quot;YOUR_PATH\/instrumented-MyBatisCodeHelper-Pro241-3.4.0+2321.jar&quot;);\n        CtClass ctClass = classPool.get(&quot;com.ccnode.codegenerator.af.f.e&quot;);\n\n        CtMethod parseLicenseMethod = ctClass.getDeclaredMethod(&quot;a&quot;, new CtClass[] { classPool.get(&quot;java.lang.String&quot;) });\n        StringBuffer bodyBuff = new StringBuffer();\n        bodyBuff.append(&quot;{&quot;)\n                .append(&quot;  com.google.gson.Gson gson = new com.google.gson.Gson();&quot;)\n                .append(&quot;  com.ccnode.codegenerator.af.d.f e = (com.ccnode.codegenerator.af.d.f)gson.fromJson($1,com.ccnode.codegenerator.af.d.f.class);&quot;)\n                .append(&quot;  return e;&quot;)\n                .append(&quot;}&quot;);\n        parseLicenseMethod.setBody(bodyBuff.toString());\n\n\/\/         \u5bf9\u4fee\u6539\u7684\u6587\u4ef6\uff0c\u5199\u51fa\u5230\u4e00\u4e2a\u65b0\u6587\u4ef6\n        ctClass.writeFile(&quot;YOUR_PATH&quot;);\n\n    }\n}<\/code><\/pre>\n<h1>\u6fc0\u6d3b<\/h1>\n<pre><code>{\n    &quot;paidKey&quot;: &quot;XXX&quot;,\n    &quot;valid&quot;: true,\n    &quot;userMac&quot;: &quot;XX-XX-XX-XX-XX-XX&quot;,\n    &quot;validTo&quot;: 4859711999000\n}\u8fd9\u4e2a\u5b57\u7b26\u4e32\u4fe1\u606f\uff08\u4e3a\u4ec0\u4e48\u662f\u8fd9\u4e2a\u5bf9\u8c61\uff0c\u53ef\u4ee5\u4ece\u521a\u624d\u7684doAction\u65b9\u6cd5\u4e2d\u81ea\u5df1\u627e\u627e\uff09<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\u53c2\u8003\uff1ahttps:\/\/blog.csdn.net\/weixin_37555975\/article\/detail [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[133],"tags":[41,137],"class_list":["post-1620","post","type-post","status-publish","format-standard","hentry","category-dev-tools","tag-idea","tag-137"],"_links":{"self":[{"href":"https:\/\/blog.ttwow.top\/index.php?rest_route=\/wp\/v2\/posts\/1620","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.ttwow.top\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.ttwow.top\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.ttwow.top\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.ttwow.top\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1620"}],"version-history":[{"count":2,"href":"https:\/\/blog.ttwow.top\/index.php?rest_route=\/wp\/v2\/posts\/1620\/revisions"}],"predecessor-version":[{"id":1622,"href":"https:\/\/blog.ttwow.top\/index.php?rest_route=\/wp\/v2\/posts\/1620\/revisions\/1622"}],"wp:attachment":[{"href":"https:\/\/blog.ttwow.top\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1620"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.ttwow.top\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1620"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.ttwow.top\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1620"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}