{"id":38415,"date":"2025-05-20T09:56:01","date_gmt":"2025-05-20T01:56:01","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/38415.html"},"modified":"2025-05-20T09:56:01","modified_gmt":"2025-05-20T01:56:01","slug":"%e4%bd%bf%e7%94%a8idea%e5%b0%86%e6%9c%ac%e5%9c%b0springboot%e9%a1%b9%e7%9b%ae%e6%89%93%e5%8c%85%e6%88%90%e9%95%9c%e5%83%8f%ef%bc%8c%e7%84%b6%e5%90%8e%e8%bf%90%e8%a1%8c%e5%88%b0%e6%9c%8d%e5%8a%a1","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/38415.html","title":{"rendered":"\u4f7f\u7528Idea\u5c06\u672c\u5730springBoot\u9879\u76ee\u6253\u5305\u6210\u955c\u50cf\uff0c\u7136\u540e\u8fd0\u884c\u5230\u670d\u52a1\u5668\u5bb9\u5668\u4e2d"},"content":{"rendered":"<h4>\u672c\u9879\u76ee\u662f\u4f5c\u8005\u7684\u6bd5\u4e1a\u8bbe\u8ba1&#xff0c;\u57fa\u4e8e\u82e5\u4f9d\u524d\u540e\u7aef\u5206\u79bb\u9879\u76ee\u5f00\u53d1\u7684&#xff0c;\u4e0b\u9762\u662f\u82e5\u4f9d\u9879\u76ee\u7684\u94fe\u63a5&#xff0c;\u6709\u5174\u8da3\u7684\u53ef\u4ee5\u53bb\u770b\u770b<\/h4>\n<ul>\n<li>\u82e5\u4f9d\u5b98\u7f51&#xff1a;http:\/\/ruoyi.vip(opens new window)<\/li>\n<li>\u6f14\u793a\u5730\u5740&#xff1a;http:\/\/vue.ruoyi.vip(opens new window)<\/li>\n<li>\u4ee3\u7801\u4e0b\u8f7d&#xff1a;https:\/\/gitee.com\/y_project\/RuoYi-Vue<\/li>\n<\/ul>\n<p>\u5f53\u6211\u4eec\u770b\u5230\u672c\u9879\u76ee\u7684\u76ee\u5f55\u5c31\u53ef\u4ee5\u660e\u767d&#xff0c;\u672c\u9879\u76ee\u662f\u4e00\u4e2a\u591a\u6a21\u5757\u7684\u9879\u76ee&#xff0c;\u5176\u4e2d\u5305\u542b\u4e00\u4e2a\u7236\u6a21\u5757\u548cn\u4e2a\u5b50\u6a21\u5757&#xff08;\u8fd9\u5c31\u8981\u770b\u4f60\u8981\u591a\u5c11\u6a21\u5757\u4e86&#x1f923;&#xff09;<\/p>\n<p>\u8fd9\u91cc\u8981\u63d0\u9192\u4e00\u4e0b\u8bfb\u8005&#xff0c;\u5343\u4e07\u4e0d\u8981\u5c06\u592a\u591a\u7684\u5b50\u6a21\u5757\u76f8\u4e92\u4f9d\u8d56&#xff0c;\u4e0d\u7136\u4f60\u5c31\u4f1a\u5411\u6211\u4e00\u6837\u5934\u75db\u3002<\/p>\n<p>\u4f1a\u5728\u4e0b\u9762\u7684dockerfile\u8fd0\u884c\u65f6\u51fa\u73b0\u5404\u79cd\u95ee\u9898\u3002\u6bd4\u5982\u5f53\u6211\u6784\u5efasystem\u6a21\u5757\u65f6&#xff0c;\u53d1\u73b0&#xff0c;\u4ed6\u7684\u4f9d\u8d56\u91cc\u9762\u6709common\u6a21\u5757\u7684\u4f9d\u8d56&#xff0c;\u82e5\u4f60\u524d\u9762\u6ca1\u6709\u5148\u6784\u5efacommon&#xff0c;\u5f53\u7136\u5c31\u4f1a\u51fa\u73b0\u4f9d\u8d56\u627e\u4e0d\u5230\u7684\u9519\u8bef\u3002\u56e0\u6b64&#xff0c;\u5148\u634b\u987a\u4f60\u7684\u9879\u76ee\u4f9d\u8d56\u94fe&#xff0c;\u7136\u540e\u624d\u5f00\u59cb\u5199dockerfile\u662f\u4e00\u4e2a\u5f88\u597d\u7684\u9884\u5904\u7406\u5de5\u4f5c\u3002<\/p>\n<p>\u4f7f\u7528idea\u94fe\u63a5docker\u53ef\u4ee5\u53c2\u8003\u4e0b\u9762\u7684\u94fe\u63a5&#xff0c;\u4e0d\u9700\u8981\u8fc7\u591a\u8d58\u8ff0&#xff1a; idea \u914d\u7f6e docker_idea docker\u6ca1\u6709ssh-CSDN\u535a\u5ba2<\/p>\n<h4>\u914d\u7f6eDockerfile<\/h4>\n<p>\u5728Spring Boot\u9879\u76ee\u7684\u6839\u76ee\u5f55\u4e0b\u521b\u5efa\u4e00\u4e2a\u540d\u4e3aDockerfile\u7684\u6587\u4ef6&#xff0c;\u5185\u5bb9\u5982\u4e0b&#xff1a;<\/p>\n<p># \u7b2c\u4e00\u9636\u6bb5&#xff1a;\u6784\u5efa\u9636\u6bb5&#xff08;\u4e25\u683c\u5904\u7406\u7236\u5b50\u6a21\u5757\u4f9d\u8d56&#xff09;<br \/>\nFROM maven:3.8.6-openjdk-8-slim AS builder<\/p>\n<p># \u8bbe\u7f6e\u963f\u91cc\u4e91\u955c\u50cf\u52a0\u901f&#xff08;\u53ef\u9009&#xff0c;\u82e5\u9700\u5916\u90e8\u4f9d\u8d56\u52a0\u901f&#xff09;<br \/>\nCOPY settings.xml \/usr\/share\/maven\/ref\/<\/p>\n<p># \u5bb9\u5668\u5185Maven\u672c\u5730\u4ed3\u5e93\u8def\u5f84&#xff08;\u53ef\u9009&#xff0c;\u53ef\u6301\u4e45\u5316\u7f13\u5b58&#xff09;<br \/>\nENV MAVEN_LOCAL_REPO \/root\/.m2\/repository<\/p>\n<p># \u6b65\u9aa41&#xff1a;\u5148\u590d\u5236\u6839\u7236\u6a21\u5757\u7684pom.xml&#xff08;MyApp&#xff0c;\u4f4d\u4e8e\u9879\u76ee\u6839\u76ee\u5f55&#xff09;<br \/>\nCOPY .\/pom.xml .<\/p>\n<p># \u5b89\u88c5\u7236\u6a21\u5757\u5230\u672c\u5730\u4ed3\u5e93&#xff08;\u5173\u952e\u6b65\u9aa4&#xff01;&#xff09;<br \/>\nRUN mvn -B install -Dmaven.test.skip&#061;true -N<\/p>\n<p># \u6b65\u9aa42&#xff1a;\u6309\u4f9d\u8d56\u987a\u5e8f\u7f16\u8bd1\u5b50\u6a21\u5757&#xff08;\u4ece\u6700\u5e95\u5c42\u65e0\u4f9d\u8d56\u7684\u5f00\u59cb&#xff09;<br \/>\n# \u5b50\u6a21\u5757\u4f9d\u8d56\u94fe&#xff1a;ruoyi-common&#xff08;\u4f9d\u8d56\u6839\u7236\u6a21\u5757&#xff09;\u2192 ruoyi-system&#xff08;\u4f9d\u8d56common&#xff09;\u2192 &#8230;<\/p>\n<p># \u7f16\u8bd1ruoyi-common&#xff08;\u4f9d\u8d56\u6839\u7236\u6a21\u5757&#xff0c;\u65e0\u5176\u4ed6\u5b50\u6a21\u5757\u4f9d\u8d56&#xff09;<br \/>\nCOPY .\/ruoyi-common\/pom.xml .\/ruoyi-common\/<br \/>\nRUN mvn -B -f .\/ruoyi-common\/pom.xml clean install -Dmaven.test.skip&#061;true<\/p>\n<p># \u7f16\u8bd1ruoyi-system&#xff08;\u4f9d\u8d56ruoyi-common&#xff09;<br \/>\nCOPY .\/ruoyi-system\/pom.xml .\/ruoyi-system\/<br \/>\nRUN mvn -B -f .\/ruoyi-system\/pom.xml clean install -Dmaven.test.skip&#061;true<\/p>\n<p># \u7f16\u8bd1ruoyi-generator&#xff08;\u5047\u8bbe\u4f9d\u8d56ruoyi-common&#xff09;<br \/>\nCOPY .\/ruoyi-generator\/pom.xml .\/ruoyi-generator\/<br \/>\nRUN mvn -B -f .\/ruoyi-generator\/pom.xml clean install -Dmaven.test.skip&#061;true<\/p>\n<p># \u7f16\u8bd1ruoyi-framework&#xff08;\u4f9d\u8d56ruoyi-system&#xff09;<br \/>\nCOPY .\/ruoyi-framework\/pom.xml .\/ruoyi-framework\/<br \/>\nRUN mvn -B -f .\/ruoyi-framework\/pom.xml clean install -Dmaven.test.skip&#061;true<\/p>\n<p># \u7f16\u8bd1MyApp-quartz&#xff08;\u5047\u8bbe\u4f9d\u8d56ruoyi-framework&#xff09;<br \/>\nCOPY .\/MyApp-quartz\/pom.xml .\/MyApp-quartz\/<br \/>\nRUN mvn -B -f .\/MyApp-quartz\/pom.xml clean install -Dmaven.test.skip&#061;true<\/p>\n<p># \u7f16\u8bd1wechatbusiness&#xff08;\u4f9d\u8d56ruoyi-system\/ruoyi-framework\/ruoyi-common&#xff09;<br \/>\nCOPY .\/wechatbusiness\/pom.xml .\/wechatbusiness\/<br \/>\nRUN mvn -B -f .\/wechatbusiness\/pom.xml clean install -Dmaven.test.skip&#061;true<\/p>\n<p># \u7f16\u8bd1ruoyi-admin&#xff08;\u6700\u7ec8\u542f\u52a8\u6a21\u5757&#xff0c;\u4f9d\u8d56\u6240\u6709\u5176\u4ed6\u6a21\u5757&#xff09;<br \/>\nCOPY .\/ruoyi-admin\/pom.xml .\/ruoyi-admin\/<br \/>\nRUN mvn -B -f .\/ruoyi-admin\/pom.xml clean install -Dmaven.test.skip&#061;true<\/p>\n<p># \u4e0b\u8f7d\u5916\u90e8\u4f9d\u8d56&#xff08;\u5185\u90e8\u6a21\u5757\u5df2\u901a\u8fc7\u6839\u7236\u6a21\u5757\u548c\u5b50\u6a21\u5757\u5b89\u88c5&#xff0c;\u4ec5\u9700\u5916\u90e8\u4f9d\u8d56&#xff09;<br \/>\nRUN mvn -B dependency:go-offline -Dmaven.test.skip&#061;true<\/p>\n<p># \u6b65\u9aa43&#xff1a;\u590d\u5236\u6240\u6709\u5b50\u6a21\u5757\u6e90\u4ee3\u7801&#xff08;\u6309\u76ee\u5f55\u7ed3\u6784&#xff0c;\u6839\u7236\u6a21\u5757\u65e0src&#xff0c;\u65e0\u9700\u590d\u5236&#xff09;<br \/>\nCOPY .\/ruoyi-common\/src .\/ruoyi-common\/src<br \/>\nCOPY .\/ruoyi-system\/src .\/ruoyi-system\/src<br \/>\nCOPY .\/ruoyi-generator\/src .\/ruoyi-generator\/src<br \/>\nCOPY .\/ruoyi-framework\/src .\/ruoyi-framework\/src<br \/>\nCOPY .\/MyApp-quartz\/src .\/MyApp-quartz\/src<br \/>\nCOPY .\/wechatbusiness\/src .\/wechatbusiness\/src<br \/>\nCOPY .\/ruoyi-admin\/src .\/ruoyi-admin\/src<\/p>\n<p># \u6b65\u9aa44&#xff1a;\u6253\u5305ruoyi-admin&#xff08;-am\u81ea\u52a8\u6784\u5efa\u4f9d\u8d56\u6a21\u5757&#xff0c;\u4f9d\u8d56\u94fe\u5df2\u63d0\u524d\u7f16\u8bd1&#xff09;<br \/>\nRUN mvn -B clean package -Dmaven.test.skip&#061;true -pl ruoyi-admin -am<\/p>\n<p># \u7b2c\u4e8c\u9636\u6bb5&#xff1a;\u8fd0\u884c\u9636\u6bb5&#xff08;\u4fdd\u6301\u539f\u914d\u7f6e&#xff09;<br \/>\nFROM openJDK:8  #(\u8fd9\u91cc\u7684\u955c\u50cf\u8868\u793a\u9700\u8981\u6253\u5305\u7684\u9879\u76ee\u6240\u9700\u7684JDK&#xff0c;\u53ef\u4ee5\u66ff\u6362\u6210\u81ea\u5df1\u7684\u79c1\u6709\u4ed3\u5e93\u7684JDK)<\/p>\n<p># \u8bbe\u7f6e\u5bb9\u5668\u65f6\u533a<br \/>\nRUN ln -sf \/usr\/share\/zoneinfo\/Asia\/Shanghai \/etc\/localtime &amp;&amp; echo &#034;Asia\/Shanghai&#034; &gt; \/etc\/timezone<\/p>\n<p># \u521b\u5efa\u975eroot\u7528\u6237<br \/>\nRUN groupadd -r appgroup &amp;&amp; useradd -r -g appgroup -s \/sbin\/nologin appuser<\/p>\n<p># \u521b\u5efa\u65e5\u5fd7\u76ee\u5f55\u5e76\u6388\u6743<br \/>\nRUN mkdir -p \/app\/logs &amp;&amp; \\\\<br \/>\n    chown -R appuser:appgroup \/app\/logs &amp;&amp; \\\\<br \/>\n    chmod -R 755 \/app\/logs<\/p>\n<p>USER appuser<\/p>\n<p># \u590d\u5236\u6784\u5efa\u4ea7\u7269&#xff08;\u4ecebuilder\u9636\u6bb5\u590d\u5236admin\u6a21\u5757\u7684jar&#xff09;<br \/>\nCOPY &#8211;from&#061;builder &#8211;chown&#061;appuser:appgroup .\/ruoyi-admin\/target\/*.jar \/app\/app.jar<\/p>\n<p># \u66b4\u9732\u7aef\u53e3<br \/>\nEXPOSE 91002 #\u8fd9\u91cc\u7684\u7aef\u53e3\u914d\u7f6e\u548c\u4f60\u7684springBoot\u7684\u7aef\u53e3\u4e00\u6837\u5373\u53ef<\/p>\n<p># \u542f\u52a8\u547d\u4ee4&#xff08;\u53ef\u6dfb\u52a0JVM\u53c2\u6570&#xff09;<br \/>\nENTRYPOINT [&#034;sh&#034;, &#034;-c&#034;, &#034;java ${JAVA_OPTS} -jar \/app\/app.jar&#034;]<\/p>\n<h4>\u6784\u5efaDocker\u955c\u50cf<\/h4>\n<p>\u5982\u4f55\u4f7f\u7528\u4e0a\u8ff0\u7684dockerfile\u53ef\u4ee5\u53c2\u8003\u4e0b\u5217\u7684\u535a\u5ba2&#xff0c;<\/p>\n<p>IDEA&#043;Docker\u4e00\u952e\u90e8\u7f72\u9879\u76eeSpringBoot\u9879\u76ee_idea docker\u90e8\u7f72-CSDN\u535a\u5ba2<\/p>\n<p>&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;\u8865\u5145&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;<\/p>\n<p>\u5f53\u4f60\u770b\u5230\u8fd9&#xff0c;\u8bf4\u660e\u4e0a\u8ff0\u6587\u7ae0\u4f60\u5df2\u7ecf\u770b\u5b8c\u4e86&#xff0c;\u800c\u4e14\u4f60\u5df2\u7ecf\u5c06\u4f60\u7684\u955c\u50cf&#xff0c;\u6210\u529f\u6784\u9020\u5b8c\u6210&#xff0c;\u653e\u5230\u4e86\u4f60\u7684\u670d\u52a1\u5668\u6216\u8005\u865a\u62df\u673a\u4e2d\u3002\u4e5f\u5c31\u662f\u4f60\u7684docker\u6240\u5c5e\u7684\u4f4d\u7f6e\u3002<\/p>\n<p>\u4e0b\u9762\u5c31\u662f\u6211\u81ea\u5df1\u5bf9\u4e8e\u5bb9\u5668\u7684\u6784\u5efa\u7684\u4e00\u4e9b\u7ecf\u9a8c<\/p>\n<p>\u5982\u679c\u4f60\u4f7f\u7528\u865a\u62df\u673a\u8fdb\u884c\u6784\u5efa\u955c\u50cf&#xff0c;\u90a3\u4e48\u4f60\u7684docker\u6709\u53ef\u80fd\u662f\u5728\u672c\u5730\u6216\u8005\u865a\u62df\u673a\u4e2d&#xff0c;\u603b\u4e4b&#xff0c;\u4e5f\u8bb8\u4f60\u90fd\u955c\u50cf\u53ef\u80fd\u662f\u4e0d\u5728\u4e8e\u4f60\u60f3\u53d1\u5e03\u7f51\u7ad9\u7684\u670d\u52a1\u5668\u4e2d\u3002\u6b38&#xff0c;\u8fd9\u65f6\u4f60\u5c31\u53ef\u4ee5\u8003\u8651\u4e0b\u4f5c\u8005\u7684\u7ecf\u9a8c\u4e86&#x1f601;<\/p>\n<p>\u4f5c\u8005\u662f\u521b\u5efa\u4e86\u4e00\u4e2a\u963f\u91cc\u4e91\u7684\u955c\u50cf\u79c1\u4eba\u4ed3\u5e93&#xff0c;\u5c06\u955c\u50cf\u63a8\u5230\u4e86\u4f5c\u8005\u7684\u4ed3\u5e93\u4e2d&#xff0c;\u7136\u540e\u5c31\u53ef\u4ee5\u5728\u4efb\u4f55\u53ef\u4ee5\u8054\u7f51\u7684\u5730\u65b9\u62c9\u5230\u955c\u50cf\u5566<\/p>\n<p>\u4e0b\u9762\u662f\u6709\u5173\u963f\u91cc\u4e91\u955c\u50cf\u4ed3\u5e93\u7684\u94fe\u63a5&#xff0c;\u6709\u9700\u8981\u53ef\u4ee5\u770b\u4e00\u4e0b&#xff1a;<\/p>\n<\/p>\n<h4>\u63a8\u9001\u955c\u50cf\u5230Docker\u4ed3\u5e93<\/h4>\n<p>\u5982\u679c\u9700\u8981\u5c06\u955c\u50cf\u63a8\u9001\u5230Docker\u4ed3\u5e93&#xff08;\u5982\u963f\u91cc\u4e91\u7684\u79c1\u6709\u4ed3\u5e93&#xff09;&#xff0c;\u53ef\u4ee5\u6267\u884c\u4ee5\u4e0b\u547d\u4ee4&#xff1a;<\/p>\n<p>\u63a8\u9001\u955c\u50cf\u5230\u963f\u91cc\u4e91-CSDN\u535a\u5ba2<\/p>\n<p>\u5f53\u4f60\u641e\u5b9a\u8fd9\u4e00\u6b65&#xff0c;\u4e5f\u8bb8\u4f60\u53ef\u4ee5\u8003\u8651\u4e00\u4e0b\u5b9d\u5854\u9762\u677f&#xff0c;\u901a\u8fc7\u5b9d\u5854\u9762\u677f\u7684docker\u76f8\u5173\u529f\u80fd\u6765\u7ba1\u7406\u4f60\u7684\u955c\u50cf\u5bb9\u5668&#xff0c;\u4ec5\u4f5c\u8005\u7684\u4f53\u9a8c\u800c\u8a00\u786e\u5b9e\u662f\u633a\u8f7b\u677e\u7684\u3002<\/p>\n<p>\u901a\u8fc7\u4ee5\u4e0a\u6b65\u9aa4&#xff0c;\u53ef\u4ee5\u5c06\u672c\u5730Spring Boot\u9879\u76ee\u6253\u5305\u6210Docker\u955c\u50cf&#xff0c;\u5e76\u5728\u670d\u52a1\u5668\u5bb9\u5668\u4e2d\u8fd0\u884c\u3002<\/p>\n<p>\u8fd9\u6837\u672c\u6587\u5c31\u5b8c\u6210\u4e86\u4e00\u4e2a\u8d85\u7ea7\u539f\u59cb\u7248\u7684CICD&#xff0c;\u5bf9\u4e8e\u6bd5\u8bbe\u662f\u591f\u7528\u4e86&#xff0c;\u540e\u7eed\u53ef\u4ee5\u4e86\u89e3\u4e00\u4e9bJenkins&#xff0c;k8s\u4e4b\u7c7b\u7684\u6280\u672f\u3002\u5c31\u53ef\u4ee5\u5f00\u5fc3\u5347\u7ea7\u6d41\u7a0b\u5566&#xff01;&#xff01;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb758\u6b21\uff0c\u70b9\u8d5e16\u6b21\uff0c\u6536\u85cf5\u6b21\u3002\u672c\u9879\u76ee\u662f\u57fa\u4e8e\u82e5\u4f9d\u524d\u540e\u7aef\u5206\u79bb\u6846\u67b6\u5f00\u53d1\u7684\u6bd5\u4e1a\u8bbe\u8ba1\uff0c\u6d89\u53ca\u591a\u6a21\u5757\u7684SpringBoot\u9879\u76ee\u3002\u6587\u7ae0\u8be6\u7ec6\u4ecb\u7ecd\u4e86\u5982\u4f55\u901a\u8fc7Dockerfile\u8fdb\u884c\u9879\u76ee\u7684\u6784\u5efa\u548c\u90e8\u7f72\uff0c\u5f3a\u8c03\u4e86\u5904\u7406\u6a21\u5757\u4f9d\u8d56\u5173\u7cfb\u7684\u91cd\u8981\u6027\uff0c\u4ee5\u907f\u514d\u6784\u5efa\u8fc7\u7a0b\u4e2d\u51fa\u73b0\u4f9d\u8d56\u9519\u8bef\u3002\u9996\u5148\uff0c\u9700\u8981\u5728\u9879\u76ee\u6839\u76ee\u5f55\u4e0b\u521b\u5efaDockerfile\uff0c\u5e76\u6309\u7167\u4f9d\u8d56\u987a\u5e8f\u7f16\u8bd1\u5404\u5b50\u6a21\u5757\u3002\u63a5\u7740\uff0c\u901a\u8fc7Maven\u8fdb\u884c\u9879\u76ee\u6253\u5305\uff0c\u5e76\u5229\u7528Docker\u6784\u5efa\u955c\u50cf\u3002\u6700\u540e\uff0c\u6587\u7ae0\u8fd8\u63d0\u5230\u4e86\u5982\u4f55\u5c06\u955c\u50cf\u63a8\u9001\u5230\u963f\u91cc\u4e91\u79c1\u6709\u4ed3\u5e93\uff0c\u5e76\u901a\u8fc7\u5b9d\u5854\u9762\u677f\u7ba1\u7406Docker\u5bb9\u5668\uff0c\u5b9e\u73b0\u9879\u76ee\u7684\u6301\u7eed\u96c6\u6210\u548c\u90e8\u7f72\u3002\u6574\u4e2a\u8fc7\u7a0b\u4e3a\u8bfb\u8005\u63d0\u4f9b\u4e86\u4e00\u4e2a\u4ece\u5f00\u53d1\u5230\u90e8\u7f72\u7684\u5b8c\u6574\u89e3\u51b3\u65b9\u6848<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[386,99,98,1271,43],"topic":[],"class_list":["post-38415","post","type-post","status-publish","format-standard","hentry","category-server","tag-intellij-idea","tag-java","tag-spring-boot","tag-springboot","tag-43"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>\u4f7f\u7528Idea\u5c06\u672c\u5730springBoot\u9879\u76ee\u6253\u5305\u6210\u955c\u50cf\uff0c\u7136\u540e\u8fd0\u884c\u5230\u670d\u52a1\u5668\u5bb9\u5668\u4e2d - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.wsisp.com\/helps\/38415.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u4f7f\u7528Idea\u5c06\u672c\u5730springBoot\u9879\u76ee\u6253\u5305\u6210\u955c\u50cf\uff0c\u7136\u540e\u8fd0\u884c\u5230\u670d\u52a1\u5668\u5bb9\u5668\u4e2d - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb758\u6b21\uff0c\u70b9\u8d5e16\u6b21\uff0c\u6536\u85cf5\u6b21\u3002\u672c\u9879\u76ee\u662f\u57fa\u4e8e\u82e5\u4f9d\u524d\u540e\u7aef\u5206\u79bb\u6846\u67b6\u5f00\u53d1\u7684\u6bd5\u4e1a\u8bbe\u8ba1\uff0c\u6d89\u53ca\u591a\u6a21\u5757\u7684SpringBoot\u9879\u76ee\u3002\u6587\u7ae0\u8be6\u7ec6\u4ecb\u7ecd\u4e86\u5982\u4f55\u901a\u8fc7Dockerfile\u8fdb\u884c\u9879\u76ee\u7684\u6784\u5efa\u548c\u90e8\u7f72\uff0c\u5f3a\u8c03\u4e86\u5904\u7406\u6a21\u5757\u4f9d\u8d56\u5173\u7cfb\u7684\u91cd\u8981\u6027\uff0c\u4ee5\u907f\u514d\u6784\u5efa\u8fc7\u7a0b\u4e2d\u51fa\u73b0\u4f9d\u8d56\u9519\u8bef\u3002\u9996\u5148\uff0c\u9700\u8981\u5728\u9879\u76ee\u6839\u76ee\u5f55\u4e0b\u521b\u5efaDockerfile\uff0c\u5e76\u6309\u7167\u4f9d\u8d56\u987a\u5e8f\u7f16\u8bd1\u5404\u5b50\u6a21\u5757\u3002\u63a5\u7740\uff0c\u901a\u8fc7Maven\u8fdb\u884c\u9879\u76ee\u6253\u5305\uff0c\u5e76\u5229\u7528Docker\u6784\u5efa\u955c\u50cf\u3002\u6700\u540e\uff0c\u6587\u7ae0\u8fd8\u63d0\u5230\u4e86\u5982\u4f55\u5c06\u955c\u50cf\u63a8\u9001\u5230\u963f\u91cc\u4e91\u79c1\u6709\u4ed3\u5e93\uff0c\u5e76\u901a\u8fc7\u5b9d\u5854\u9762\u677f\u7ba1\u7406Docker\u5bb9\u5668\uff0c\u5b9e\u73b0\u9879\u76ee\u7684\u6301\u7eed\u96c6\u6210\u548c\u90e8\u7f72\u3002\u6574\u4e2a\u8fc7\u7a0b\u4e3a\u8bfb\u8005\u63d0\u4f9b\u4e86\u4e00\u4e2a\u4ece\u5f00\u53d1\u5230\u90e8\u7f72\u7684\u5b8c\u6574\u89e3\u51b3\u65b9\u6848\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/38415.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2025-05-20T01:56:01+00:00\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/38415.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/38415.html\",\"name\":\"\u4f7f\u7528Idea\u5c06\u672c\u5730springBoot\u9879\u76ee\u6253\u5305\u6210\u955c\u50cf\uff0c\u7136\u540e\u8fd0\u884c\u5230\u670d\u52a1\u5668\u5bb9\u5668\u4e2d - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2025-05-20T01:56:01+00:00\",\"dateModified\":\"2025-05-20T01:56:01+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/38415.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/38415.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/38415.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u4f7f\u7528Idea\u5c06\u672c\u5730springBoot\u9879\u76ee\u6253\u5305\u6210\u955c\u50cf\uff0c\u7136\u540e\u8fd0\u884c\u5230\u670d\u52a1\u5668\u5bb9\u5668\u4e2d\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\",\"url\":\"https:\/\/www.wsisp.com\/helps\/\",\"name\":\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"description\":\"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"contentUrl\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"caption\":\"admin\"},\"sameAs\":[\"http:\/\/wp.wsisp.com\"],\"url\":\"https:\/\/www.wsisp.com\/helps\/author\/admin\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"\u4f7f\u7528Idea\u5c06\u672c\u5730springBoot\u9879\u76ee\u6253\u5305\u6210\u955c\u50cf\uff0c\u7136\u540e\u8fd0\u884c\u5230\u670d\u52a1\u5668\u5bb9\u5668\u4e2d - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.wsisp.com\/helps\/38415.html","og_locale":"zh_CN","og_type":"article","og_title":"\u4f7f\u7528Idea\u5c06\u672c\u5730springBoot\u9879\u76ee\u6253\u5305\u6210\u955c\u50cf\uff0c\u7136\u540e\u8fd0\u884c\u5230\u670d\u52a1\u5668\u5bb9\u5668\u4e2d - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb758\u6b21\uff0c\u70b9\u8d5e16\u6b21\uff0c\u6536\u85cf5\u6b21\u3002\u672c\u9879\u76ee\u662f\u57fa\u4e8e\u82e5\u4f9d\u524d\u540e\u7aef\u5206\u79bb\u6846\u67b6\u5f00\u53d1\u7684\u6bd5\u4e1a\u8bbe\u8ba1\uff0c\u6d89\u53ca\u591a\u6a21\u5757\u7684SpringBoot\u9879\u76ee\u3002\u6587\u7ae0\u8be6\u7ec6\u4ecb\u7ecd\u4e86\u5982\u4f55\u901a\u8fc7Dockerfile\u8fdb\u884c\u9879\u76ee\u7684\u6784\u5efa\u548c\u90e8\u7f72\uff0c\u5f3a\u8c03\u4e86\u5904\u7406\u6a21\u5757\u4f9d\u8d56\u5173\u7cfb\u7684\u91cd\u8981\u6027\uff0c\u4ee5\u907f\u514d\u6784\u5efa\u8fc7\u7a0b\u4e2d\u51fa\u73b0\u4f9d\u8d56\u9519\u8bef\u3002\u9996\u5148\uff0c\u9700\u8981\u5728\u9879\u76ee\u6839\u76ee\u5f55\u4e0b\u521b\u5efaDockerfile\uff0c\u5e76\u6309\u7167\u4f9d\u8d56\u987a\u5e8f\u7f16\u8bd1\u5404\u5b50\u6a21\u5757\u3002\u63a5\u7740\uff0c\u901a\u8fc7Maven\u8fdb\u884c\u9879\u76ee\u6253\u5305\uff0c\u5e76\u5229\u7528Docker\u6784\u5efa\u955c\u50cf\u3002\u6700\u540e\uff0c\u6587\u7ae0\u8fd8\u63d0\u5230\u4e86\u5982\u4f55\u5c06\u955c\u50cf\u63a8\u9001\u5230\u963f\u91cc\u4e91\u79c1\u6709\u4ed3\u5e93\uff0c\u5e76\u901a\u8fc7\u5b9d\u5854\u9762\u677f\u7ba1\u7406Docker\u5bb9\u5668\uff0c\u5b9e\u73b0\u9879\u76ee\u7684\u6301\u7eed\u96c6\u6210\u548c\u90e8\u7f72\u3002\u6574\u4e2a\u8fc7\u7a0b\u4e3a\u8bfb\u8005\u63d0\u4f9b\u4e86\u4e00\u4e2a\u4ece\u5f00\u53d1\u5230\u90e8\u7f72\u7684\u5b8c\u6574\u89e3\u51b3\u65b9\u6848","og_url":"https:\/\/www.wsisp.com\/helps\/38415.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2025-05-20T01:56:01+00:00","author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"3 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/38415.html","url":"https:\/\/www.wsisp.com\/helps\/38415.html","name":"\u4f7f\u7528Idea\u5c06\u672c\u5730springBoot\u9879\u76ee\u6253\u5305\u6210\u955c\u50cf\uff0c\u7136\u540e\u8fd0\u884c\u5230\u670d\u52a1\u5668\u5bb9\u5668\u4e2d - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2025-05-20T01:56:01+00:00","dateModified":"2025-05-20T01:56:01+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/38415.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/38415.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/38415.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"\u4f7f\u7528Idea\u5c06\u672c\u5730springBoot\u9879\u76ee\u6253\u5305\u6210\u955c\u50cf\uff0c\u7136\u540e\u8fd0\u884c\u5230\u670d\u52a1\u5668\u5bb9\u5668\u4e2d"}]},{"@type":"WebSite","@id":"https:\/\/www.wsisp.com\/helps\/#website","url":"https:\/\/www.wsisp.com\/helps\/","name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","description":"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41","name":"admin","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/","url":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","contentUrl":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","caption":"admin"},"sameAs":["http:\/\/wp.wsisp.com"],"url":"https:\/\/www.wsisp.com\/helps\/author\/admin"}]}},"_links":{"self":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/38415","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/comments?post=38415"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/38415\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=38415"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=38415"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=38415"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=38415"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}