{"id":730,"date":"2023-05-28T02:10:40","date_gmt":"2023-05-27T18:10:40","guid":{"rendered":"https:\/\/xinchewhd.com.cn\/?p=730"},"modified":"2023-05-28T02:10:40","modified_gmt":"2023-05-27T18:10:40","slug":"spring%e6%b3%a8%e8%a7%a3profile%e5%ae%9e%e7%8e%b0%e5%bc%80%e5%8f%91%e7%8e%af%e5%a2%83%ef%bc%8c%e6%b5%8b%e8%af%95%e7%8e%af%e5%a2%83%ef%bc%8c%e7%94%9f%e4%ba%a7%e7%8e%af%e5%a2%83%e7%9a%84%e5%88%87","status":"publish","type":"post","link":"https:\/\/xinchewhd.com.cn\/index.php\/spring-boot\/spring%e6%b3%a8%e8%a7%a3profile%e5%ae%9e%e7%8e%b0%e5%bc%80%e5%8f%91%e7%8e%af%e5%a2%83%ef%bc%8c%e6%b5%8b%e8%af%95%e7%8e%af%e5%a2%83%ef%bc%8c%e7%94%9f%e4%ba%a7%e7%8e%af%e5%a2%83%e7%9a%84%e5%88%87\/","title":{"rendered":"Spring\u6ce8\u89e3@Profile\u5b9e\u73b0\u5f00\u53d1\u73af\u5883\uff0c\u6d4b\u8bd5\u73af\u5883\uff0c\u751f\u4ea7\u73af\u5883\u7684\u5207\u6362"},"content":{"rendered":"<div class='wxsyncmain'>\n<h2 style=\"box-sizing: border-box;line-height: 1.5;margin-bottom: 10px;padding-left: 20px;font-size: 20px;font-weight: 700;color: rgb(97, 69, 0);font-family: -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, Helvetica, Arial, sans-serif, &quot;Apple Color Emoji&quot;, &quot;Segoe UI Emoji&quot;;text-align: center;white-space: normal;background-color: rgb(255, 255, 255);\">\u524d\u8a00<\/h2>\n<blockquote style=\"box-sizing: inherit;text-size-adjust: 100%;line-height: 25px;border-radius: 10px;text-align: left;border-width: 1px;border-top-style: solid;border-right-style: solid;border-bottom-style: solid;border-color: rgb(255, 216, 122);background-color: rgba(189, 134, 0, 0.5);margin-top: 20px;margin-bottom: 20px;padding: 20px;color: rgb(36, 41, 46);font-family: -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, Helvetica, Arial, sans-serif, &quot;Apple Color Emoji&quot;, &quot;Segoe UI Emoji&quot;;white-space: normal;\">\n<p style=\"box-sizing: border-box;color: rgb(255, 246, 224);letter-spacing: 2px;\">\u5728\u8fdb\u884c\u8f6f\u4ef6\u5f00\u53d1\u8fc7\u7a0b\u4e2d\uff0c\u4e00\u822c\u4f1a\u5c06\u9879\u76ee\u5206\u4e3a\u5f00\u53d1\u73af\u5883\uff0c\u6d4b\u8bd5\u73af\u5883\uff0c\u751f\u4ea7\u73af\u5883\uff0c\u5f00\u53d1\u4eba\u5458\u5728\u5f00\u53d1\u73af\u5883\u8fdb\u884c\u5f00\u53d1\uff0c\u7136\u540e\u5c06\u4ee3\u7801\u5408\u5e76\u5230\u6d4b\u8bd5\u73af\u5883\u8ba9&nbsp;\u6d4b\u8bd5\u5de5\u7a0b\u5e08\u8fdb\u884c\u6d4b\u8bd5\uff0c\u6d4b\u8bd5\u5b8c\u6210\u540e\uff0c\u5f00\u53d1\u4eba\u5458\u4fee\u6539\u5b8cbug\uff0c\u7136\u540e\u518d\u8fdb\u884c\u6d4b\u8bd5\uff0c\u6d4b\u8bd5\u5de5\u7a0b\u5e08\u6d4b\u8bd5\u6ca1\u6709bug\u540e\uff0c\u518d\u5c06\u4ee3\u7801\u5408\u5e76\u5230\u751f\u4ea7\u73af\u5883\uff0c\u751f\u4ea7\u73af\u5883&nbsp;\u5c31\u662f\u6700\u7ec8\u7ed9\u7528\u6237\u7528\u7684\uff0c\u73b0\u5728\u7684\u9879\u76ee\u4e00\u822c\u90fd\u662f\u8d70CI\/CD\u6d41\u6c34\u7ebf\uff0c\u6574\u4e2a\u8fc7\u7a0b\u5c31\u662f\u4e00\u6761\u6d41\u6c34\u7ebf\uff0c\u800c\u5728\u6ca1\u6709CI\/CD\u4e4b\u524d\uff0c\u5f00\u53d1\u4eba\u5458\u5f00\u53d1\u5b8c\u6bd5\u540e\uff0c\u53ef\u80fd\u9700\u8981\u5c06\u4ee3\u7801&nbsp;\u90e8\u7f72\u4e0a\u670d\u52a1\u5668\uff0c\u6d4b\u8bd5\u4eba\u5458\u518d\u8fdb\u884c\u6d4b\u8bd5\uff0c\u8fd8\u6709\u7684\u76f4\u63a5\u8ba9\u6d4b\u8bd5\u4eba\u5458\u62c9\u4ee3\u7801\u6765\u81ea\u5df1\u8fd0\u884c\uff0c\u81ea\u5df1\u6d4b\u8bd5\uff0c\u8fd9\u6837\u6548\u7387\u5b9e\u5728\u662f\u592a\u4f4e\u4e86\u3002\u90a3\u4e48\u5728\u8fd9\u4e48\u591a\u73af\u5883\u4e4b\u95f4\u8fdb\u884c\u5207\u6362\uff0c&nbsp;\u6211\u4eec\u5e94\u8be5\u9700\u8981\u4e00\u5b9a\u7684\u7b56\u7565\uff0c\u4e0b\u9762\u6211\u5c31\u662f\u7528Spring\u7684@Profile\u6ce8\u89e3\u6765\u5b9e\u73b0\u73af\u5883\u4e4b\u95f4\u7684\u5207\u6362\u3002<\/p>\n<\/blockquote>\n<h2 style=\"box-sizing: border-box;line-height: 1.5;margin-bottom: 10px;padding-left: 20px;font-size: 20px;font-weight: 700;color: rgb(97, 69, 0);font-family: -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, Helvetica, Arial, sans-serif, &quot;Apple Color Emoji&quot;, &quot;Segoe UI Emoji&quot;;text-align: center;white-space: normal;background-color: rgb(255, 255, 255);\">\u73af\u5883\u642d\u5efa<\/h2>\n<h4 style=\"box-sizing: border-box;line-height: 1.5;margin-bottom: 10px;padding-bottom: 5px;font-weight: 700;color: rgb(163, 116, 0);font-size: 17px;font-family: -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, Helvetica, Arial, sans-serif, &quot;Apple Color Emoji&quot;, &quot;Segoe UI Emoji&quot;;text-align: start;white-space: normal;background-color: rgb(255, 255, 255);\">\u9879\u76ee\u7ed3\u6784<\/h4>\n<pre style=\"box-sizing: border-box;font-family: Menlo, Monaco, Consolas, &quot;Courier New&quot;, monospace;font-size: 15px;overflow: auto;line-height: 1.75;background: rgb(71, 73, 73);color: rgb(209, 217, 225);text-align: start;\"><code style=\"box-sizing: border-box;font-family: Menlo, Monaco, Consolas, &quot;Courier New&quot;, monospace;font-size: 12px;word-break: normal;border-radius: 2px;overflow-x: auto;background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;padding: 15px 12px;display: block;\">DruidDataSource<br  \/>\u2514\u2500\u2500 src<br  \/>    \u2514\u2500\u2500 main<br  \/>        \u2514\u2500\u2500 java<br  \/>            \u2514\u2500\u2500 com.steakliu.druiddatasource<br  \/>               \u251c\u2500\u2500 controller<br  \/>               \u2502   \u2514\u2500\u2500 DataSourceController.java<br  \/>               \u2514\u2500\u2500 datasource<br  \/>               \u2502   \u2514\u2500\u2500 DataSourceConfiguration.java<br  \/>               \u2514\u2500\u2500 DruidDataSourceApplication.java<br  \/>            \u2514\u2500\u2500 resource<br  \/>                \u2514\u2500\u2500 application.yml<br  \/>                \u2514\u2500\u2500 application-dev.yml<br  \/>                \u2514\u2500\u2500 application-prod.yml<br  \/>                \u2514\u2500\u2500 application-test.yml<br  \/><\/code><\/pre>\n<h3 style=\"box-sizing: border-box;line-height: 1.5;margin-top: 20px;margin-right: 10px;width: 623.781px;text-align: left;font-size: 18px;font-weight: 700;display: inline-block;padding-left: 10px;border-left: 5px solid rgb(143, 102, 0);color: rgb(97, 69, 0);font-family: -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, Helvetica, Arial, sans-serif, &quot;Apple Color Emoji&quot;, &quot;Segoe UI Emoji&quot;;white-space: normal;background-color: rgb(255, 255, 255);\">application.yml<\/h3>\n<p><span style=\"color: rgb(36, 41, 46);font-family: -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, Helvetica, Arial, sans-serif, &quot;Apple Color Emoji&quot;, &quot;Segoe UI Emoji&quot;;font-size: 15px;text-align: start;background-color: rgb(255, 255, 255);\"><\/span><\/p>\n<p style=\"box-sizing: border-box;color: rgb(65, 44, 12);letter-spacing: 1px;font-family: -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, Helvetica, Arial, sans-serif, &quot;Apple Color Emoji&quot;, &quot;Segoe UI Emoji&quot;;font-size: 15px;text-align: start;white-space: normal;background-color: rgb(255, 255, 255);\">application.yml\u5185\u5bb9\u5982\u4e0b\uff0c\u91cc\u9762\u4e3b\u8981\u653e\u7684\u662f\u516c\u5171\u7684\u914d\u7f6e\uff0c\u6bd4\u5982\u9879\u76ee\u7684\u540d\u79f0\u554a\uff0c\u7aef\u53e3\u554a\u8fd9\u4e9b\uff0c\u4f7f\u7528spring.profiles.active = dev\/test\/prod\u5207\u6362\u4e0d\u540c\u7684\u73af\u5883\u3002<\/p>\n<p style=\"box-sizing: border-box;color: rgb(65, 44, 12);letter-spacing: 1px;font-family: -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, Helvetica, Arial, sans-serif, &quot;Apple Color Emoji&quot;, &quot;Segoe UI Emoji&quot;;font-size: 15px;text-align: start;white-space: normal;background-color: rgb(255, 255, 255);\"><br  \/><\/p>\n<pre style=\"box-sizing: border-box;font-family: Menlo, Monaco, Consolas, &quot;Courier New&quot;, monospace;font-size: 15px;overflow: auto;line-height: 1.75;background: rgb(71, 73, 73);color: rgb(209, 217, 225);text-align: start;\"><code style=\"box-sizing: border-box;font-family: Menlo, Monaco, Consolas, &quot;Courier New&quot;, monospace;font-size: 12px;word-break: normal;border-radius: 2px;overflow-x: auto;background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;padding: 15px 12px;display: block;\"><span style=\"box-sizing: border-box;color: rgb(129, 162, 190);\">server:<\/span><br  \/>  <span style=\"box-sizing: border-box;color: rgb(129, 162, 190);\">port:<\/span> <span style=\"box-sizing: border-box;color: rgb(249, 145, 87);\">8080<\/span><br  \/><span style=\"box-sizing: border-box;color: rgb(129, 162, 190);\">spring:<\/span><br  \/>  <span style=\"box-sizing: border-box;color: rgb(129, 162, 190);\">profiles:<\/span><br  \/>    <span style=\"box-sizing: border-box;color: rgb(129, 162, 190);\">active:<\/span> <span style=\"box-sizing: border-box;color: rgb(138, 190, 183);\">dev<\/span><br  \/><\/code><\/pre>\n<h3 style=\"box-sizing: border-box;line-height: 1.5;margin-top: 20px;margin-right: 10px;width: 623.781px;text-align: left;font-size: 18px;font-weight: 700;display: inline-block;padding-left: 10px;border-left: 5px solid rgb(143, 102, 0);color: rgb(97, 69, 0);font-family: -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, Helvetica, Arial, sans-serif, &quot;Apple Color Emoji&quot;, &quot;Segoe UI Emoji&quot;;white-space: normal;background-color: rgb(255, 255, 255);\">application-dev.yml<\/h3>\n<p><span style=\"color: rgb(36, 41, 46);font-family: -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, Helvetica, Arial, sans-serif, &quot;Apple Color Emoji&quot;, &quot;Segoe UI Emoji&quot;;font-size: 15px;text-align: start;background-color: rgb(255, 255, 255);\"><\/span><\/p>\n<pre style=\"box-sizing: border-box;font-family: Menlo, Monaco, Consolas, &quot;Courier New&quot;, monospace;font-size: 15px;overflow: auto;line-height: 1.75;background: rgb(71, 73, 73);color: rgb(209, 217, 225);text-align: start;\"><code style=\"box-sizing: border-box;font-family: Menlo, Monaco, Consolas, &quot;Courier New&quot;, monospace;font-size: 12px;word-break: normal;border-radius: 2px;overflow-x: auto;background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;padding: 15px 12px;display: block;\"><span style=\"box-sizing: border-box;color: rgb(129, 162, 190);\">spring:<\/span><br  \/>  <span style=\"box-sizing: border-box;color: rgb(129, 162, 190);\">datasource:<\/span><br  \/>    <span style=\"box-sizing: border-box;color: rgb(129, 162, 190);\">druid:<\/span><br  \/>      <span style=\"box-sizing: border-box;color: rgb(129, 162, 190);\">username:<\/span> <span style=\"box-sizing: border-box;color: rgb(138, 190, 183);\">root<\/span><br  \/>      <span style=\"box-sizing: border-box;color: rgb(129, 162, 190);\">password:<\/span> <span style=\"box-sizing: border-box;color: rgb(138, 190, 183);\">xiaosi520@<\/span><br  \/>      <span style=\"box-sizing: border-box;color: rgb(129, 162, 190);\">url:<\/span> <span style=\"box-sizing: border-box;color: rgb(138, 190, 183);\">jdbc:mysql:\/\/127.0.0.1:3306\/store-dev<\/span><br  \/>      <span style=\"box-sizing: border-box;color: rgb(129, 162, 190);\">driver-class-name:<\/span> <span style=\"box-sizing: border-box;color: rgb(138, 190, 183);\">com.mysql.cj.jdbc.Driver<\/span><br  \/>    <span style=\"box-sizing: border-box;color: rgb(129, 162, 190);\">type:<\/span> <span style=\"box-sizing: border-box;color: rgb(138, 190, 183);\">com.alibaba.druid.pool.DruidDataSource<\/span><br  \/><\/code><\/pre>\n<h3 style=\"box-sizing: border-box;line-height: 1.5;margin-top: 20px;margin-right: 10px;width: 623.781px;text-align: left;font-size: 18px;font-weight: 700;display: inline-block;padding-left: 10px;border-left: 5px solid rgb(143, 102, 0);color: rgb(97, 69, 0);font-family: -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, Helvetica, Arial, sans-serif, &quot;Apple Color Emoji&quot;, &quot;Segoe UI Emoji&quot;;white-space: normal;background-color: rgb(255, 255, 255);\">application-test.yml<\/h3>\n<p><span style=\"color: rgb(36, 41, 46);font-family: -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, Helvetica, Arial, sans-serif, &quot;Apple Color Emoji&quot;, &quot;Segoe UI Emoji&quot;;font-size: 15px;text-align: start;background-color: rgb(255, 255, 255);\"><\/span><\/p>\n<pre style=\"box-sizing: border-box;font-family: Menlo, Monaco, Consolas, &quot;Courier New&quot;, monospace;font-size: 15px;overflow: auto;line-height: 1.75;background: rgb(71, 73, 73);color: rgb(209, 217, 225);text-align: start;\"><code style=\"box-sizing: border-box;font-family: Menlo, Monaco, Consolas, &quot;Courier New&quot;, monospace;font-size: 12px;word-break: normal;border-radius: 2px;overflow-x: auto;background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;padding: 15px 12px;display: block;\"><span style=\"box-sizing: border-box;color: rgb(129, 162, 190);\">spring:<\/span><br  \/>  <span style=\"box-sizing: border-box;color: rgb(129, 162, 190);\">datasource:<\/span><br  \/>    <span style=\"box-sizing: border-box;color: rgb(129, 162, 190);\">druid:<\/span><br  \/>      <span style=\"box-sizing: border-box;color: rgb(129, 162, 190);\">username:<\/span> <span style=\"box-sizing: border-box;color: rgb(138, 190, 183);\">root<\/span><br  \/>      <span style=\"box-sizing: border-box;color: rgb(129, 162, 190);\">password:<\/span> <span style=\"box-sizing: border-box;color: rgb(138, 190, 183);\">xiaosi520@<\/span><br  \/>      <span style=\"box-sizing: border-box;color: rgb(129, 162, 190);\">url:<\/span> <span style=\"box-sizing: border-box;color: rgb(138, 190, 183);\">jdbc:mysql:\/\/127.0.0.1:3306\/store-test<\/span><br  \/>      <span style=\"box-sizing: border-box;color: rgb(129, 162, 190);\">driver-class-name:<\/span> <span style=\"box-sizing: border-box;color: rgb(138, 190, 183);\">com.mysql.cj.jdbc.Driver<\/span><br  \/>    <span style=\"box-sizing: border-box;color: rgb(129, 162, 190);\">type:<\/span> <span style=\"box-sizing: border-box;color: rgb(138, 190, 183);\">com.alibaba.druid.pool.DruidDataSource<\/span><br  \/><\/code><\/pre>\n<h3 style=\"box-sizing: border-box;line-height: 1.5;margin-top: 20px;margin-right: 10px;width: 623.781px;text-align: left;font-size: 18px;font-weight: 700;display: inline-block;padding-left: 10px;border-left: 5px solid rgb(143, 102, 0);color: rgb(97, 69, 0);font-family: -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, Helvetica, Arial, sans-serif, &quot;Apple Color Emoji&quot;, &quot;Segoe UI Emoji&quot;;white-space: normal;background-color: rgb(255, 255, 255);\">application-prod.yml<\/h3>\n<p><span style=\"color: rgb(36, 41, 46);font-family: -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, Helvetica, Arial, sans-serif, &quot;Apple Color Emoji&quot;, &quot;Segoe UI Emoji&quot;;font-size: 15px;text-align: start;background-color: rgb(255, 255, 255);\"><\/span><\/p>\n<pre style=\"box-sizing: border-box;font-family: Menlo, Monaco, Consolas, &quot;Courier New&quot;, monospace;font-size: 15px;overflow: auto;line-height: 1.75;background: rgb(71, 73, 73);color: rgb(209, 217, 225);text-align: start;\"><code style=\"box-sizing: border-box;font-family: Menlo, Monaco, Consolas, &quot;Courier New&quot;, monospace;font-size: 12px;word-break: normal;border-radius: 2px;overflow-x: auto;background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;padding: 15px 12px;display: block;\"><span style=\"box-sizing: border-box;color: rgb(129, 162, 190);\">spring:<\/span><br  \/>  <span style=\"box-sizing: border-box;color: rgb(129, 162, 190);\">datasource:<\/span><br  \/>    <span style=\"box-sizing: border-box;color: rgb(129, 162, 190);\">druid:<\/span><br  \/>      <span style=\"box-sizing: border-box;color: rgb(129, 162, 190);\">username:<\/span> <span style=\"box-sizing: border-box;color: rgb(138, 190, 183);\">root<\/span><br  \/>      <span style=\"box-sizing: border-box;color: rgb(129, 162, 190);\">password:<\/span> <span style=\"box-sizing: border-box;color: rgb(138, 190, 183);\">xiaosi520@<\/span><br  \/>      <span style=\"box-sizing: border-box;color: rgb(129, 162, 190);\">url:<\/span> <span style=\"box-sizing: border-box;color: rgb(138, 190, 183);\">jdbc:mysql:\/\/127.0.0.1:3306\/store-prod<\/span><br  \/>      <span style=\"box-sizing: border-box;color: rgb(129, 162, 190);\">driver-class-name:<\/span> <span style=\"box-sizing: border-box;color: rgb(138, 190, 183);\">com.mysql.cj.jdbc.Driver<\/span><br  \/>    <span style=\"box-sizing: border-box;color: rgb(129, 162, 190);\">type:<\/span> <span style=\"box-sizing: border-box;color: rgb(138, 190, 183);\">com.alibaba.druid.pool.DruidDataSource<\/span><br  \/><\/code><\/pre>\n<p style=\"box-sizing: border-box;color: rgb(65, 44, 12);letter-spacing: 1px;font-family: -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, Helvetica, Arial, sans-serif, &quot;Apple Color Emoji&quot;, &quot;Segoe UI Emoji&quot;;font-size: 15px;text-align: start;white-space: normal;background-color: rgb(255, 255, 255);\"><br  \/><\/p>\n<p style=\"box-sizing: border-box;color: rgb(65, 44, 12);letter-spacing: 1px;font-family: -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, Helvetica, Arial, sans-serif, &quot;Apple Color Emoji&quot;, &quot;Segoe UI Emoji&quot;;font-size: 15px;text-align: start;white-space: normal;background-color: rgb(255, 255, 255);\">\u4ece\u4e0a\u9762\u6211\u4eec\u77e5\u9053\uff0c\u4e09\u4e2ayaml\u6587\u4ef6\u4e3b\u8981\u914d\u7f6e\u7684\u662f\u6570\u636e\u5e93\uff0c\u5206\u4e3adev\uff0ctest\uff0cprod\u4e09\u4e2a\u5e93\uff0c\u6211\u4e5f\u5728\u6570\u636e\u5e93\u521b\u5efa\u4e86\u4e09\u4e2a\u6570\u636e\uff0c\u7b49\u4e00\u4e0b\u6211\u4eec\u8981\u6839\u636e\u4e0d\u540c\u7684\u914d\u7f6e\u83b7\u53d6\u4e0d\u540c\u7684\u6570\u636e\u5e93\u7684\u6570\u636e\uff0c&nbsp;\u4e09\u4e2a\u6570\u636e\u5e93\u5982\u4e0b\uff0c\u5176\u4e2d\u6bcf\u4e2a\u5e93\u91cc\u9762\u90fd\u6709\u4e00\u5f20\u8868\uff0c\u5206\u522b\u653e\u4e86\u4e00\u6761\u6d4b\u8bd5\u6570\u636e\u3002<\/p>\n<p style=\"box-sizing: border-box;color: rgb(65, 44, 12);letter-spacing: 1px;font-family: -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, Helvetica, Arial, sans-serif, &quot;Apple Color Emoji&quot;, &quot;Segoe UI Emoji&quot;;font-size: 15px;text-align: start;white-space: normal;background-color: rgb(255, 255, 255);\"><br  \/><\/p>\n<p style=\"box-sizing: border-box;color: rgb(65, 44, 12);letter-spacing: 1px;font-family: -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, Helvetica, Arial, sans-serif, &quot;Apple Color Emoji&quot;, &quot;Segoe UI Emoji&quot;;font-size: 15px;text-align: start;white-space: normal;background-color: rgb(255, 255, 255);\"><img decoding=\"async\" class=\"rich_pages wxw-img lazyload\" data-ratio=\"0.26247987117552335\"  data-type=\"png\" data-w=\"621\" style=\"box-sizing: border-box;border-style: none;display: block;margin: auto;\" data-src=\"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2023\/05\/20230528015705802.png\" src=\"https:\/\/s.nmxc.ltd\/sakurairo_vision\/@2.6\/load_svg\/inload.svg\" onerror=\"imgError(this)\"  \/><noscript><img decoding=\"async\" class=\"rich_pages wxw-img\" data-ratio=\"0.26247987117552335\"  data-type=\"png\" data-w=\"621\" style=\"box-sizing: border-box;border-style: none;display: block;margin: auto;\" src=\"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2023\/05\/20230528015705802.png\"  \/><\/noscript><span style=\"color: rgb(97, 69, 0);font-size: 18px;font-weight: 700;\"><\/span><\/p>\n<h3 style=\"box-sizing: border-box;line-height: 1.5;margin-top: 20px;margin-right: 10px;width: 623.781px;text-align: left;font-size: 18px;font-weight: 700;display: inline-block;padding-left: 10px;border-left: 5px solid rgb(143, 102, 0);color: rgb(97, 69, 0);font-family: -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, Helvetica, Arial, sans-serif, &quot;Apple Color Emoji&quot;, &quot;Segoe UI Emoji&quot;;white-space: normal;background-color: rgb(255, 255, 255);\">\u6570\u636e\u6e90\u914d\u7f6eDataSourceConfiguration<\/h3>\n<p><span style=\"background-color: rgb(255, 255, 255);color: rgb(36, 41, 46);font-family: -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, Helvetica, Arial, sans-serif, &quot;Apple Color Emoji&quot;, &quot;Segoe UI Emoji&quot;;font-size: 15px;text-align: start;\"><\/span><\/p>\n<p style=\"box-sizing: border-box;color: rgb(65, 44, 12);letter-spacing: 1px;font-family: -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, Helvetica, Arial, sans-serif, &quot;Apple Color Emoji&quot;, &quot;Segoe UI Emoji&quot;;font-size: 15px;text-align: start;white-space: normal;background-color: rgb(255, 255, 255);\"><code style=\"box-sizing: border-box;font-family: Menlo, Monaco, Consolas, &quot;Courier New&quot;, monospace;font-size: 0.87em;word-break: break-word;border-radius: 2px;overflow-x: auto;background-color: rgba(130, 98, 0, 0.3);padding: 0.065em 0.4em;color: rgb(153, 109, 0);\">DataSourceConfiguration<\/code>\u662f\u4e00\u4e2a\u6570\u636e\u6e90\u914d\u7f6e\u7c7b\uff0c\u6211\u4eec\u4f7f\u7528alibaba\u7684Druid\u6570\u636e\u6e90\uff0c\u4f7f\u7528<code style=\"box-sizing: border-box;font-family: Menlo, Monaco, Consolas, &quot;Courier New&quot;, monospace;font-size: 0.87em;word-break: break-word;border-radius: 2px;overflow-x: auto;background-color: rgba(130, 98, 0, 0.3);padding: 0.065em 0.4em;color: rgb(153, 109, 0);\">@Value<\/code>\u6ce8\u89e3\u6765\u83b7\u53d6yaml\u6587\u4ef6\u7684\u6570\u636e\u5e93\u914d\u7f6e\uff0c&nbsp;\u5b9a\u4e49\u4e86\u4e09\u4e2aBean\uff0c\u5e76\u4f7f\u7528<code style=\"box-sizing: border-box;font-family: Menlo, Monaco, Consolas, &quot;Courier New&quot;, monospace;font-size: 0.87em;word-break: break-word;border-radius: 2px;overflow-x: auto;background-color: rgba(130, 98, 0, 0.3);padding: 0.065em 0.4em;color: rgb(153, 109, 0);\">@Profile<\/code>\u6765\u8fdb\u884c\u5f00\u53d1\u73af\u5883\uff0c\u6d4b\u8bd5\u73af\u5883\uff0c\u751f\u4ea7\u73af\u5883\u7684\u533a\u5206\uff0c\u8fd9\u91cc\u5b83\u4f1a\u8bc6\u522b<code style=\"box-sizing: border-box;font-family: Menlo, Monaco, Consolas, &quot;Courier New&quot;, monospace;font-size: 0.87em;word-break: break-word;border-radius: 2px;overflow-x: auto;background-color: rgba(130, 98, 0, 0.3);padding: 0.065em 0.4em;color: rgb(153, 109, 0);\">application.yml<\/code>\u6587\u4ef6\u4e2d\u7684<code style=\"box-sizing: border-box;font-family: Menlo, Monaco, Consolas, &quot;Courier New&quot;, monospace;font-size: 0.87em;word-break: break-word;border-radius: 2px;overflow-x: auto;background-color: rgba(130, 98, 0, 0.3);padding: 0.065em 0.4em;color: rgb(153, 109, 0);\">spring.profiles.active<\/code><\/p>\n<pre style=\"box-sizing: border-box;font-family: Menlo, Monaco, Consolas, &quot;Courier New&quot;, monospace;font-size: 15px;overflow: auto;line-height: 1.75;background: rgb(71, 73, 73);color: rgb(209, 217, 225);text-align: start;\"><code style=\"box-sizing: border-box;font-family: Menlo, Monaco, Consolas, &quot;Courier New&quot;, monospace;font-size: 12px;word-break: normal;border-radius: 2px;overflow-x: auto;background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;padding: 15px 12px;display: block;\"><span style=\"box-sizing: border-box;color: rgb(204, 153, 204);\">package<\/span> com.steakliu.druiddatasource.datasource;<br  \/><br  \/><span style=\"box-sizing: border-box;color: rgb(204, 153, 204);\">import<\/span> com.alibaba.druid.pool.DruidDataSource;<br  \/><span style=\"box-sizing: border-box;color: rgb(204, 153, 204);\">import<\/span> org.springframework.beans.factory.annotation.Value;<br  \/><span style=\"box-sizing: border-box;color: rgb(204, 153, 204);\">import<\/span> org.springframework.context.annotation.Bean;<br  \/><span style=\"box-sizing: border-box;color: rgb(204, 153, 204);\">import<\/span> org.springframework.context.annotation.Configuration;<br  \/><span style=\"box-sizing: border-box;color: rgb(204, 153, 204);\">import<\/span> org.springframework.context.annotation.Profile;<br  \/><br  \/><span style=\"box-sizing: border-box;color: rgb(204, 153, 204);\">import<\/span> javax.sql.DataSource;<br  \/><br  \/><span style=\"box-sizing: border-box;color: rgb(249, 145, 87);\">@Configuration<\/span><br  \/><span style=\"box-sizing: border-box;color: rgb(204, 153, 204);\">public<\/span> <span style=\"box-sizing: border-box;\"><span style=\"box-sizing: border-box;color: rgb(204, 153, 204);\">class<\/span> <span style=\"box-sizing: border-box;color: rgb(255, 204, 102);\">DataSourceConfiguration<\/span> <\/span>{<br  \/><br  \/>    <span style=\"box-sizing: border-box;color: rgb(249, 145, 87);\">@Value(\"${spring.datasource.druid.username}\")<\/span><br  \/>    <span style=\"box-sizing: border-box;color: rgb(204, 153, 204);\">private<\/span> String username;<br  \/>    <span style=\"box-sizing: border-box;color: rgb(249, 145, 87);\">@Value(\"${spring.datasource.druid.password}\")<\/span><br  \/>    <span style=\"box-sizing: border-box;color: rgb(204, 153, 204);\">private<\/span> String password;<br  \/>    <span style=\"box-sizing: border-box;color: rgb(249, 145, 87);\">@Value(\"${spring.datasource.druid.url}\")<\/span><br  \/>    <span style=\"box-sizing: border-box;color: rgb(204, 153, 204);\">private<\/span> String url;<br  \/>    <span style=\"box-sizing: border-box;color: rgb(249, 145, 87);\">@Value(\"${spring.datasource.druid.driver-class-name}\")<\/span><br  \/>    <span style=\"box-sizing: border-box;color: rgb(204, 153, 204);\">private<\/span> String driverClassName;<br  \/><br  \/>    <span style=\"box-sizing: border-box;color: rgb(249, 145, 87);\">@Profile(\"dev\")<\/span><br  \/>    <span style=\"box-sizing: border-box;color: rgb(249, 145, 87);\">@Bean<\/span><br  \/>    <span style=\"box-sizing: border-box;\"><span style=\"box-sizing: border-box;color: rgb(204, 153, 204);\">public<\/span> DataSource <span style=\"box-sizing: border-box;color: rgb(181, 189, 104);\">devDataSource<\/span><span style=\"box-sizing: border-box;\">()<\/span><\/span>{<br  \/>        DruidDataSource dataSource = <span style=\"box-sizing: border-box;color: rgb(204, 153, 204);\">new<\/span> DruidDataSource();<br  \/>        dataSource.setUsername(username);<br  \/>        dataSource.setPassword(password);<br  \/>        dataSource.setUrl(url);<br  \/>        dataSource.setDriverClassName(driverClassName);<br  \/>        <span style=\"box-sizing: border-box;color: rgb(204, 153, 204);\">return<\/span> dataSource;<br  \/>    }<br  \/><br  \/>    <span style=\"box-sizing: border-box;color: rgb(249, 145, 87);\">@Profile(\"test\")<\/span><br  \/>    <span style=\"box-sizing: border-box;color: rgb(249, 145, 87);\">@Bean<\/span><br  \/>    <span style=\"box-sizing: border-box;\"><span style=\"box-sizing: border-box;color: rgb(204, 153, 204);\">public<\/span> DataSource <span style=\"box-sizing: border-box;color: rgb(181, 189, 104);\">testDataSource<\/span><span style=\"box-sizing: border-box;\">()<\/span><\/span>{<br  \/>        DruidDataSource dataSource = <span style=\"box-sizing: border-box;color: rgb(204, 153, 204);\">new<\/span> DruidDataSource();<br  \/>        dataSource.setUsername(username);<br  \/>        dataSource.setPassword(password);<br  \/>        dataSource.setUrl(url);<br  \/>        dataSource.setDriverClassName(driverClassName);<br  \/>        <span style=\"box-sizing: border-box;color: rgb(204, 153, 204);\">return<\/span> dataSource;<br  \/>    }<br  \/><br  \/>    <span style=\"box-sizing: border-box;color: rgb(249, 145, 87);\">@Profile(\"prod\")<\/span><br  \/>    <span style=\"box-sizing: border-box;color: rgb(249, 145, 87);\">@Bean<\/span><br  \/>    <span style=\"box-sizing: border-box;\"><span style=\"box-sizing: border-box;color: rgb(204, 153, 204);\">public<\/span> DataSource <span style=\"box-sizing: border-box;color: rgb(181, 189, 104);\">prodDataSource<\/span><span style=\"box-sizing: border-box;\">()<\/span><\/span>{<br  \/>        DruidDataSource dataSource = <span style=\"box-sizing: border-box;color: rgb(204, 153, 204);\">new<\/span> DruidDataSource();<br  \/>        dataSource.setUsername(username);<br  \/>        dataSource.setPassword(password);<br  \/>        dataSource.setUrl(url);<br  \/>        dataSource.setDriverClassName(driverClassName);<br  \/>        <span style=\"box-sizing: border-box;color: rgb(204, 153, 204);\">return<\/span> dataSource;<br  \/>    }<br  \/>}<br  \/><\/code><\/pre>\n<h3 style=\"box-sizing: border-box;line-height: 1.5;margin-top: 20px;margin-right: 10px;width: 623.781px;text-align: left;font-size: 18px;font-weight: 700;display: inline-block;padding-left: 10px;border-left: 5px solid rgb(143, 102, 0);color: rgb(97, 69, 0);font-family: -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, Helvetica, Arial, sans-serif, &quot;Apple Color Emoji&quot;, &quot;Segoe UI Emoji&quot;;white-space: normal;background-color: rgb(255, 255, 255);\">DataSourceController\u6d4b\u8bd5Controller<\/h3>\n<p><span style=\"color: rgb(36, 41, 46);font-family: -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, Helvetica, Arial, sans-serif, &quot;Apple Color Emoji&quot;, &quot;Segoe UI Emoji&quot;;font-size: 15px;text-align: start;background-color: rgb(255, 255, 255);\"><\/span><\/p>\n<p style=\"box-sizing: border-box;color: rgb(65, 44, 12);letter-spacing: 1px;font-family: -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, Helvetica, Arial, sans-serif, &quot;Apple Color Emoji&quot;, &quot;Segoe UI Emoji&quot;;font-size: 15px;text-align: start;white-space: normal;background-color: rgb(255, 255, 255);\">\u521b\u5efa\u4e00\u4e2aController\u6765\u6d4b\u8bd5\u83b7\u53d6\u6570\u636e\uff0c\u8fd9\u91cc\u4f7f\u7528<code style=\"box-sizing: border-box;font-family: Menlo, Monaco, Consolas, &quot;Courier New&quot;, monospace;font-size: 0.87em;word-break: break-word;border-radius: 2px;overflow-x: auto;background-color: rgba(130, 98, 0, 0.3);padding: 0.065em 0.4em;color: rgb(153, 109, 0);\">JdbcTemplate<\/code>\u6765\u83b7\u53d6\u6570\u636e<\/p>\n<p style=\"box-sizing: border-box;color: rgb(65, 44, 12);letter-spacing: 1px;font-family: -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, Helvetica, Arial, sans-serif, &quot;Apple Color Emoji&quot;, &quot;Segoe UI Emoji&quot;;font-size: 15px;text-align: start;white-space: normal;background-color: rgb(255, 255, 255);\"><br  \/><\/p>\n<pre style=\"box-sizing: border-box;font-family: Menlo, Monaco, Consolas, &quot;Courier New&quot;, monospace;font-size: 15px;overflow: auto;line-height: 1.75;background: rgb(71, 73, 73);color: rgb(209, 217, 225);text-align: start;\"><code style=\"box-sizing: border-box;font-family: Menlo, Monaco, Consolas, &quot;Courier New&quot;, monospace;font-size: 12px;word-break: normal;border-radius: 2px;overflow-x: auto;background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;padding: 15px 12px;display: block;\"><span style=\"box-sizing: border-box;color: rgb(204, 153, 204);\">package<\/span> com.steakliu.druiddatasource.controller;<br  \/><br  \/><span style=\"box-sizing: border-box;color: rgb(204, 153, 204);\">import<\/span> org.springframework.beans.factory.annotation.Autowired;<br  \/><span style=\"box-sizing: border-box;color: rgb(204, 153, 204);\">import<\/span> org.springframework.jdbc.core.JdbcTemplate;<br  \/><span style=\"box-sizing: border-box;color: rgb(204, 153, 204);\">import<\/span> org.springframework.web.bind.annotation.GetMapping;<br  \/><span style=\"box-sizing: border-box;color: rgb(204, 153, 204);\">import<\/span> org.springframework.web.bind.annotation.RestController;<br  \/><span style=\"box-sizing: border-box;color: rgb(204, 153, 204);\">import<\/span> java.util.List;<br  \/><span style=\"box-sizing: border-box;color: rgb(204, 153, 204);\">import<\/span> java.util.Map;<br  \/><br  \/><span style=\"box-sizing: border-box;color: rgb(249, 145, 87);\">@RestController<\/span><br  \/><span style=\"box-sizing: border-box;color: rgb(204, 153, 204);\">public<\/span> <span style=\"box-sizing: border-box;\"><span style=\"box-sizing: border-box;color: rgb(204, 153, 204);\">class<\/span> <span style=\"box-sizing: border-box;color: rgb(255, 204, 102);\">DataSourceController<\/span> <\/span>{<br  \/><br  \/>    <span style=\"box-sizing: border-box;color: rgb(249, 145, 87);\">@Autowired<\/span><br  \/>    <span style=\"box-sizing: border-box;color: rgb(204, 153, 204);\">private<\/span> JdbcTemplate jdbcTemplate;<br  \/><br  \/>    <span style=\"box-sizing: border-box;color: rgb(249, 145, 87);\">@GetMapping(\"datasource\")<\/span><br  \/>    <span style=\"box-sizing: border-box;color: rgb(204, 153, 204);\">public<\/span> List&lt;Map&lt;String, Object&gt;&gt; datasource(){<br  \/>        List&lt;Map&lt;String, Object&gt;&gt; maps = jdbcTemplate.queryForList(<span style=\"box-sizing: border-box;color: rgb(138, 190, 183);\">\"SELECT * FROM sys_env\"<\/span>);<br  \/>        <span style=\"box-sizing: border-box;color: rgb(204, 153, 204);\">return<\/span> maps;<br  \/>    }<br  \/>}<br  \/><\/code><\/pre>\n<h2 style=\"box-sizing: border-box;line-height: 1.5;margin-bottom: 10px;padding-left: 20px;font-size: 20px;font-weight: 700;color: rgb(97, 69, 0);font-family: -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, Helvetica, Arial, sans-serif, &quot;Apple Color Emoji&quot;, &quot;Segoe UI Emoji&quot;;text-align: start;white-space: normal;background-color: rgb(255, 255, 255);\"><br  \/><\/h2>\n<h2 style=\"box-sizing: border-box;line-height: 1.5;margin-bottom: 10px;padding-left: 20px;font-size: 20px;font-weight: 700;color: rgb(97, 69, 0);font-family: -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, Helvetica, Arial, sans-serif, &quot;Apple Color Emoji&quot;, &quot;Segoe UI Emoji&quot;;text-align: center;white-space: normal;background-color: rgb(255, 255, 255);\">\u4f7f\u7528Postman\u8fdb\u884c\u6d4b\u8bd5<\/h2>\n<h4 style=\"box-sizing: border-box;line-height: 1.5;margin-bottom: 10px;padding-bottom: 5px;font-weight: 700;color: rgb(163, 116, 0);font-size: 17px;font-family: -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, Helvetica, Arial, sans-serif, &quot;Apple Color Emoji&quot;, &quot;Segoe UI Emoji&quot;;text-align: start;white-space: normal;background-color: rgb(255, 255, 255);\">spring.profiles.active = dev<\/h4>\n<pre style=\"box-sizing: border-box;font-family: Menlo, Monaco, Consolas, &quot;Courier New&quot;, monospace;font-size: 15px;overflow: auto;line-height: 1.75;background: rgb(71, 73, 73);color: rgb(209, 217, 225);text-align: start;\"><code style=\"box-sizing: border-box;font-family: Menlo, Monaco, Consolas, &quot;Courier New&quot;, monospace;font-size: 12px;word-break: normal;border-radius: 2px;overflow-x: auto;background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;padding: 15px 12px;display: block;\"><span style=\"box-sizing: border-box;color: rgb(129, 162, 190);\">spring:<\/span><br  \/>  <span style=\"box-sizing: border-box;color: rgb(129, 162, 190);\">profiles:<\/span><br  \/>    <span style=\"box-sizing: border-box;color: rgb(129, 162, 190);\">active:<\/span> <span style=\"box-sizing: border-box;color: rgb(138, 190, 183);\">dev<\/span><br  \/><\/code><\/pre>\n<p style=\"box-sizing: border-box;color: rgb(65, 44, 12);letter-spacing: 1px;font-family: -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, Helvetica, Arial, sans-serif, &quot;Apple Color Emoji&quot;, &quot;Segoe UI Emoji&quot;;font-size: 15px;text-align: start;white-space: normal;background-color: rgb(255, 255, 255);\"><img decoding=\"async\" class=\"rich_pages wxw-img lazyload\" data-ratio=\"0.42303552206673845\"  data-type=\"png\" data-w=\"929\" style=\"box-sizing: border-box;border-style: none;display: block;margin: auto;\" data-src=\"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2023\/05\/20230528015706360.png\" src=\"https:\/\/s.nmxc.ltd\/sakurairo_vision\/@2.6\/load_svg\/inload.svg\" onerror=\"imgError(this)\"  \/><noscript><img decoding=\"async\" class=\"rich_pages wxw-img\" data-ratio=\"0.42303552206673845\"  data-type=\"png\" data-w=\"929\" style=\"box-sizing: border-box;border-style: none;display: block;margin: auto;\" src=\"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2023\/05\/20230528015706360.png\"  \/><\/noscript><\/p>\n<h4 style=\"box-sizing: border-box;line-height: 1.5;margin-bottom: 10px;padding-bottom: 5px;font-weight: 700;color: rgb(163, 116, 0);font-size: 17px;font-family: -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, Helvetica, Arial, sans-serif, &quot;Apple Color Emoji&quot;, &quot;Segoe UI Emoji&quot;;text-align: start;white-space: normal;background-color: rgb(255, 255, 255);\">spring.profiles.active = test<\/h4>\n<pre style=\"box-sizing: border-box;font-family: Menlo, Monaco, Consolas, &quot;Courier New&quot;, monospace;font-size: 15px;overflow: auto;line-height: 1.75;background: rgb(71, 73, 73);color: rgb(209, 217, 225);text-align: start;\"><code style=\"box-sizing: border-box;font-family: Menlo, Monaco, Consolas, &quot;Courier New&quot;, monospace;font-size: 12px;word-break: normal;border-radius: 2px;overflow-x: auto;background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;padding: 15px 12px;display: block;\"><span style=\"box-sizing: border-box;color: rgb(129, 162, 190);\">spring:<\/span><br  \/>  <span style=\"box-sizing: border-box;color: rgb(129, 162, 190);\">profiles:<\/span><br  \/>    <span style=\"box-sizing: border-box;color: rgb(129, 162, 190);\">active:<\/span> <span style=\"box-sizing: border-box;color: rgb(138, 190, 183);\">test<\/span><br  \/><\/code><\/pre>\n<p style=\"box-sizing: border-box;color: rgb(65, 44, 12);letter-spacing: 1px;font-family: -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, Helvetica, Arial, sans-serif, &quot;Apple Color Emoji&quot;, &quot;Segoe UI Emoji&quot;;font-size: 15px;text-align: start;white-space: normal;background-color: rgb(255, 255, 255);\"><img decoding=\"async\" class=\"rich_pages wxw-img lazyload\" data-ratio=\"0.42990654205607476\"  data-type=\"png\" data-w=\"856\" style=\"box-sizing: border-box;border-style: none;display: block;margin: auto;\" data-src=\"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2023\/05\/20230528015707520.png\" src=\"https:\/\/s.nmxc.ltd\/sakurairo_vision\/@2.6\/load_svg\/inload.svg\" onerror=\"imgError(this)\"  \/><noscript><img decoding=\"async\" class=\"rich_pages wxw-img\" data-ratio=\"0.42990654205607476\"  data-type=\"png\" data-w=\"856\" style=\"box-sizing: border-box;border-style: none;display: block;margin: auto;\" src=\"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2023\/05\/20230528015707520.png\"  \/><\/noscript><\/p>\n<h4 style=\"box-sizing: border-box;line-height: 1.5;margin-bottom: 10px;padding-bottom: 5px;font-weight: 700;color: rgb(163, 116, 0);font-size: 17px;font-family: -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, Helvetica, Arial, sans-serif, &quot;Apple Color Emoji&quot;, &quot;Segoe UI Emoji&quot;;text-align: start;white-space: normal;background-color: rgb(255, 255, 255);\">spring.profiles.active = prod<\/h4>\n<pre style=\"box-sizing: border-box;font-family: Menlo, Monaco, Consolas, &quot;Courier New&quot;, monospace;font-size: 15px;overflow: auto;line-height: 1.75;background: rgb(71, 73, 73);color: rgb(209, 217, 225);text-align: start;\"><code style=\"box-sizing: border-box;font-family: Menlo, Monaco, Consolas, &quot;Courier New&quot;, monospace;font-size: 12px;word-break: normal;border-radius: 2px;overflow-x: auto;background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;padding: 15px 12px;display: block;\"><span style=\"box-sizing: border-box;color: rgb(129, 162, 190);\">spring:<\/span><br  \/>  <span style=\"box-sizing: border-box;color: rgb(129, 162, 190);\">profiles:<\/span><br  \/>    <span style=\"box-sizing: border-box;color: rgb(129, 162, 190);\">active:<\/span> <span style=\"box-sizing: border-box;color: rgb(138, 190, 183);\">test<\/span><br  \/><\/code><\/pre>\n<p style=\"box-sizing: border-box;color: rgb(65, 44, 12);letter-spacing: 1px;font-family: -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, Helvetica, Arial, sans-serif, &quot;Apple Color Emoji&quot;, &quot;Segoe UI Emoji&quot;;font-size: 15px;text-align: start;white-space: normal;background-color: rgb(255, 255, 255);\"><img decoding=\"async\" class=\"rich_pages wxw-img lazyload\" data-ratio=\"0.40425531914893614\"  data-type=\"png\" data-w=\"940\" style=\"box-sizing: border-box;border-style: none;display: block;margin: auto;\" data-src=\"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2023\/05\/20230528015708461.png\" src=\"https:\/\/s.nmxc.ltd\/sakurairo_vision\/@2.6\/load_svg\/inload.svg\" onerror=\"imgError(this)\"  \/><noscript><img decoding=\"async\" class=\"rich_pages wxw-img\" data-ratio=\"0.40425531914893614\"  data-type=\"png\" data-w=\"940\" style=\"box-sizing: border-box;border-style: none;display: block;margin: auto;\" src=\"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2023\/05\/20230528015708461.png\"  \/><\/noscript><\/p>\n<p style=\"box-sizing: border-box;color: rgb(65, 44, 12);letter-spacing: 1px;font-family: -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, Helvetica, Arial, sans-serif, &quot;Apple Color Emoji&quot;, &quot;Segoe UI Emoji&quot;;font-size: 15px;text-align: start;white-space: normal;background-color: rgb(255, 255, 255);\"><br  \/><\/p>\n<p style=\"box-sizing: border-box;color: rgb(65, 44, 12);letter-spacing: 1px;font-family: -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, Helvetica, Arial, sans-serif, &quot;Apple Color Emoji&quot;, &quot;Segoe UI Emoji&quot;;font-size: 15px;text-align: start;white-space: normal;background-color: rgb(255, 255, 255);\">\u5230\u8fd9\u91cc\u6211\u4eec\u5b8c\u6210\u4e86\u5f00\u53d1\u73af\u5883\uff0c\u6d4b\u8bd5\u73af\u5883\uff0c\u751f\u4ea7\u73af\u5883\u7684\u5207\u6362\uff0c\u5176\u6838\u5fc3\u5c31\u662f<code style=\"box-sizing: border-box;font-family: Menlo, Monaco, Consolas, &quot;Courier New&quot;, monospace;font-size: 0.87em;word-break: break-word;border-radius: 2px;overflow-x: auto;background-color: rgba(130, 98, 0, 0.3);padding: 0.065em 0.4em;color: rgb(153, 109, 0);\">spring.profiles.active<\/code>\u548c<code style=\"box-sizing: border-box;font-family: Menlo, Monaco, Consolas, &quot;Courier New&quot;, monospace;font-size: 0.87em;word-break: break-word;border-radius: 2px;overflow-x: auto;background-color: rgba(130, 98, 0, 0.3);padding: 0.065em 0.4em;color: rgb(153, 109, 0);\">@Profile<\/code>\u6ce8\u89e3\uff0c\u90a3\u4e48\u8fd9\u65f6\u5019\u4f60\u53ef\u80fd\u4f1a\u89c9\u5f97\uff0c\u6bcf\u6b21\u6253\u5305\u53d1\u5e03\u524d\u90fd\u9700\u8981&nbsp;\u53bbapplication.yml\u914d\u7f6e\u6587\u4ef6\u4e2d\u4fee\u6539<code style=\"box-sizing: border-box;font-family: Menlo, Monaco, Consolas, &quot;Courier New&quot;, monospace;font-size: 0.87em;word-break: break-word;border-radius: 2px;overflow-x: auto;background-color: rgba(130, 98, 0, 0.3);padding: 0.065em 0.4em;color: rgb(153, 109, 0);\">spring.profiles.active<\/code>\uff0c\u662f\u4e0d\u662f\u6709\u70b9\u9ebb\u70e6\uff0c\u6ca1\u9519\uff0c\u786e\u5b9e\u4f1a\u6709\u70b9\u9ebb\u70e6\uff0c\u90a3\u4e48\u6211\u4eec\u4e0b\u9762\u5bf9\u5176\u6539\u9020\uff0c\u4f7f\u7528Maven\u7684<code style=\"box-sizing: border-box;font-family: Menlo, Monaco, Consolas, &quot;Courier New&quot;, monospace;font-size: 0.87em;word-break: break-word;border-radius: 2px;overflow-x: auto;background-color: rgba(130, 98, 0, 0.3);padding: 0.065em 0.4em;color: rgb(153, 109, 0);\">profile<\/code>&nbsp;\u6765\u6539\u9020\uff0c\u5b9e\u73b0<code style=\"box-sizing: border-box;font-family: Menlo, Monaco, Consolas, &quot;Courier New&quot;, monospace;font-size: 0.87em;word-break: break-word;border-radius: 2px;overflow-x: auto;background-color: rgba(130, 98, 0, 0.3);padding: 0.065em 0.4em;color: rgb(153, 109, 0);\">\u52fe\u9009\u5f0f<\/code>\u7684\u914d\u7f6e\u3002<\/p>\n<h2 style=\"box-sizing: border-box;line-height: 1.5;margin-bottom: 10px;padding-left: 20px;font-size: 20px;font-weight: 700;color: rgb(97, 69, 0);font-family: -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, Helvetica, Arial, sans-serif, &quot;Apple Color Emoji&quot;, &quot;Segoe UI Emoji&quot;;text-align: start;white-space: normal;background-color: rgb(255, 255, 255);\"><br  \/><\/h2>\n<h2 style=\"box-sizing: border-box;line-height: 1.5;margin-bottom: 10px;padding-left: 20px;font-size: 20px;font-weight: 700;color: rgb(97, 69, 0);font-family: -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, Helvetica, Arial, sans-serif, &quot;Apple Color Emoji&quot;, &quot;Segoe UI Emoji&quot;;text-align: center;white-space: normal;background-color: rgb(255, 255, 255);\">\u4f7f\u7528Maven\u914d\u7f6e<\/h2>\n<p style=\"box-sizing: border-box;color: rgb(65, 44, 12);letter-spacing: 1px;font-family: -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, Helvetica, Arial, sans-serif, &quot;Apple Color Emoji&quot;, &quot;Segoe UI Emoji&quot;;font-size: 15px;text-align: start;white-space: normal;background-color: rgb(255, 255, 255);\">\u6211\u4eec\u5728maven\u4e2d\u5bf9dev\uff0ctest\uff0cprod\u8fdb\u884c\u5b9a\u4e49\uff0c\u5982\u4e0b\uff0c\u4f7f\u7528<code style=\"box-sizing: border-box;font-family: Menlo, Monaco, Consolas, &quot;Courier New&quot;, monospace;font-size: 0.87em;word-break: break-word;border-radius: 2px;overflow-x: auto;background-color: rgba(130, 98, 0, 0.3);padding: 0.065em 0.4em;color: rgb(153, 109, 0);\">&lt;profiles&gt;<\/code>\u6807\u7b7e\u8fdb\u884c\u5305\u88f9\uff0c\u4f7f\u7528<code style=\"box-sizing: border-box;font-family: Menlo, Monaco, Consolas, &quot;Courier New&quot;, monospace;font-size: 0.87em;word-break: break-word;border-radius: 2px;overflow-x: auto;background-color: rgba(130, 98, 0, 0.3);padding: 0.065em 0.4em;color: rgb(153, 109, 0);\">&lt;activeByDefault&gt;<\/code>\u6807\u7b7e\u5c06<code style=\"box-sizing: border-box;font-family: Menlo, Monaco, Consolas, &quot;Courier New&quot;, monospace;font-size: 0.87em;word-break: break-word;border-radius: 2px;overflow-x: auto;background-color: rgba(130, 98, 0, 0.3);padding: 0.065em 0.4em;color: rgb(153, 109, 0);\">dev<\/code>\u4f5c\u4e3a\u9ed8\u8ba4\u7684\u73af\u5883\uff0c&nbsp;\u5728<code style=\"box-sizing: border-box;font-family: Menlo, Monaco, Consolas, &quot;Courier New&quot;, monospace;font-size: 0.87em;word-break: break-word;border-radius: 2px;overflow-x: auto;background-color: rgba(130, 98, 0, 0.3);padding: 0.065em 0.4em;color: rgb(153, 109, 0);\">&lt;properties&gt;<\/code>\u4e2d\u5b9a\u4e49\u73af\u5883\u6807\u8bc6(dev,test,prod)\uff0c<code style=\"box-sizing: border-box;font-family: Menlo, Monaco, Consolas, &quot;Courier New&quot;, monospace;font-size: 0.87em;word-break: break-word;border-radius: 2px;overflow-x: auto;background-color: rgba(130, 98, 0, 0.3);padding: 0.065em 0.4em;color: rgb(153, 109, 0);\">&lt;mvn.profile&gt;<\/code>\u662f\u81ea\u5b9a\u4e49\u7684\uff0c\u53ef\u4ee5\u4efb\u610f\u5b9a\u4e49\uff0c\u5b83\u548c<code style=\"box-sizing: border-box;font-family: Menlo, Monaco, Consolas, &quot;Courier New&quot;, monospace;font-size: 0.87em;word-break: break-word;border-radius: 2px;overflow-x: auto;background-color: rgba(130, 98, 0, 0.3);padding: 0.065em 0.4em;color: rgb(153, 109, 0);\">application.yml<\/code>&nbsp;\u90a3\u8fb9\u8fdb\u884c\u5bf9\u5e94\u3002<\/p>\n<p style=\"box-sizing: border-box;color: rgb(65, 44, 12);letter-spacing: 1px;font-family: -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, Helvetica, Arial, sans-serif, &quot;Apple Color Emoji&quot;, &quot;Segoe UI Emoji&quot;;font-size: 15px;text-align: start;white-space: normal;background-color: rgb(255, 255, 255);\"><br  \/><\/p>\n<h4 style=\"box-sizing: border-box;line-height: 1.5;margin-bottom: 10px;padding-bottom: 5px;font-weight: 700;color: rgb(163, 116, 0);font-size: 17px;font-family: -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, Helvetica, Arial, sans-serif, &quot;Apple Color Emoji&quot;, &quot;Segoe UI Emoji&quot;;text-align: start;white-space: normal;background-color: rgb(255, 255, 255);\">pom.xml<\/h4>\n<pre style=\"box-sizing: border-box;font-family: Menlo, Monaco, Consolas, &quot;Courier New&quot;, monospace;font-size: 15px;overflow: auto;line-height: 1.75;background: rgb(71, 73, 73);color: rgb(209, 217, 225);text-align: start;\"><code style=\"box-sizing: border-box;font-family: Menlo, Monaco, Consolas, &quot;Courier New&quot;, monospace;font-size: 12px;word-break: normal;border-radius: 2px;overflow-x: auto;background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;padding: 15px 12px;display: block;\">&lt;profiles&gt;<br  \/>        &lt;profile&gt;<br  \/>            &lt;id&gt;dev&lt;\/id&gt;<br  \/>            &lt;activation&gt;<br  \/>                &lt;activeByDefault&gt;<span style=\"box-sizing: border-box;color: rgb(204, 153, 204);\">true<\/span>&lt;\/activeByDefault&gt;<br  \/>            &lt;\/activation&gt;<br  \/>            &lt;properties&gt;<br  \/>                &lt;mvn.profile&gt;dev&lt;\/mvn.profile&gt;<br  \/>            &lt;\/properties&gt;<br  \/>        &lt;\/profile&gt;<br  \/>        &lt;profile&gt;<br  \/>            &lt;id&gt;test&lt;\/id&gt;<br  \/>            &lt;properties&gt;<br  \/>                &lt;mvn.profile&gt;test&lt;\/mvn.profile&gt;<br  \/>            &lt;\/properties&gt;<br  \/>        &lt;\/profile&gt;<br  \/>        &lt;profile&gt;<br  \/>            &lt;id&gt;prod&lt;\/id&gt;<br  \/>            &lt;properties&gt;<br  \/>                &lt;mvn.profile&gt;prod&lt;\/mvn.profile&gt;<br  \/>            &lt;\/properties&gt;<br  \/>        &lt;\/profile&gt;<br  \/>    &lt;\/profiles&gt;<br  \/><\/code><\/pre>\n<h3 style=\"box-sizing: border-box;line-height: 1.5;margin-top: 20px;margin-right: 10px;width: 623.781px;text-align: left;font-size: 18px;font-weight: 700;display: inline-block;padding-left: 10px;border-left: 5px solid rgb(143, 102, 0);color: rgb(97, 69, 0);font-family: -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, Helvetica, Arial, sans-serif, &quot;Apple Color Emoji&quot;, &quot;Segoe UI Emoji&quot;;white-space: normal;background-color: rgb(255, 255, 255);\">application.yml<\/h3>\n<p><span style=\"color: rgb(36, 41, 46);font-family: -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, Helvetica, Arial, sans-serif, &quot;Apple Color Emoji&quot;, &quot;Segoe UI Emoji&quot;;font-size: 15px;text-align: start;background-color: rgb(255, 255, 255);\"><\/span><\/p>\n<p style=\"box-sizing: border-box;color: rgb(65, 44, 12);letter-spacing: 1px;font-family: -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, Helvetica, Arial, sans-serif, &quot;Apple Color Emoji&quot;, &quot;Segoe UI Emoji&quot;;font-size: 15px;text-align: start;white-space: normal;background-color: rgb(255, 255, 255);\">application.yml\u91cc\u9762\u4f7f\u7528<code style=\"box-sizing: border-box;font-family: Menlo, Monaco, Consolas, &quot;Courier New&quot;, monospace;font-size: 0.87em;word-break: break-word;border-radius: 2px;overflow-x: auto;background-color: rgba(130, 98, 0, 0.3);padding: 0.065em 0.4em;color: rgb(153, 109, 0);\">@mvn.profile@<\/code>\u8fd9\u79cd\u65b9\u5f0f\u6765\u8bfb\u53d6pom.xml\u4e2d\u7684\u914d\u7f6e\u3002<\/p>\n<p style=\"box-sizing: border-box;color: rgb(65, 44, 12);letter-spacing: 1px;font-family: -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, Helvetica, Arial, sans-serif, &quot;Apple Color Emoji&quot;, &quot;Segoe UI Emoji&quot;;font-size: 15px;text-align: start;white-space: normal;background-color: rgb(255, 255, 255);\"><br  \/><\/p>\n<pre style=\"box-sizing: border-box;font-family: Menlo, Monaco, Consolas, &quot;Courier New&quot;, monospace;font-size: 15px;overflow: auto;line-height: 1.75;background: rgb(71, 73, 73);color: rgb(209, 217, 225);text-align: start;\"><code style=\"box-sizing: border-box;font-family: Menlo, Monaco, Consolas, &quot;Courier New&quot;, monospace;font-size: 12px;word-break: normal;border-radius: 2px;overflow-x: auto;background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;padding: 15px 12px;display: block;\"><span style=\"box-sizing: border-box;color: rgb(129, 162, 190);\">spring:<\/span><br  \/>  <span style=\"box-sizing: border-box;color: rgb(129, 162, 190);\">profiles:<\/span><br  \/>    <span style=\"box-sizing: border-box;color: rgb(129, 162, 190);\">active:<\/span> <span style=\"box-sizing: border-box;color: rgb(138, 190, 183);\">@mvn.profile@<\/span><br  \/><\/code><\/pre>\n<p style=\"box-sizing: border-box;color: rgb(65, 44, 12);letter-spacing: 1px;font-family: -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, Helvetica, Arial, sans-serif, &quot;Apple Color Emoji&quot;, &quot;Segoe UI Emoji&quot;;font-size: 15px;text-align: start;white-space: normal;background-color: rgb(255, 255, 255);\"><br  \/><\/p>\n<p style=\"box-sizing: border-box;color: rgb(65, 44, 12);letter-spacing: 1px;font-family: -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, Helvetica, Arial, sans-serif, &quot;Apple Color Emoji&quot;, &quot;Segoe UI Emoji&quot;;font-size: 15px;text-align: start;white-space: normal;background-color: rgb(255, 255, 255);\">\u5b9a\u4e49\u597d\u4e0a\u9762\u7684<code style=\"box-sizing: border-box;font-family: Menlo, Monaco, Consolas, &quot;Courier New&quot;, monospace;font-size: 0.87em;word-break: break-word;border-radius: 2px;overflow-x: auto;background-color: rgba(130, 98, 0, 0.3);padding: 0.065em 0.4em;color: rgb(153, 109, 0);\">pom.xml<\/code>\u548c<code style=\"box-sizing: border-box;font-family: Menlo, Monaco, Consolas, &quot;Courier New&quot;, monospace;font-size: 0.87em;word-break: break-word;border-radius: 2px;overflow-x: auto;background-color: rgba(130, 98, 0, 0.3);padding: 0.065em 0.4em;color: rgb(153, 109, 0);\">application.yml<\/code>\u540e\uff0c\u4f1a\u5728\u6211\u4eecIDEA\u7f16\u8bd1\u5668\u53f3\u4fa7\u7684Maven\u680f\u4e0b\u51fa\u73b0<code style=\"box-sizing: border-box;font-family: Menlo, Monaco, Consolas, &quot;Courier New&quot;, monospace;font-size: 0.87em;word-break: break-word;border-radius: 2px;overflow-x: auto;background-color: rgba(130, 98, 0, 0.3);padding: 0.065em 0.4em;color: rgb(153, 109, 0);\">Profiles<\/code>\uff0c\u5c31\u53ef\u4ee5&nbsp;\u8fdb\u884c\u9009\u62e9\u4e86\uff0c\u6240\u5b9e\u73b0\u7684\u6548\u679c\u548c\u76f4\u63a5\u5728<code style=\"box-sizing: border-box;font-family: Menlo, Monaco, Consolas, &quot;Courier New&quot;, monospace;font-size: 0.87em;word-break: break-word;border-radius: 2px;overflow-x: auto;background-color: rgba(130, 98, 0, 0.3);padding: 0.065em 0.4em;color: rgb(153, 109, 0);\">applicaiton.yml<\/code>\u4e2d\u4fee\u6539\u662f\u4e00\u6837\u7684\u3002&nbsp;<\/p>\n<p style=\"box-sizing: border-box;color: rgb(65, 44, 12);letter-spacing: 1px;font-family: -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, Helvetica, Arial, sans-serif, &quot;Apple Color Emoji&quot;, &quot;Segoe UI Emoji&quot;;font-size: 15px;text-align: start;white-space: normal;background-color: rgb(255, 255, 255);\"><br  \/><\/p>\n<p style=\"box-sizing: border-box;color: rgb(65, 44, 12);letter-spacing: 1px;font-family: -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, Helvetica, Arial, sans-serif, &quot;Apple Color Emoji&quot;, &quot;Segoe UI Emoji&quot;;font-size: 15px;text-align: start;white-space: normal;background-color: rgb(255, 255, 255);\"><img decoding=\"async\" class=\"rich_pages wxw-img lazyload\" data-ratio=\"0.22082018927444794\"  data-type=\"png\" data-w=\"634\" style=\"box-sizing: border-box;border-style: none;display: block;margin: auto;\" data-src=\"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2023\/05\/20230528015709370.png\" src=\"https:\/\/s.nmxc.ltd\/sakurairo_vision\/@2.6\/load_svg\/inload.svg\" onerror=\"imgError(this)\"  \/><noscript><img decoding=\"async\" class=\"rich_pages wxw-img\" data-ratio=\"0.22082018927444794\"  data-type=\"png\" data-w=\"634\" style=\"box-sizing: border-box;border-style: none;display: block;margin: auto;\" src=\"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2023\/05\/20230528015709370.png\"  \/><\/noscript><\/p>\n<p style=\"box-sizing: border-box;color: rgb(65, 44, 12);letter-spacing: 1px;font-family: -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, Helvetica, Arial, sans-serif, &quot;Apple Color Emoji&quot;, &quot;Segoe UI Emoji&quot;;font-size: 15px;text-align: start;white-space: normal;background-color: rgb(255, 255, 255);\"><br  \/><\/p>\n<p style=\"box-sizing: border-box;color: rgb(65, 44, 12);letter-spacing: 1px;font-family: -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, Helvetica, Arial, sans-serif, &quot;Apple Color Emoji&quot;, &quot;Segoe UI Emoji&quot;;font-size: 15px;text-align: start;white-space: normal;background-color: rgb(255, 255, 255);\">\u9664\u4e86\u4e0a\u9762\u7684\u8fd9\u4e24\u79cd\uff0c\u6211\u4eec\u8fd8\u53ef\u4ee5\u5728IDEA\u91cc\u9762\u8fdb\u884c\u6307\u5b9a\uff0c\u4e5f\u80fd\u8fbe\u5230\u540c\u6837\u7684\u6548\u679c\u3002<\/p>\n<p style=\"box-sizing: border-box;color: rgb(65, 44, 12);letter-spacing: 1px;font-family: -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, Helvetica, Arial, sans-serif, &quot;Apple Color Emoji&quot;, &quot;Segoe UI Emoji&quot;;font-size: 15px;text-align: start;white-space: normal;background-color: rgb(255, 255, 255);\"><br  \/><\/p>\n<p style=\"box-sizing: border-box;color: rgb(65, 44, 12);letter-spacing: 1px;font-family: -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, Helvetica, Arial, sans-serif, &quot;Apple Color Emoji&quot;, &quot;Segoe UI Emoji&quot;;font-size: 15px;text-align: start;white-space: normal;background-color: rgb(255, 255, 255);\"><img decoding=\"async\" class=\"rich_pages wxw-img lazyload\" data-ratio=\"0.602051282051282\"  data-type=\"png\" data-w=\"975\" style=\"box-sizing: border-box;border-style: none;display: block;margin: auto;\" data-src=\"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2023\/05\/20230528015710244.png\" src=\"https:\/\/s.nmxc.ltd\/sakurairo_vision\/@2.6\/load_svg\/inload.svg\" onerror=\"imgError(this)\"  \/><noscript><img decoding=\"async\" class=\"rich_pages wxw-img\" data-ratio=\"0.602051282051282\"  data-type=\"png\" data-w=\"975\" style=\"box-sizing: border-box;border-style: none;display: block;margin: auto;\" src=\"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2023\/05\/20230528015710244.png\"  \/><\/noscript><\/p>\n<h2 style=\"box-sizing: border-box;line-height: 1.5;margin-bottom: 10px;padding-left: 20px;font-size: 20px;font-weight: 700;color: rgb(97, 69, 0);font-family: -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, Helvetica, Arial, sans-serif, &quot;Apple Color Emoji&quot;, &quot;Segoe UI Emoji&quot;;text-align: start;white-space: normal;background-color: rgb(255, 255, 255);\"><br  \/><\/h2>\n<h2 style=\"box-sizing: border-box;line-height: 1.5;margin-bottom: 10px;padding-left: 20px;font-size: 20px;font-weight: 700;color: rgb(97, 69, 0);font-family: -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, Helvetica, Arial, sans-serif, &quot;Apple Color Emoji&quot;, &quot;Segoe UI Emoji&quot;;text-align: center;white-space: normal;background-color: rgb(255, 255, 255);\">\u540e\u8bb0<\/h2>\n<p style=\"box-sizing: border-box;color: rgb(65, 44, 12);letter-spacing: 1px;font-family: -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, Helvetica, Arial, sans-serif, &quot;Apple Color Emoji&quot;, &quot;Segoe UI Emoji&quot;;font-size: 15px;text-align: start;white-space: normal;background-color: rgb(255, 255, 255);\">\u5173\u4e8e\u4f7f\u7528Spring\u7684<code style=\"box-sizing: border-box;font-family: Menlo, Monaco, Consolas, &quot;Courier New&quot;, monospace;font-size: 0.87em;word-break: break-word;border-radius: 2px;overflow-x: auto;background-color: rgba(130, 98, 0, 0.3);padding: 0.065em 0.4em;color: rgb(153, 109, 0);\">@Profile<\/code>\u5b9e\u73b0\u73af\u5883\u4e4b\u95f4\u7684\u5207\u6362\u5c31\u8bf4\u5230\u8fd9\u91cc\uff0c\u914d\u7f6e\u591a\u73af\u5883\u6709\u5f88\u591a\u79cd\u65b9\u6848\uff0c\u4e3b\u8981\u662f\u770b\u90a3\u79cd\u9002\u5408\u6211\u4eec\uff0c\u4eca\u5929\u7684\u5206\u4eab\u5c31\u5230\u8fd9\u91cc\uff0c\u611f\u8c22\u4f60\u7684\u89c2\u770b\uff0c\u4e0b\u671f\u89c1\u3002<\/p>\n<p><br  \/><\/p>\n<blockquote>\n<p>\u672c\u7bc7\u6587\u7ae0\u6765\u6e90\u4e8e\u5fae\u4fe1\u516c\u4f17\u53f7:                 \u5218\u724c              <\/p>\n<\/blockquote>\n<\/div>\n","raw":"","protected":false},"excerpt":{"rendered":"<p>\u524d\u8a00 \u5728\u8fdb\u884c\u8f6f\u4ef6\u5f00\u53d1\u8fc7\u7a0b\u4e2d\uff0c\u4e00\u822c\u4f1a\u5c06\u9879\u76ee\u5206\u4e3a\u5f00\u53d1\u73af\u5883\uff0c\u6d4b\u8bd5\u73af\u5883\uff0c\u751f\u4ea7\u73af\u5883\uff0c\u5f00\u53d1\u4eba\u5458\u5728\u5f00\u53d1\u73af\u5883\u8fdb\u884c\u5f00\u53d1\uff0c\u7136\u540e\u5c06\u4ee3\u7801\u5408\u5e76\u5230\u6d4b\u8bd5\u73af\u5883\u8ba9&#038; &#8230;<\/p>\n","protected":false},"author":2,"featured_media":723,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"emotion":"","emotion_color":"","title_style":"","license":"","footnotes":""},"categories":[7],"tags":[],"class_list":["post-730","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-spring-boot"],"post_thumbnail_image":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2023\/05\/20230528015704390-150x150.jpeg","content_first_image":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2023\/05\/20230528015705802.png","post_medium_image_300":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2023\/05\/20230528015704390-300x127.jpeg","post_thumbnail_image_624":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2023\/05\/20230528015704390.jpeg","post_frist_image":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2023\/05\/20230528015705802.png","post_medium_image":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2023\/05\/20230528015704390-300x127.jpeg","post_large_image":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2023\/05\/20230528015704390.jpeg","post_full_image":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2023\/05\/20230528015704390.jpeg","post_all_images":[{"imagesurl":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2023\/05\/20230528015705802.png","id":"image0"},{"imagesurl":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2023\/05\/20230528015705802.png","id":"image1"},{"imagesurl":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2023\/05\/20230528015706360.png","id":"image2"},{"imagesurl":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2023\/05\/20230528015706360.png","id":"image3"},{"imagesurl":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2023\/05\/20230528015707520.png","id":"image4"},{"imagesurl":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2023\/05\/20230528015707520.png","id":"image5"},{"imagesurl":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2023\/05\/20230528015708461.png","id":"image6"},{"imagesurl":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2023\/05\/20230528015708461.png","id":"image7"},{"imagesurl":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2023\/05\/20230528015709370.png","id":"image8"},{"imagesurl":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2023\/05\/20230528015709370.png","id":"image9"},{"imagesurl":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2023\/05\/20230528015710244.png","id":"image10"},{"imagesurl":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2023\/05\/20230528015710244.png","id":"image11"}],"videoAdId":"","listAd":"0","listAdId":"","listAdEvery":6,"total_comments":0,"category_name":"Spring Boot","post_date":"2023-05-27","like_count":"0","praiseWord":"\u9f13\u52b1","copyright_state":"","excitationAd":"0","rewardedVideoAdId":"","detailAdId":"","detailAd":"0","enterpriseMinapp":"0","audios":[],"postImageUrl":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2023\/05\/20230519082947553.jpg","avatarurls":[],"related_posts":null,"pageviews":746,"next_post_id":535,"next_post_title":"Controller\u5c42\u4ee3\u7801\u5c31\u8be5\u8fd9\u4e48\u5199\uff0c\u7b80\u6d01\u53c8\u4f18\u96c5\uff01","previous_post_id":583,"previous_post_title":"Springboot \u52a8\u6001\u914d\u7f6e\u53ca\u4e00\u952e\u6253\u5305\u90e8\u7f72","_links":{"self":[{"href":"https:\/\/xinchewhd.com.cn\/index.php\/wp-json\/wp\/v2\/posts\/730","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/xinchewhd.com.cn\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/xinchewhd.com.cn\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/xinchewhd.com.cn\/index.php\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/xinchewhd.com.cn\/index.php\/wp-json\/wp\/v2\/comments?post=730"}],"version-history":[{"count":0,"href":"https:\/\/xinchewhd.com.cn\/index.php\/wp-json\/wp\/v2\/posts\/730\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/xinchewhd.com.cn\/index.php\/wp-json\/wp\/v2\/media\/723"}],"wp:attachment":[{"href":"https:\/\/xinchewhd.com.cn\/index.php\/wp-json\/wp\/v2\/media?parent=730"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/xinchewhd.com.cn\/index.php\/wp-json\/wp\/v2\/categories?post=730"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/xinchewhd.com.cn\/index.php\/wp-json\/wp\/v2\/tags?post=730"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}