{"id":2241,"date":"2023-05-07T10:27:47","date_gmt":"2023-05-07T02:27:47","guid":{"rendered":"https:\/\/www.appblog.cn\/?p=2241"},"modified":"2023-05-07T10:28:05","modified_gmt":"2023-05-07T02:28:05","slug":"groovy-code-example-file","status":"publish","type":"post","link":"https:\/\/www.appblog.cn\/index.php\/2023\/05\/07\/groovy-code-example-file\/","title":{"rendered":"Groovy\u4ee3\u7801\u793a\u4f8b &#8211; \u6587\u4ef6\u64cd\u4f5c"},"content":{"rendered":"<h2>\u8bfb\u53d6\u6587\u4ef6\u5185\u5bb9<\/h2>\n<p>groovy\u8bfb\u53d6\u6587\u4ef6\u5f88\u65b9\u4fbf\uff0c\u53ef\u4ee5\u50cf\u8fd9\u6837\u8bfb\u53d6\u6587\u4ef6\u5185\u5bb9\u5230\u5b57\u7b26\u4e32\u4e2d\uff1a<\/p>\n<pre><code class=\"language-java\">String fileContents = new File(&#039;\/path\/to\/file&#039;).text<\/code><\/pre>\n<p>\u5982\u679c\u9700\u8981\u6307\u5b9a\u5b57\u7b26\u7f16\u7801\u7684\u8bdd\uff0c\u53ef\u4ee5\u8fd9\u6837\uff1a<\/p>\n<pre><code class=\"language-java\">String fileContents = new File(&#039;\/path\/to\/file&#039;).getText(&#039;UTF-8&#039;)<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\u8bfb\u53d6\u6587\u4ef6\u5185\u5bb9 groovy\u8bfb\u53d6\u6587\u4ef6\u5f88\u65b9\u4fbf\uff0c\u53ef\u4ee5\u50cf\u8fd9\u6837\u8bfb\u53d6\u6587\u4ef6\u5185\u5bb9\u5230\u5b57\u7b26\u4e32\u4e2d\uff1a String fileConte [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[568],"tags":[],"class_list":["post-2241","post","type-post","status-publish","format-standard","hentry","category-groovy"],"_links":{"self":[{"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/posts\/2241","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/comments?post=2241"}],"version-history":[{"count":0,"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/posts\/2241\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/media?parent=2241"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/categories?post=2241"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/tags?post=2241"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}