
{"id":1460,"date":"2022-04-17T10:27:39","date_gmt":"2022-04-17T02:27:39","guid":{"rendered":"http:\/\/dba.qishuo.xin\/?p=1460"},"modified":"2022-12-05T08:35:32","modified_gmt":"2022-12-05T00:35:32","slug":"java%e4%b8%ad%e4%b8%80%e4%ba%9b%e8%8b%b1%e6%96%87%e9%94%99%e8%af%af%e7%9a%84%e7%bf%bb%e8%af%91","status":"publish","type":"post","link":"http:\/\/dba.qishuo.xin\/?p=1460","title":{"rendered":"Java\u4e2d\u9488\u5bf9\u82f1\u6587\u7684\u7ffb\u8bd1"},"content":{"rendered":"<ol>\n<li>\n<p>Non-static method 'xxx()' cannot be referenced from a static context<br \/>\n\u7ffb\u8bd1\uff1a\u4e0d\u80fd\u4ece\u9759\u6001\u4e0a\u4e0b\u6587\u5f15\u7528\u975e\u9759\u6001\u65b9\u6cd5 'xxx()'<br \/>\nreference [\u02c8ref(\u0259)r\u0259ns] \u53c2\u8003\u7684\uff1b\u5f15\u7528\u7684\uff1b\u5f15\u7528\u8fc7\u7684<br \/>\ncontext [\u02c8k\u0251n\u02cctekst] \u4e0a\u4e0b\u6587\uff1b\u8bed\u5883\uff1b\u73af\u5883<\/p>\n<\/li>\n<li>\n<p>The shortcut is already assigned to other actions. Do you want to remove other assignments?<br \/>\n\u7ffb\u8bd1\uff1a\u5feb\u6377\u952e\u5df2\u5206\u914d\u7ed9\u5176\u4ed6\u64cd\u4f5c\u3002 \u662f\u5426\u8981\u5220\u9664\u5176\u4ed6\u4f5c\u4e1a\uff1f<br \/>\nshortcut  [\u02c8\u0283\u0254rt\u02cck\u028ct] \u5feb\u6377\u65b9\u5f0f\uff1b\u5feb\u6377\u952e\uff1b\u8fd1\u9053<br \/>\nassign [\u0259\u02c8sa\u026an] \u6307\u5b9a\u7684\uff1b\u6307\u6d3e\uff1b\u8d4b\u503c\u7684<br \/>\nassignment  [\u0259\u02c8sa\u026anm\u0259nt] \u5206\u914d\uff1b\u4efb\u52a1\uff1b\u6307\u5b9a\uff1b\u8f6c\u8ba9<\/p>\n<\/li>\n<li>\n<p>Cannot resolve symbol 'i'<br \/>\n\u7ffb\u8bd1\uff1a\u65e0\u6cd5\u89e3\u6790\u7b26\u53f7\u201ci\u201d<br \/>\nsymbol [\u02c8s\u026amb(\u0259)l] \u7b26\u53f7\uff1b\u8c61\u5f81\uff1b<\/p>\n<\/li>\n<li>\n<p>Expression expected\/expected an expression<br \/>\n\u7ffb\u8bd1\uff1a\u671f\u5f85\u4e00\u4e2a\u8868\u8fbe\u5f0f<br \/>\nExpression [\u026ak\u02c8spre\u0283(\u0259)n] \u8868\u8fbe\u5f0f\uff1b\u8868\u73b0\uff1b\u8fd0\u7b97\u5f0f<\/p>\n<\/li>\n<li>\n<p>Spring Boot Configuration Annotation Processor not configured<br \/>\n\u7ffb\u8bd1\uff1aSpring Boot\u914d\u7f6e\u6ce8\u89e3\u6267\u884c\u5668\u6ca1\u6709\u914d\u7f6e<br \/>\nAnnotation  [\u02cc\u00e6n\u0259'te\u026a\u0283(\u0259)n] \u6ce8\u91ca\uff1b\u6ce8\u89e3\uff1b\u9644\u6ce8\uff1b\u8bc4\u6ce8<br \/>\nProcessor [\u02c8pr\u0251\u02ccses\u0259r] \u5904\u7406\u5668\uff1b\u52a0\u5de5\u673a\uff08\u6216\u5de5\u4eba\uff09\uff1b\u5904\u7406\u673a<br \/>\n<span style='color:red'>\u914d\u7f6e\u6ce8\u89e3\u6267\u884c\u5668\u914d\u7f6e\u5b8c\u6210\u540e\uff0c\u5f53\u6267\u884c\u7c7b\u4e2d\u5df2\u7ecf\u5b9a\u4e49\u4e86\u5bf9\u8c61\u548c\u8be5\u5bf9\u8c61\u7684\u5b57\u6bb5\u540e\uff0c\u5728\u914d\u7f6e\u6587\u4ef6\u4e2d\u5bf9\u8be5\u7c7b\u8d4b\u503c\u65f6\uff0c\u4fbf\u4f1a\u975e\u5e38\u65b9\u4fbf\u7684\u5f39\u51fa\u63d0\u793a\u4fe1\u606f\u3002<\/span><br \/>\n\u5728pom.xml\u6587\u4ef6\u4e2d\u5f15\u5165\u4e0b\u5217\u5185\u5bb9\uff1a<\/p>\n<pre><code class=\"language-java\">&lt;dependency&gt;\n&lt;groupId&gt;org.springframework.boot&lt;\/groupId&gt;\n&lt;artifactId&gt;spring-boot-configuration-processor&lt;\/artifactId&gt;\n&lt;optional&gt;true&lt;\/optional&gt;\n&lt;\/dependency&gt;<\/code><\/pre>\n<\/li>\n<li>\n<p>Press Ctrl+Shift+E to get a list of recently viewed or changed code fragments<br \/>\n\u7ffb\u8bd1\uff1a\u6309 Ctrl+Shift+E \u83b7\u53d6\u6700\u8fd1\u67e5\u770b\u6216\u66f4\u6539\u7684\u4ee3\u7801\u7247\u6bb5\u5217\u8868\u3002<br \/>\nfragment  [\u02c8fr\u00e6\u0261m\u0259nt] \u7247\u6bb5\uff1b\u7834\u7247\uff1b\u5f39\u7247\uff1b\u5c0f\u5757<\/p>\n<\/li>\n<li>\n<p>IntelliJ IDEA provides features that may execute potentially malicious code from this folder.  If you don\u2019t trust the source, preview the project in the safe mode to only browse its code.<br \/>\n\u7ffb\u8bd1\uff1aIntelliJ IDEA \u63d0\u4f9b\u4e86\u53ef\u80fd\u4ece\u8be5\u6587\u4ef6\u5939\u6267\u884c\u6f5c\u5728\u6076\u610f\u4ee3\u7801\u7684\u529f\u80fd\u3002 \u5982\u679c\u60a8\u4e0d\u4fe1\u4efb\u8be5\u6e90\u7684\u8bdd\uff0c\u8bf7\u5728\u5b89\u5168\u6a21\u5f0f\u4e0b\u9884\u89c8\u9879\u76ee\u4ee5\u4ec5\u6d4f\u89c8\u5176\u4ee3\u7801\u3002<br \/>\npotentially [p\u0259\u02c8ten\u0283\u0259li] \u6f5c\u5728\u7684\uff1b\u53ef\u80fd\u5730\uff1b\u5927\u6982\u5730<br \/>\nmalicious [m\u0259\u02c8l\u026a\u0283\u0259s] \u6000\u6076\u610f\u7684\uff1b\u9884\u8c0b\u7684\uff1b\u84c4\u610f\u7684<\/p>\n<\/li>\n<li>\n<p>Code Completion Ctrl+\u7a7a\u683c helps you quickly complete code statements. It works as you type and gives a list of suggestions available from the current caret position:<br \/>\n\u7ffb\u8bd1\uff1a\u4ee3\u7801\u8865\u5168 Ctrl+\u7a7a\u683c \u5e2e\u52a9\u60a8\u5feb\u901f\u8865\u5168\u4ee3\u7801\u8bed\u53e5\u3002 \u5b83\u5728\u60a8\u952e\u5165\u65f6\u8d77\u4f5c\u7528\uff0c\u5e76\u63d0\u4f9b\u5f53\u524d\u63d2\u5165\u7b26\u53f7\u4f4d\u7f6e\u53ef\u7528\u7684\u5efa\u8bae\u5217\u8868\u3002<br \/>\nCompletion [k\u0259m\u02c8pli\u0283(\u0259)n] \u5b8c\u6210\uff1b\u7ed3\u675f\uff1b<br \/>\nstatement [\u02c8ste\u026atm\u0259nt] \u58f0\u660e\uff1b\u8bed\u53e5\uff1b\u9648\u8ff0\uff1b\u53d9\u8ff0<br \/>\ncaret ['k\u00e6r\u0259t] \u63d2\u5165\u7b26\u53f7\uff1b\u63d2\u5165\u53f7\uff1b\u8131\u5b57\u7b26\uff1b\u8865\u6ce8\u53f7<\/p>\n<\/li>\n<li>\n<p>Inspections Results<br \/>\n\u7ffb\u8bd1\uff1a\u68c0\u67e5\u7ed3\u679c<br \/>\nInspection [\u026an\u02c8spek\u0283(\u0259)n] \u68c0\u67e5\uff1b\u89c6\u5bdf\uff1b\u5ba1\u67e5\uff1b\u53c2\u89c2<\/p>\n<\/li>\n<li>\n<p>Modifier 'static' not allowed here<br \/>\n\u7ffb\u8bd1\uff1a\u6b64\u5904\u4e0d\u5141\u8bb8\u4f7f\u7528\u4fee\u9970\u7b26 \u201cstatic\u201d<br \/>\nmodifier  [\u02c8m\u0251d\u026a\u02ccfa\u026a\u0259r] \u4fee\u9970\u7b26\uff1b\u4fee\u9970\u8bcd\uff1b\u4fee\u9970\u8bed<\/p>\n<\/li>\n<li>\n<p>'Demo06' is not an enclosing class<br \/>\n\u7ffb\u8bd1\uff1a'Demo06' \u4e0d\u662f\u5c01\u95ed\u7c7b<br \/>\nenclose [\u026an\u02c8klo\u028az] \u5c01\u95ed\u7684\uff1b\u9644\u5bc4\uff1b\u56f4\u7ed5\uff1b\u5305\u56f4<\/p>\n<\/li>\n<li>\n<p>Variable 'a' might not have been initialized<br \/>\n\u7ffb\u8bd1\uff1a\u53d8\u91cf\u201ca\u201d\u53ef\u80fd\u5c1a\u672a\u521d\u59cb\u5316<br \/>\ninitialize  [\u026a\u02c8n\u026a\u0283(\u0259)l\u02cca\u026az] \u5df2\u521d\u59cb\u5316\u7684\uff1b\u8bd5\u56fe\u8fdb\u884c\u521d\u59cb\u64cd\u4f5c<\/p>\n<\/li>\n<li>\n<p>You can inject SQL into a string literal (Alt+Enter | Inject language or reference | [SQL dialect]) and then use coding assistance for SQL.<br \/>\n\u7ffb\u8bd1\uff1a\u60a8\u53ef\u4ee5\u5c06 SQL \u6ce8\u5165\u5b57\u7b26\u4e32\u6587\u5b57\uff08Alt+Enter | \u6ce8\u5165\u8bed\u8a00\u6216\u53c2\u8003 | [SQL dialect]\uff09\uff0c\u7136\u540e\u4f7f\u7528 SQL \u7f16\u7801\u8f85\u52a9\u3002<br \/>\ninject [\u026an\u02c8d\u0292ekt] \u6ce8\u5165\uff1b\u55b7\u5c04\uff1b\uff08\u7ed9\u2026\uff09\u6ce8\u5c04\uff08\u6db2\u4f53\uff09\uff1b\u7ed9\u2026\uff09\u6ce8\u5c04\uff08\u836f\u7269\u7b49\uff09<br \/>\nliteral  [\u02c8l\u026at(\u0259)r\u0259l] \u6587\u5b57\u7684\uff1b\u5b57\u9762\u610f\u4e49\u7684\uff1b\u5b8c\u5168\u6309\u539f\u6587\u7684\uff1b\u7f3a\u4e4f\u60f3\u8c61\u529b\u7684<br \/>\ndialect [\u02c8da\u026a\u0259\u02cclekt] \u65b9\u8a00\uff1b\u5730\u65b9\u8bdd\uff1b\u571f\u8bdd<br \/>\nassistance  [\u0259\u02c8s\u026ast\u0259ns] \u8f85\u52a9\uff1b\u5e2e\u52a9\uff1b\u63f4\u52a9\uff1b\u652f\u6301<br \/>\n<a href=\"http:\/\/dba.qishuo.xin\/wp-content\/uploads\/2022\/04\/wp_editor_md_50e5089181fe402156896cc7220b5b18.jpg\" data-fancybox=\"images\" data-fancybox=\"images\"><img decoding=\"async\" src=\"http:\/\/dba.qishuo.xin\/wp-content\/uploads\/2022\/04\/wp_editor_md_50e5089181fe402156896cc7220b5b18.jpg\" alt=\"\" \/><\/a><\/p>\n<\/li>\n<li>\n<p>[demo] not conform to the UpperCamelCase<br \/>\n\u7ffb\u8bd1\uff1a[demo] \u4e0d\u7b26\u5408UpperCamelCase<br \/>\nconform  [k\u0259n\u02c8f\u0254rm] \u9075\u5b88\uff1b\u76f8\u4e00\u81f4\uff1b\u987a\u4ece\uff1b\u76f8\u7b26\u5408<br \/>\nUpperCamelCase \u5927\u9a86\u9a7c\u62fc\u5199\u6cd5. Camel [\u02c8k\u00e6m(\u0259)l] \u9a86\u9a7c<\/p>\n<\/li>\n<li>\n<p>avoid put comment behind statement<br \/>\n\u7ffb\u8bd1\uff1a\u907f\u514d\u5c06\u6ce8\u91ca\u653e\u5728\u8bed\u53e5\u540e\u9762<br \/>\navoid [\u0259\u02c8v\u0254\u026ad] \u907f\u514d\uff1b\u907f\u5f00\uff1b\u9632\u6b62\uff1b\u56de\u907f<\/p>\n<\/li>\n<li>\n<p>Reassigned local variable<br \/>\n\u7ffb\u8bd1\uff1a\u91cd\u65b0\u5206\u914d\u5c40\u90e8\u53d8\u91cf<br \/>\nreassign [r\u026a\u02c8\u0259sa\u026an] \u91cd\u65b0\u5206\u914d\uff1b\u518d\u5206\u914d\uff1b\u518d\u8ba9\u4e0e\uff1b\u4ea4\u8fd8<\/p>\n<\/li>\n<li>\n<p>The value b assigned to 'a' is never used<br \/>\n\u7ffb\u8bd1\uff1a\u4ece\u672a\u4f7f\u7528\u5206\u914d\u7ed9\u201ca\u201d\u7684\u503c b<br \/>\nassign  [\u0259\u02c8sa\u026an] \u6307\u5b9a\u7684\uff1b\u6307\u6d3e\uff1b\u8d4b\u503c\u7684<\/p>\n<\/li>\n<li>\n<p>To judge the equivalence of floating-point numbers, == cannot be used for primitive types, while equals cannot be used for wrapper classes.<br \/>\n\u7ffb\u8bd1\uff1a\u8981\u5224\u65ad\u6d6e\u70b9\u6570\u7684\u7b49\u4ef7\u6027\uff0c== \u4e0d\u80fd\u7528\u4e8e\u57fa\u672c\u7c7b\u578b\uff0c\u800c equals \u4e0d\u80fd\u7528\u4e8e\u5305\u88c5\u7c7b\u3002<br \/>\njudge [d\u0292\u028cd\u0292] \u5224\u65ad\uff1b\u8bc4\u5224\uff1b\u5ba1\u5224\uff1b\u6279\u8bc4<br \/>\nequivalence  [\u026a\u02c8kw\u026av\u0259l\u0259ns] \u7b49\u503c\uff1b\u7b49\u6548\uff1b\u5f53\u91cf\uff1b\u76f8\u7b49<br \/>\nprimitive [\u02c8pr\u026am\u0259t\u026av] \u539f\u59cb\u7684\uff1b\u8fdc\u53e4\u7684\uff1b\uff08\u4eba\u7c7b\u6216\u52a8\u7269\uff09\u53d1\u5c55\u65e9\u671f\u7684\uff1b\u7b80\u964b\u7684<br \/>\nwrapper [\u02c8r\u00e6p\u0259r] \u5305\u88c5\u5668\uff1b\u5c01\u5957\uff1b\u5c01\u88c5<\/p>\n<\/li>\n<\/ol>\n","protected":false},"excerpt":{"rendered":"<p>Non-static method &#8216;xxx()&#8217;&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[178],"tags":[179,199],"class_list":["post-1460","post","type-post","status-publish","format-standard","hentry","category-java","tag-java","tag-199"],"_links":{"self":[{"href":"http:\/\/dba.qishuo.xin\/index.php?rest_route=\/wp\/v2\/posts\/1460","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/dba.qishuo.xin\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/dba.qishuo.xin\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/dba.qishuo.xin\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/dba.qishuo.xin\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1460"}],"version-history":[{"count":27,"href":"http:\/\/dba.qishuo.xin\/index.php?rest_route=\/wp\/v2\/posts\/1460\/revisions"}],"predecessor-version":[{"id":2411,"href":"http:\/\/dba.qishuo.xin\/index.php?rest_route=\/wp\/v2\/posts\/1460\/revisions\/2411"}],"wp:attachment":[{"href":"http:\/\/dba.qishuo.xin\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1460"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/dba.qishuo.xin\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1460"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/dba.qishuo.xin\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1460"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}