{"id":5823,"date":"2024-08-01T22:46:29","date_gmt":"2024-08-01T14:46:29","guid":{"rendered":"https:\/\/xinchewhd.com.cn\/?p=5823"},"modified":"2024-08-01T22:46:29","modified_gmt":"2024-08-01T14:46:29","slug":"%e5%88%a9%e7%94%a8spring-boot-3-x%e4%b8%8e%e6%b6%88%e6%81%af%e4%b8%ad%e9%97%b4%e4%bb%b6rabbitmq%e5%ae%9e%e7%8e%b0%e7%81%ab%e8%bd%a6%e8%b4%ad%e7%a5%a8%e7%b3%bb%e7%bb%9f%e5%ae%9e%e6%97%b6%e7%a5%a8","status":"publish","type":"post","link":"https:\/\/xinchewhd.com.cn\/index.php\/spring-boot\/%e5%88%a9%e7%94%a8spring-boot-3-x%e4%b8%8e%e6%b6%88%e6%81%af%e4%b8%ad%e9%97%b4%e4%bb%b6rabbitmq%e5%ae%9e%e7%8e%b0%e7%81%ab%e8%bd%a6%e8%b4%ad%e7%a5%a8%e7%b3%bb%e7%bb%9f%e5%ae%9e%e6%97%b6%e7%a5%a8\/","title":{"rendered":"\u5229\u7528Spring Boot 3.x\u4e0e\u6d88\u606f\u4e2d\u95f4\u4ef6RabbitMQ\u5b9e\u73b0\u706b\u8f66\u8d2d\u7968\u7cfb\u7edf\u5b9e\u65f6\u7968\u52a1\u4fe1\u606f\u540c\u6b65\u4e0e\u66f4\u65b0"},"content":{"rendered":"<div class='wxsyncmain'>\n<p style=\"margin-bottom: 0px;text-align: center;\"><img decoding=\"async\" class=\"rich_pages wxw-img js_insertlocalimg lazyload\" data-backh=\"315\" data-backw=\"315\" data-cropselx1=\"0\" data-cropselx2=\"578\" data-cropsely1=\"0\" data-cropsely2=\"330\" data-imgfileid=\"100012976\" data-ratio=\"0.5714285714285714\" data-s=\"300,640\"  data-type=\"jpeg\" data-w=\"1792\" style=\"height: 330px;width: 578px;\" data-src=\"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/08\/20240801222631766.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 js_insertlocalimg\" data-backh=\"315\" data-backw=\"315\" data-cropselx1=\"0\" data-cropselx2=\"578\" data-cropsely1=\"0\" data-cropsely2=\"330\" data-imgfileid=\"100012976\" data-ratio=\"0.5714285714285714\" data-s=\"300,640\"  data-type=\"jpeg\" data-w=\"1792\" style=\"height: 330px;width: 578px;\" src=\"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/08\/20240801222631766.png\"  \/><\/noscript><\/p>\n<section style=\"margin-bottom: 0px;letter-spacing: 0.578px;text-wrap: wrap;line-height: 2em;\"><span style=\"letter-spacing: 0.578px;font-family: mp-quote, -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: var(--articleFontsize);\"><\/span><\/section>\n<section style=\"margin-bottom: 0px;letter-spacing: 0.578px;text-wrap: wrap;line-height: 2em;\"><span style=\"color: rgb(34, 34, 34);font-family: &quot;SF Pro Display&quot;, -apple-system, &quot;system-ui&quot;, &quot;Segoe Ul&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;letter-spacing: normal;text-align: start;text-wrap: wrap;background-color: rgb(247, 247, 250);font-size: 17px;\">\u672c\u4e13\u9898\u6df1\u5165\u63a2\u8ba8\u4e8612306\u706b\u8f66\u8d2d\u7968\u7cfb\u7edf\u5728\u9ad8\u5cf0\u671f\u9047\u5230\u7684\u4e00\u7cfb\u5217\u7591\u96be\u6280\u672f\u95ee\u9898\uff0c\u7279\u522b\u805a\u7126\u4e8e\u5982\u4f55\u501f\u52a9Spring Boot 3.x\u7684\u5f3a\u5927\u529f\u80fd\u6765\u4f18\u5316\u7cfb\u7edf\u6027\u80fd\u3001\u5b89\u5168\u6027\u548c\u7528\u6237\u4f53\u9a8c\u3002\u4ece\u667a\u80fd\u9a8c\u8bc1\u7801\u6821\u9a8c\uff0c\u8d1f\u8f7d\u5747\u8861\u4e0e\u5fae\u670d\u52a1\u67b6\u6784\uff0c\u5230\u652f\u4ed8\u5b89\u5168\u52a0\u56fa\u548c\u4e2a\u6027\u5316\u63a8\u8350\u7cfb\u7edf\u7684\u6784\u5efa\uff0c\u4e13\u9898\u9010\u4e00\u63d0\u4f9b\u4e86\u5b9e\u6218\u6848\u4f8b\u548c\u793a\u4f8b\u4ee3\u7801\uff0c\u65e8\u5728\u5e2e\u52a9\u5f00\u53d1\u4eba\u5458\u5728\u5b9e\u9645\u5de5\u4f5c\u4e2d\u5feb\u901f\u8bca\u65ad\u5e76\u89e3\u51b3\u7c7b\u4f3c\u95ee\u9898\u3002\u6b64\u5916\uff0c\u4e13\u9898\u8fd8\u5173\u6ce8\u4e86\u8d26\u6237\u5b89\u5168\u7ba1\u7406\u3001\u6570\u636e\u4e00\u81f4\u6027\u4fdd\u969c\u7b49\u5173\u952e\u9886\u57df\uff0c\u4e3a\u8bfb\u8005\u63d0\u4f9b\u4e00\u5957\u5168\u9762\u800c\u6df1\u5165\u7684\u89e3\u51b3\u65b9\u6848\u6846\u67b6\uff0c\u65e8\u5728\u63a8\u52a812306\u8d2d\u7968\u7cfb\u7edf\u53ca\u7c7b\u4f3c\u5728\u7ebf\u670d\u52a1\u5e73\u53f0\u5411\u66f4\u9ad8\u6c34\u5e73\u7684\u7a33\u5b9a\u6027\u548c\u7528\u6237\u6ee1\u610f\u5ea6\u8fc8\u8fdb\u3002<\/span><\/section>\n<section style=\"margin-bottom: 0px;letter-spacing: 0.578px;text-wrap: wrap;line-height: 2em;\"><\/section>\n<h3 data-sourcepos=\"1:1-1:108\" style=\"margin-bottom: 1rem;font-weight: 600;line-height: 1.25;font-size: 1.25rem;color: rgb(0, 0, 0);font-family: -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, Helvetica, Arial, sans-serif, &quot;Apple Color Emoji&quot;, &quot;Segoe UI Emoji&quot;;letter-spacing: normal;text-align: start;text-wrap: wrap;\"><span style=\"font-size: 17px;\">\u5229\u7528Spring Boot 3.x\u4e0e\u6d88\u606f\u4e2d\u95f4\u4ef6RabbitMQ\u5b9e\u73b0\u706b\u8f66\u8d2d\u7968\u7cfb\u7edf\u5b9e\u65f6\u7968\u52a1\u4fe1\u606f\u540c\u6b65\u4e0e\u66f4\u65b0<\/span><\/h3>\n<p data-sourcepos=\"3:1-3:497\" style=\"margin-bottom: 1rem;caret-color: rgb(36, 41, 46);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: 16px;letter-spacing: normal;text-align: start;text-wrap: wrap;\"><span style=\"font-size: 17px;\">\u65e0\u8bba\u662f\u822a\u73ed\u3001\u706b\u8f66\u8fd8\u662f\u516c\u4ea4\uff0c\u7968\u52a1\u4fe1\u606f\u7684\u53ca\u65f6\u66f4\u65b0\u662f\u6d88\u8d39\u8005\u51b3\u7b56\u7684\u5173\u952e\u56e0\u7d20\u3002\u7136\u800c\uff0c\u7531\u4e8e\u7cfb\u7edf\u66f4\u65b0\u7684\u5ef6\u8fdf\uff0c\u7528\u6237\u53ef\u80fd\u4f1a\u906d\u9047\u8bf8\u5982\u8d2d\u4e70\u4e86\u4e0d\u5b58\u5728\u7684\u5ea7\u4f4d\u3001\u95f4\u9694\u65f6\u95f4\u4e0d\u8db3\u4ee5\u8fdb\u884c\u8f6c\u4e58\u7b49\u95ee\u9898\u3002\u89e3\u51b3\u8fd9\u4e2a\u95ee\u9898\uff0c\u6211\u4eec\u53ef\u4ee5\u6784\u5efa\u4e00\u4e2a\u4e8b\u4ef6\u9a71\u52a8\u7684\u67b6\u6784\uff0c\u4f7f\u7528Spring Boot 3.x\u4ee5\u53ca\u6d88\u606f\u4e2d\u95f4\u4ef6\uff08\u5982RabbitMQ\uff09\u8fdb\u884c\u5b9e\u65f6\u6570\u636e\u540c\u6b65\uff0c\u901a\u8fc7\u8fd9\u79cd\u65b9\u5f0f\uff0c\u6211\u4eec\u53ef\u4ee5\u786e\u4fdd\u6d88\u8d39\u8005\u5728\u8fdb\u884c\u8d2d\u7968\u51b3\u7b56\u65f6\u83b7\u5f97\u7684\u4fe1\u606f\u51c6\u786e\u6027\u3002<\/span><\/p>\n<h3 data-sourcepos=\"5:1-5:16\" style=\"margin-top: 1.5rem;margin-bottom: 1rem;font-weight: 600;line-height: 1.25;font-size: 1.25rem;color: rgb(0, 0, 0);font-family: -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, Helvetica, Arial, sans-serif, &quot;Apple Color Emoji&quot;, &quot;Segoe UI Emoji&quot;;letter-spacing: normal;text-align: start;text-wrap: wrap;\"><span style=\"font-size: 17px;\">\u6280\u672f\u5b9e\u73b0<\/span><\/h3>\n<p data-sourcepos=\"7:1-7:149\" style=\"margin-bottom: 1rem;caret-color: rgb(36, 41, 46);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: 16px;letter-spacing: normal;text-align: start;text-wrap: wrap;\"><span style=\"font-size: 17px;\">\u4e3a\u4e86\u5b9e\u73b0\u8be5\u529f\u80fd\uff0c\u6211\u4eec\u9700\u8981\u4f7f\u7528RabbitMQ\u4f5c\u4e3a\u6d88\u606f\u4f20\u9012\u4e2d\u4ecb\uff0c\u540c\u65f6\uff0cSpring Boot 3.x\u5c06\u7528\u4e8e\u5904\u7406\u6d88\u606f\u5e76\u8fdb\u884c\u9002\u65f6\u7684\u54cd\u5e94\u3002<\/span><\/p>\n<p data-sourcepos=\"9:1-9:70\" style=\"margin-bottom: 1rem;caret-color: rgb(36, 41, 46);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: 16px;letter-spacing: normal;text-align: start;text-wrap: wrap;\"><span style=\"font-size: 17px;\">\u9996\u5148\uff0c\u6211\u4eec\u9700\u8981\u5728Spring Boot\u9879\u76ee\u4e2d\u5f15\u5165RabbitMQ\u7684\u4f9d\u8d56\uff1a<\/span><\/p>\n<pre data-sourcepos=\"11:1-17:3\" tabindex=\"0\" style=\"font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace;font-size: 13.6px;margin-top: 0.5em;margin-bottom: 0.5em;overflow-wrap: normal;padding: 1em;overflow: auto;line-height: 1.45;background: rgb(246, 248, 250);border-radius: 0.1875rem;color: black;word-spacing: normal;word-break: normal;tab-size: 4;hyphens: none;text-shadow: white 0px 1px;\"><code style=\"font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace;background: none;color: rgb(85, 85, 85);border-radius: 0.1875rem;word-spacing: normal;word-break: normal;overflow-wrap: normal;tab-size: 4;hyphens: none;text-shadow: white 0px 1px;border-width: 0px;border-style: initial;border-color: initial;display: inline;overflow: visible;line-height: inherit;\"><span style=\"font-size: 17px;\"><span style=\"color: slategray;\">&lt;!-- Spring Boot Starter AMQP for RabbitMQ --&gt;<\/span><span style=\"color: rgb(153, 0, 85);\"><span style=\"color: rgb(153, 153, 153);\">&lt;<\/span>dependency<span style=\"color: rgb(153, 153, 153);\">&gt;<\/span><\/span>    <span style=\"color: rgb(153, 0, 85);\"><span style=\"color: rgb(153, 153, 153);\">&lt;<\/span>groupId<span style=\"color: rgb(153, 153, 153);\">&gt;<\/span><\/span>org.springframework.boot<span style=\"color: rgb(153, 0, 85);\"><span style=\"color: rgb(153, 153, 153);\">&lt;\/<\/span>groupId<span style=\"color: rgb(153, 153, 153);\">&gt;<\/span><\/span>    <span style=\"color: rgb(153, 0, 85);\"><span style=\"color: rgb(153, 153, 153);\">&lt;<\/span>artifactId<span style=\"color: rgb(153, 153, 153);\">&gt;<\/span><\/span>spring-boot-starter-amqp<span style=\"color: rgb(153, 0, 85);\"><span style=\"color: rgb(153, 153, 153);\">&lt;\/<\/span>artifactId<span style=\"color: rgb(153, 153, 153);\">&gt;<\/span><\/span><span style=\"color: rgb(153, 0, 85);\"><span style=\"color: rgb(153, 153, 153);\">&lt;\/<\/span>dependency<span style=\"color: rgb(153, 153, 153);\">&gt;<\/span><\/span><\/span><\/code><\/pre>\n<p data-sourcepos=\"19:1-19:81\" style=\"margin-bottom: 1rem;caret-color: rgb(36, 41, 46);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: 16px;letter-spacing: normal;text-align: start;text-wrap: wrap;\"><span style=\"font-size: 17px;\">\u7136\u540e\uff0c\u6211\u4eec\u9700\u8981\u5728application.properties\u6587\u4ef6\u4e2d\u914d\u7f6eRabbitMQ\u7684\u53c2\u6570\uff1a<\/span><\/p>\n<pre data-sourcepos=\"21:1-30:3\" tabindex=\"0\" style=\"font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace;font-size: 13.6px;margin-top: 0.5em;margin-bottom: 0.5em;overflow-wrap: normal;padding: 1em;overflow: auto;line-height: 1.45;background: rgb(246, 248, 250);border-radius: 0.1875rem;color: black;word-spacing: normal;word-break: normal;tab-size: 4;hyphens: none;text-shadow: white 0px 1px;\"><code style=\"font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace;background: none;color: rgb(85, 85, 85);border-radius: 0.1875rem;word-spacing: normal;word-break: normal;overflow-wrap: normal;tab-size: 4;hyphens: none;text-shadow: white 0px 1px;border-width: 0px;border-style: initial;border-color: initial;display: inline;overflow: visible;line-height: inherit;\"><span style=\"font-size: 17px;\"><span style=\"color: slategray;\"># RabbitMQ\u914d\u7f6e\u4fe1\u606f<\/span><span style=\"color: rgb(102, 153, 0);\">spring.rabbitmq.host<\/span><span style=\"color: rgb(153, 153, 153);\">=<\/span><span style=\"color: rgb(0, 119, 170);\">Your-rabbitmq-host<\/span><span style=\"color: rgb(102, 153, 0);\">spring.rabbitmq.port<\/span><span style=\"color: rgb(153, 153, 153);\">=<\/span><span style=\"color: rgb(0, 119, 170);\">5672<\/span><span style=\"color: rgb(102, 153, 0);\">spring.rabbitmq.username<\/span><span style=\"color: rgb(153, 153, 153);\">=<\/span><span style=\"color: rgb(0, 119, 170);\">Your-username<\/span><span style=\"color: rgb(102, 153, 0);\">spring.rabbitmq.password<\/span><span style=\"color: rgb(153, 153, 153);\">=<\/span><span style=\"color: rgb(0, 119, 170);\">Your-password<\/span><span style=\"color: slategray;\"># \u6d88\u606f\u961f\u5217\u540d\u79f0<\/span><span style=\"color: rgb(102, 153, 0);\">app.rabbitmq.queue<\/span><span style=\"color: rgb(153, 153, 153);\">=<\/span><span style=\"color: rgb(0, 119, 170);\">ticket-info-queue<\/span><\/span><\/code><\/pre>\n<p data-sourcepos=\"32:1-32:103\" style=\"margin-bottom: 1rem;caret-color: rgb(36, 41, 46);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: 16px;letter-spacing: normal;text-align: start;text-wrap: wrap;\"><span style=\"font-size: 17px;\">\u63a5\u4e0b\u6765\uff0c\u6211\u4eec\u6765\u521b\u5efa\u4e00\u4e2a<\/span><code style=\"font-family: SFMono-Regular, Consolas, &quot;Liberation Mono&quot;, Menlo, monospace;font-size: 13.6px;padding: 0.2rem 0.4rem;background-color: rgba(27, 31, 35, 0.05);color: rgb(85, 85, 85);border-radius: 0.1875rem;\"><span style=\"font-size: 17px;\">RabbitMQConfig<\/span><\/code><span style=\"font-size: 17px;\">\u7c7b\uff0c\u8be5\u7c7b\u4e3b\u8981\u7528\u6765\u521b\u5efa\u548c\u914d\u7f6e\u6d88\u606f\u961f\u5217\u3002<\/span><\/p>\n<pre data-sourcepos=\"34:1-48:3\" tabindex=\"0\" style=\"font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace;font-size: 13.6px;margin-top: 0.5em;margin-bottom: 0.5em;overflow-wrap: normal;padding: 1em;overflow: auto;line-height: 1.45;background: rgb(246, 248, 250);border-radius: 0.1875rem;color: black;word-spacing: normal;word-break: normal;tab-size: 4;hyphens: none;text-shadow: white 0px 1px;\"><code style=\"font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace;background: none;color: rgb(85, 85, 85);border-radius: 0.1875rem;word-spacing: normal;word-break: normal;overflow-wrap: normal;tab-size: 4;hyphens: none;text-shadow: white 0px 1px;border-width: 0px;border-style: initial;border-color: initial;display: inline;overflow: visible;line-height: inherit;\"><span style=\"font-size: 17px;\"><span style=\"color: rgb(153, 153, 153);\">@Configuration<\/span><span style=\"color: rgb(0, 119, 170);\">public<\/span> <span style=\"color: rgb(0, 119, 170);\">class<\/span> <span style=\"color: rgb(221, 74, 104);\">RabbitMQConfig<\/span> <span style=\"color: rgb(153, 153, 153);\">{<\/span>        <span style=\"color: slategray;\">\/\/ \u961f\u5217\u540d\u79f0<\/span>    <span style=\"color: rgb(153, 153, 153);\">@Value(<\/span><span style=\"color: rgb(102, 153, 0);\">\"${app.rabbitmq.queue}\"<\/span><span style=\"color: rgb(153, 153, 153);\">)<\/span>    <span style=\"color: rgb(0, 119, 170);\">private<\/span> <span style=\"color: rgb(221, 74, 104);\">String<\/span> queueName<span style=\"color: rgb(153, 153, 153);\">;<\/span>    <span style=\"color: slategray;\">\/\/ \u521b\u5efa\u5e76\u8fd4\u56de\u4e00\u4e2a\u961f\u5217<\/span>    <span style=\"color: rgb(153, 153, 153);\">@Bean<\/span>    <span style=\"color: rgb(0, 119, 170);\">public<\/span> <span style=\"color: rgb(221, 74, 104);\">Queue<\/span> <span style=\"color: rgb(221, 74, 104);\">ticketInfoQueue<\/span><span style=\"color: rgb(153, 153, 153);\">()<\/span> <span style=\"color: rgb(153, 153, 153);\">{<\/span>        <span style=\"color: rgb(0, 119, 170);\">return<\/span> <span style=\"color: rgb(0, 119, 170);\">new<\/span> <span style=\"color: rgb(221, 74, 104);\">Queue<\/span><span style=\"color: rgb(153, 153, 153);\">(<\/span>queueName<span style=\"color: rgb(153, 153, 153);\">);<\/span>    <span style=\"color: rgb(153, 153, 153);\">}<\/span><span style=\"color: rgb(153, 153, 153);\">}<\/span><\/span><\/code><\/pre>\n<p data-sourcepos=\"50:1-50:189\" style=\"margin-bottom: 1rem;caret-color: rgb(36, 41, 46);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: 16px;letter-spacing: normal;text-align: start;text-wrap: wrap;\"><span style=\"font-size: 17px;\">\u5728\u7968\u52a1\u7cfb\u7edf\u4e2d\uff0c\u5f53\u6709\u8f66\u7968\u4fe1\u606f\u53d1\u751f\u53d8\u52a8\uff08\u5982\u8f66\u7968\u552e\u7f44\uff0c\u65b0\u8f66\u7968\u5f00\u552e\uff09\u65f6\uff0c\u5c31\u9700\u8981\u5f80\u6d88\u606f\u961f\u5217\u4e2d\u53d1\u5e03\u6d88\u606f\u3002\u8fd9\u53ef\u4ee5\u7531\u6d88\u606f\u53d1\u5e03\u8005\uff08Publisher\uff09\u5b8c\u6210\u3002<\/span><\/p>\n<pre data-sourcepos=\"52:1-67:3\" tabindex=\"0\" style=\"font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace;font-size: 13.6px;margin-top: 0.5em;margin-bottom: 0.5em;overflow-wrap: normal;padding: 1em;overflow: auto;line-height: 1.45;background: rgb(246, 248, 250);border-radius: 0.1875rem;color: black;word-spacing: normal;word-break: normal;tab-size: 4;hyphens: none;text-shadow: white 0px 1px;\"><code style=\"font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace;background: none;color: rgb(85, 85, 85);border-radius: 0.1875rem;word-spacing: normal;word-break: normal;overflow-wrap: normal;tab-size: 4;hyphens: none;text-shadow: white 0px 1px;border-width: 0px;border-style: initial;border-color: initial;display: inline;overflow: visible;line-height: inherit;\"><span style=\"font-size: 17px;\"><span style=\"color: rgb(153, 153, 153);\">@Service<\/span><span style=\"color: rgb(0, 119, 170);\">public<\/span> <span style=\"color: rgb(0, 119, 170);\">class<\/span> <span style=\"color: rgb(221, 74, 104);\">TicketInfoPublisher<\/span><span style=\"color: rgb(153, 153, 153);\">{<\/span>    <span style=\"color: rgb(153, 153, 153);\">@Autowired<\/span>    <span style=\"color: rgb(0, 119, 170);\">private<\/span> <span style=\"color: rgb(221, 74, 104);\">RabbitTemplate<\/span> rabbitTemplate<span style=\"color: rgb(153, 153, 153);\">;<\/span>        <span style=\"color: rgb(153, 153, 153);\">@Autowired<\/span>    <span style=\"color: rgb(0, 119, 170);\">private<\/span> <span style=\"color: rgb(221, 74, 104);\">RabbitMQConfig<\/span> rabbitMQConfig<span style=\"color: rgb(153, 153, 153);\">;<\/span>    <span style=\"color: slategray;\">\/\/ \u53d1\u9001\u6d88\u606f<\/span>    <span style=\"color: rgb(0, 119, 170);\">public<\/span> <span style=\"color: rgb(0, 119, 170);\">void<\/span> <span style=\"color: rgb(221, 74, 104);\">sendTicketInfo<\/span><span style=\"color: rgb(153, 153, 153);\">(<\/span><span style=\"color: rgb(221, 74, 104);\">TicketInfo<\/span> ticketInfo<span style=\"color: rgb(153, 153, 153);\">){<\/span>        rabbitTemplate<span style=\"color: rgb(153, 153, 153);\">.<\/span><span style=\"color: rgb(221, 74, 104);\">convertAndSend<\/span><span style=\"color: rgb(153, 153, 153);\">(<\/span>rabbitMQConfig<span style=\"color: rgb(153, 153, 153);\">.<\/span><span style=\"color: rgb(221, 74, 104);\">ticketInfoQueue<\/span><span style=\"color: rgb(153, 153, 153);\">().<\/span><span style=\"color: rgb(221, 74, 104);\">getName<\/span><span style=\"color: rgb(153, 153, 153);\">(),<\/span> ticketInfo<span style=\"color: rgb(153, 153, 153);\">);<\/span>    <span style=\"color: rgb(153, 153, 153);\">}<\/span><span style=\"color: rgb(153, 153, 153);\">}<\/span><\/span><\/code><\/pre>\n<p data-sourcepos=\"69:1-69:24\" style=\"margin-bottom: 1rem;caret-color: rgb(36, 41, 46);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: 16px;letter-spacing: normal;text-align: start;text-wrap: wrap;\"><span style=\"font-size: 17px;\">\u5b9e\u4f53\u7c7b<\/span><code style=\"font-family: SFMono-Regular, Consolas, &quot;Liberation Mono&quot;, Menlo, monospace;font-size: 13.6px;padding: 0.2rem 0.4rem;background-color: rgba(27, 31, 35, 0.05);color: rgb(85, 85, 85);border-radius: 0.1875rem;\"><span style=\"font-size: 17px;\">TicketInfo<\/span><\/code><span style=\"font-size: 17px;\">\uff1a<\/span><\/p>\n<pre data-sourcepos=\"71:1-80:3\" tabindex=\"0\" style=\"font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace;font-size: 13.6px;margin-top: 0.5em;margin-bottom: 0.5em;overflow-wrap: normal;padding: 1em;overflow: auto;line-height: 1.45;background: rgb(246, 248, 250);border-radius: 0.1875rem;color: black;word-spacing: normal;word-break: normal;tab-size: 4;hyphens: none;text-shadow: white 0px 1px;\"><code style=\"font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace;background: none;color: rgb(85, 85, 85);border-radius: 0.1875rem;word-spacing: normal;word-break: normal;overflow-wrap: normal;tab-size: 4;hyphens: none;text-shadow: white 0px 1px;border-width: 0px;border-style: initial;border-color: initial;display: inline;overflow: visible;line-height: inherit;\"><span style=\"font-size: 17px;\"><span style=\"color: rgb(0, 119, 170);\">public<\/span> <span style=\"color: rgb(0, 119, 170);\">class<\/span> <span style=\"color: rgb(221, 74, 104);\">TicketInfo<\/span> <span style=\"color: rgb(153, 153, 153);\">{<\/span>    <span style=\"color: rgb(0, 119, 170);\">private<\/span> <span style=\"color: rgb(221, 74, 104);\">String<\/span> trainNumber<span style=\"color: rgb(153, 153, 153);\">;<\/span> <span style=\"color: slategray;\">\/\/ \u706b\u8f66\u8f66\u6b21<\/span>    <span style=\"color: rgb(0, 119, 170);\">private<\/span> <span style=\"color: rgb(221, 74, 104);\">String<\/span> seatType<span style=\"color: rgb(153, 153, 153);\">;<\/span>  <span style=\"color: slategray;\">\/\/ \u5ea7\u4f4d\u7c7b\u578b\uff0c\u5982\u786c\u5ea7\u3001\u8f6f\u5ea7\u7b49<\/span>    <span style=\"color: rgb(0, 119, 170);\">private<\/span> <span style=\"color: rgb(0, 119, 170);\">int<\/span> availableTickets<span style=\"color: rgb(153, 153, 153);\">;<\/span> <span style=\"color: slategray;\">\/\/ \u53ef\u7528\u7968\u6570<\/span>    <span style=\"color: slategray;\">\/\/ \u6b64\u5904\u7701\u7565getter\u548csetter\u65b9\u6cd5<\/span><span style=\"color: rgb(153, 153, 153);\">}<\/span><\/span><\/code><\/pre>\n<p data-sourcepos=\"82:1-82:110\" style=\"margin-bottom: 1rem;caret-color: rgb(36, 41, 46);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: 16px;letter-spacing: normal;text-align: start;text-wrap: wrap;\"><span style=\"font-size: 17px;\">\u6b64\u5916\uff0c\u6211\u4eec\u8fd8\u9700\u8981\u8bbe\u7f6e\u4e00\u4e2a\u6d88\u606f\u76d1\u542c\u8005\uff08Listener\uff09\u6765\u63a5\u6536\u5e76\u5904\u7406\u6d88\u606f\u961f\u5217\u4e2d\u7684\u6d88\u606f\u3002<\/span><\/p>\n<pre data-sourcepos=\"84:1-104:3\" tabindex=\"0\" style=\"font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace;font-size: 13.6px;margin-top: 0.5em;margin-bottom: 0.5em;overflow-wrap: normal;padding: 1em;overflow: auto;line-height: 1.45;background: rgb(246, 248, 250);border-radius: 0.1875rem;color: black;word-spacing: normal;word-break: normal;tab-size: 4;hyphens: none;text-shadow: white 0px 1px;\"><code style=\"font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace;background: none;color: rgb(85, 85, 85);border-radius: 0.1875rem;word-spacing: normal;word-break: normal;overflow-wrap: normal;tab-size: 4;hyphens: none;text-shadow: white 0px 1px;border-width: 0px;border-style: initial;border-color: initial;display: inline;overflow: visible;line-height: inherit;\"><span style=\"font-size: 17px;\"><span style=\"color: rgb(153, 153, 153);\">@Service<\/span><span style=\"color: rgb(0, 119, 170);\">public<\/span> <span style=\"color: rgb(0, 119, 170);\">class<\/span> <span style=\"color: rgb(221, 74, 104);\">TicketInfoListener<\/span> <span style=\"color: rgb(153, 153, 153);\">{<\/span>    <span style=\"color: rgb(153, 153, 153);\">@Autowired<\/span>    <span style=\"color: rgb(0, 119, 170);\">private<\/span> <span style=\"color: rgb(221, 74, 104);\">RabbitTemplate<\/span> rabbitTemplate<span style=\"color: rgb(153, 153, 153);\">;<\/span>    <span style=\"color: slategray;\">\/\/ \u63a5\u6536\u5e76\u5904\u7406\u6d88\u606f<\/span>    <span style=\"color: rgb(153, 153, 153);\">@RabbitListener(<\/span>queues <span style=\"color: rgb(154, 110, 58);background: rgba(255, 255, 255, 0.5);\">=<\/span> <span style=\"color: rgb(102, 153, 0);\">\"#{rabbitMQConfig.ticketInfoQueue().getName()}\"<\/span><span style=\"color: rgb(153, 153, 153);\">)<\/span>    <span style=\"color: rgb(0, 119, 170);\">public<\/span> <span style=\"color: rgb(0, 119, 170);\">void<\/span> <span style=\"color: rgb(221, 74, 104);\">handleTicketInfo<\/span><span style=\"color: rgb(153, 153, 153);\">(<\/span><span style=\"color: rgb(221, 74, 104);\">TicketInfo<\/span> ticketInfo<span style=\"color: rgb(153, 153, 153);\">)<\/span> <span style=\"color: rgb(153, 153, 153);\">{<\/span>        <span style=\"color: slategray;\">\/\/ \u8fd9\u91cc\u6839\u636e\u8f66\u7968\u4fe1\u606f\u8fdb\u884c\u5bf9\u5e94\u7684\u4e1a\u52a1\u5904\u7406<\/span>        <span style=\"color: rgb(221, 74, 104);\">System<\/span><span style=\"color: rgb(153, 153, 153);\">.<\/span>out<span style=\"color: rgb(153, 153, 153);\">.<\/span><span style=\"color: rgb(221, 74, 104);\">println<\/span><span style=\"color: rgb(153, 153, 153);\">(<\/span><span style=\"color: rgb(102, 153, 0);\">\"\u63a5\u6536\u6d88\u606f: \"<\/span> <span style=\"color: rgb(154, 110, 58);background: rgba(255, 255, 255, 0.5);\">+<\/span> ticketInfo<span style=\"color: rgb(153, 153, 153);\">.<\/span><span style=\"color: rgb(221, 74, 104);\">toString<\/span><span style=\"color: rgb(153, 153, 153);\">());<\/span>    <span style=\"color: rgb(153, 153, 153);\">}<\/span>    <span style=\"color: slategray;\">\/\/ \u7528\u4e8e\u624b\u52a8\u89e6\u53d1\u6d88\u606f\u7684\u53d1\u9001<\/span>    <span style=\"color: rgb(0, 119, 170);\">public<\/span> <span style=\"color: rgb(0, 119, 170);\">void<\/span> <span style=\"color: rgb(221, 74, 104);\">sendTicketInfoMessage<\/span><span style=\"color: rgb(153, 153, 153);\">(<\/span><span style=\"color: rgb(221, 74, 104);\">TicketInfo<\/span> ticketInfo<span style=\"color: rgb(153, 153, 153);\">)<\/span> <span style=\"color: rgb(153, 153, 153);\">{<\/span>        rabbitTemplate<span style=\"color: rgb(153, 153, 153);\">.<\/span><span style=\"color: rgb(221, 74, 104);\">convertAndSend<\/span><span style=\"color: rgb(153, 153, 153);\">(<\/span><span style=\"color: rgb(102, 153, 0);\">\"your_queue_name\"<\/span><span style=\"color: rgb(153, 153, 153);\">,<\/span> ticketInfo<span style=\"color: rgb(153, 153, 153);\">);<\/span>        <span style=\"color: rgb(221, 74, 104);\">System<\/span><span style=\"color: rgb(153, 153, 153);\">.<\/span>out<span style=\"color: rgb(153, 153, 153);\">.<\/span><span style=\"color: rgb(221, 74, 104);\">println<\/span><span style=\"color: rgb(153, 153, 153);\">(<\/span><span style=\"color: rgb(102, 153, 0);\">\"\u6d88\u606f\u53d1\u9001: \"<\/span> <span style=\"color: rgb(154, 110, 58);background: rgba(255, 255, 255, 0.5);\">+<\/span> ticketInfo<span style=\"color: rgb(153, 153, 153);\">.<\/span><span style=\"color: rgb(221, 74, 104);\">toString<\/span><span style=\"color: rgb(153, 153, 153);\">());<\/span>    <span style=\"color: rgb(153, 153, 153);\">}<\/span><span style=\"color: rgb(153, 153, 153);\">}<\/span><\/span><\/code><\/pre>\n<p data-sourcepos=\"106:1-106:180\" style=\"margin-bottom: 1rem;caret-color: rgb(36, 41, 46);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: 16px;letter-spacing: normal;text-align: start;text-wrap: wrap;\"><span style=\"font-size: 17px;\">\u7136\u540e\uff0c\u6211\u4eec\u521b\u5efa<\/span><code style=\"font-family: SFMono-Regular, Consolas, &quot;Liberation Mono&quot;, Menlo, monospace;font-size: 13.6px;padding: 0.2rem 0.4rem;background-color: rgba(27, 31, 35, 0.05);color: rgb(85, 85, 85);border-radius: 0.1875rem;\"><span style=\"font-size: 17px;\">TicketInfoController<\/span><\/code><span style=\"font-size: 17px;\">\u7c7b\uff0c\u8bbe\u7f6e<\/span><code style=\"font-family: SFMono-Regular, Consolas, &quot;Liberation Mono&quot;, Menlo, monospace;font-size: 13.6px;padding: 0.2rem 0.4rem;background-color: rgba(27, 31, 35, 0.05);color: rgb(85, 85, 85);border-radius: 0.1875rem;\"><span style=\"font-size: 17px;\">\/sendTicketInfo<\/span><\/code><span style=\"font-size: 17px;\">\u8def\u5f84\u7684POST\u63a5\u53e3\uff0c\u7528\u4e8e\u63a5\u6536\u5ba2\u6237\u7aef\u53d1\u6765\u7684\u8f66\u7968\u4fe1\u606f\uff0c\u5e76\u4f20\u9012\u7ed9<\/span><code style=\"font-family: SFMono-Regular, Consolas, &quot;Liberation Mono&quot;, Menlo, monospace;font-size: 13.6px;padding: 0.2rem 0.4rem;background-color: rgba(27, 31, 35, 0.05);color: rgb(85, 85, 85);border-radius: 0.1875rem;\"><span style=\"font-size: 17px;\">TicketInfoListener<\/span><\/code><span style=\"font-size: 17px;\">\u5904\u7406\uff1a<\/span><\/p>\n<pre data-sourcepos=\"108:1-121:3\" tabindex=\"0\" style=\"font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace;font-size: 13.6px;margin-top: 0.5em;margin-bottom: 0.5em;overflow-wrap: normal;padding: 1em;overflow: auto;line-height: 1.45;background: rgb(246, 248, 250);border-radius: 0.1875rem;color: black;word-spacing: normal;word-break: normal;tab-size: 4;hyphens: none;text-shadow: white 0px 1px;\"><code style=\"font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace;background: none;color: rgb(85, 85, 85);border-radius: 0.1875rem;word-spacing: normal;word-break: normal;overflow-wrap: normal;tab-size: 4;hyphens: none;text-shadow: white 0px 1px;border-width: 0px;border-style: initial;border-color: initial;display: inline;overflow: visible;line-height: inherit;\"><span style=\"font-size: 17px;\"><span style=\"color: rgb(153, 153, 153);\">@RestController<\/span><span style=\"color: rgb(0, 119, 170);\">public<\/span> <span style=\"color: rgb(0, 119, 170);\">class<\/span> <span style=\"color: rgb(221, 74, 104);\">TicketInfoController<\/span> <span style=\"color: rgb(153, 153, 153);\">{<\/span>    <span style=\"color: rgb(153, 153, 153);\">@Autowired<\/span>    <span style=\"color: rgb(0, 119, 170);\">private<\/span> <span style=\"color: rgb(221, 74, 104);\">TicketInfoListener<\/span> ticketInfoListener<span style=\"color: rgb(153, 153, 153);\">;<\/span>    <span style=\"color: rgb(153, 153, 153);\">@PostMapping(<\/span><span style=\"color: rgb(102, 153, 0);\">\"\/sendTicketInfo\"<\/span><span style=\"color: rgb(153, 153, 153);\">)<\/span>    <span style=\"color: rgb(0, 119, 170);\">public<\/span> <span style=\"color: rgb(221, 74, 104);\">ResponseEntity<\/span><span style=\"color: rgb(153, 153, 153);\">&lt;<\/span><span style=\"color: rgb(221, 74, 104);\">String<\/span><span style=\"color: rgb(153, 153, 153);\">&gt;<\/span> <span style=\"color: rgb(221, 74, 104);\">sendTicketInfo<\/span><span style=\"color: rgb(153, 153, 153);\">(@RequestBody<\/span> <span style=\"color: rgb(221, 74, 104);\">TicketInfo<\/span> ticketInfo<span style=\"color: rgb(153, 153, 153);\">)<\/span> <span style=\"color: rgb(153, 153, 153);\">{<\/span>        ticketInfoListener<span style=\"color: rgb(153, 153, 153);\">.<\/span><span style=\"color: rgb(221, 74, 104);\">sendTicketInfoMessage<\/span><span style=\"color: rgb(153, 153, 153);\">(<\/span>ticketInfo<span style=\"color: rgb(153, 153, 153);\">);<\/span>        <span style=\"color: rgb(0, 119, 170);\">return<\/span> <span style=\"color: rgb(221, 74, 104);\">ResponseEntity<\/span><span style=\"color: rgb(153, 153, 153);\">.<\/span><span style=\"color: rgb(221, 74, 104);\">ok<\/span><span style=\"color: rgb(153, 153, 153);\">().<\/span><span style=\"color: rgb(221, 74, 104);\">body<\/span><span style=\"color: rgb(153, 153, 153);\">(<\/span><span style=\"color: rgb(102, 153, 0);\">\"\u8f66\u7968\u4fe1\u606f\u53d1\u9001\u6210\u529f\"<\/span><span style=\"color: rgb(153, 153, 153);\">);<\/span>    <span style=\"color: rgb(153, 153, 153);\">}<\/span><span style=\"color: rgb(153, 153, 153);\">}<\/span><\/span><\/code><\/pre>\n<p data-sourcepos=\"123:1-123:295\" style=\"margin-bottom: 1rem;caret-color: rgb(36, 41, 46);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: 16px;letter-spacing: normal;text-align: start;text-wrap: wrap;\"><span style=\"font-size: 17px;\">\u5728\u4e0a\u8ff0\u4ee3\u7801\u4e2d\uff0c\u5ba2\u6237\u7aef\u901a\u8fc7POST\u8bf7\u6c42\u53d1\u9001\u8f66\u7968\u4fe1\u606f\uff0c\u4fe1\u606f\u4e2d\u5e94\u5305\u542b\u706b\u8f66\u8f66\u6b21\u3001\u5ea7\u4f4d\u7c7b\u578b\u4ee5\u53ca\u53ef\u7528\u7968\u6570\u3002\u4e4b\u540e\uff0c\u63a7\u5236\u5668\u63a5\u6536\u8fd9\u4e9b\u4fe1\u606f\uff0c\u8c03\u7528<\/span><code style=\"font-family: SFMono-Regular, Consolas, &quot;Liberation Mono&quot;, Menlo, monospace;font-size: 13.6px;padding: 0.2rem 0.4rem;background-color: rgba(27, 31, 35, 0.05);color: rgb(85, 85, 85);border-radius: 0.1875rem;\"><span style=\"font-size: 17px;\">TicketInfoListener<\/span><\/code><span style=\"font-size: 17px;\">\u7684<\/span><code style=\"font-family: SFMono-Regular, Consolas, &quot;Liberation Mono&quot;, Menlo, monospace;font-size: 13.6px;padding: 0.2rem 0.4rem;background-color: rgba(27, 31, 35, 0.05);color: rgb(85, 85, 85);border-radius: 0.1875rem;\"><span style=\"font-size: 17px;\">sendTicketInfoMessage<\/span><\/code><span style=\"font-size: 17px;\">\u65b9\u6cd5\uff0c\u7136\u542f\u52a8RabbitMQ\u3002\u6574\u4e2a\u8fc7\u7a0b\u5c5e\u4e8e\u5b9e\u65f6\u6027\u66f4\u65b0\u6570\u636e\u3002<\/span><\/p>\n<p data-sourcepos=\"125:1-125:260\" style=\"margin-bottom: 1rem;caret-color: rgb(36, 41, 46);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: 16px;letter-spacing: normal;text-align: start;text-wrap: wrap;\"><span style=\"font-size: 17px;\">\u5728\u4e0a\u8ff0\u4f8b\u5b50\u4e2d\uff0c\u6211\u4eec\u4f5c\u4e3a\u53d1\u5e03\u8005\uff0c\u5f53\u8f66\u7968\u4fe1\u606f\u53d1\u751f\u53d8\u52a8\u65f6\uff0c\u6211\u4eec\u5c06\u8f66\u7968\u4fe1\u606f\u4f5c\u4e3a\u6d88\u606f\u53d1\u9001\u5230RabbitMQ\u3002\u7136\u540e\uff0c\u6211\u4eec\u8bbe\u7f6e\u7684\u76d1\u542c\u8005\u4f1a\u76d1\u542c\u5230\u8fd9\u4e2a\u6d88\u606f\uff0c\u5e76\u6839\u636e\u6d88\u606f\u5185\u5bb9\uff08\u8f66\u7968\u4fe1\u606f\uff09\u8fdb\u884c\u5bf9\u5e94\u7684\u4e1a\u52a1\u5904\u7406\u3002<\/span><\/p>\n<h3 data-sourcepos=\"127:1-127:16\" style=\"margin-top: 1.5rem;margin-bottom: 1rem;font-weight: 600;line-height: 1.25;font-size: 1.25rem;color: rgb(0, 0, 0);font-family: -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, Helvetica, Arial, sans-serif, &quot;Apple Color Emoji&quot;, &quot;Segoe UI Emoji&quot;;letter-spacing: normal;text-align: start;text-wrap: wrap;\"><span style=\"font-size: 17px;\">\u6ce8\u610f\u4e8b\u9879<\/span><\/h3>\n<p data-sourcepos=\"129:1-129:60\" style=\"margin-bottom: 1rem;caret-color: rgb(36, 41, 46);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: 16px;letter-spacing: normal;text-align: start;text-wrap: wrap;\"><span style=\"font-size: 17px;\">\u5728\u5b9e\u9645\u5b9e\u73b0\u8fc7\u7a0b\u4e2d\uff0c\u6211\u4eec\u9700\u8981\u6ce8\u610f\u4ee5\u4e0b\u51e0\u70b9\uff1a<\/span><\/p>\n<ol data-sourcepos=\"131:1-134:0\" style=\"padding-left: 2rem;margin-bottom: 1rem;caret-color: rgb(36, 41, 46);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: 16px;letter-spacing: normal;text-align: start;text-wrap: wrap;\" class=\"list-paddingleft-1\">\n<li style=\"font-size: 17px;\">\n<p><span style=\"font-size: 17px;\">\u786e\u4fdd\u6d88\u606f\u7684\u5373\u65f6\u6027\uff1aRabbitMQ\u80fd\u591f\u4fdd\u8bc1\u6d88\u606f\u7684\u5f02\u6b65\u901a\u4fe1\uff0c\u4ece\u800c\u5b9e\u73b0\u6570\u636e\u7684\u5373\u65f6\u540c\u6b65\u3002<\/span><\/p>\n<\/li>\n<li style=\"margin-top: 0.25rem;font-size: 17px;\">\n<p><span style=\"font-size: 17px;\">\u786e\u4fdd\u4fe1\u606f\u7684\u4e00\u81f4\u6027\uff1a\u4e00\u81f4\u6027\u662f\u6700\u91cd\u8981\u7684\u3002\u5982\u679c\u65e0\u6cd5\u4fdd\u8bc1\u4e00\u81f4\u6027\uff0c\u7528\u6237\u53ef\u80fd\u4f1a\u63a5\u6536\u5230\u9519\u8bef\u6216\u8fc7\u671f\u7684\u4fe1\u606f\u3002<\/span><\/p>\n<\/li>\n<li style=\"margin-top: 0.25rem;font-size: 17px;\">\n<p><span style=\"font-size: 17px;\">\u5bf9\u4e8eRabbitMQ\u6765\u8bf4\uff0c\u5b95\u673a\u7b49\u6545\u969c\u53ef\u80fd\u5bfc\u81f4\u6d88\u606f\u4e22\u5931\uff0c\u8fd9\u5c31\u9700\u8981\u6211\u4eec\u8bbe\u7f6e\u6301\u4e45\u5316\uff0c\u4ee5\u9632\u6b62\u6570\u636e\u4e22\u5931\u3002\u6b64\u5916\uff0c\u6211\u4eec\u8fd8\u9700\u8981\u8bbe\u7f6e\u6d88\u606f\u786e\u8ba4\uff0c\u4ee5\u786e\u4fdd\u6d88\u606f\u5df2\u7ecf\u88ab\u6b63\u786e\u5904\u7406\u3002<\/span><\/p>\n<\/li>\n<\/ol>\n<p data-sourcepos=\"135:1-135:237\" style=\"caret-color: rgb(36, 41, 46);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: 16px;letter-spacing: normal;text-align: start;text-wrap: wrap;margin-bottom: 0px !important;\"><span style=\"font-size: 17px;\">\u901a\u8fc7\u4ee5\u4e0a\u65b9\u5f0f\uff0c\u6211\u4eec\u5c31\u53ef\u4ee5\u5b9e\u73b0\u706b\u8f66\u8d2d\u7968\u7cfb\u7edf\u7684\u5b9e\u65f6\u7968\u52a1\u4fe1\u606f\u540c\u6b65\uff0c\u4ece\u800c\u4f18\u5316\u7528\u6237\u7684\u8d2d\u7968\u4f53\u9a8c\u3002\u6b64\u79cd\u65b9\u5f0f\u4e5f\u9002\u7528\u4e8e\u5b9e\u73b0\u5176\u4ed6\u5177\u6709\u5b9e\u65f6\u6027\u9700\u6c42\u7684\u7cfb\u7edf\uff0c\u5982\u5b9e\u65f6\u5e93\u5b58\u7cfb\u7edf\u3001\u9884\u8ba2\u7cfb\u7edf\u7b49\u3002<\/span><\/p>\n<p style=\"margin-bottom: 0px;letter-spacing: 0.578px;text-wrap: wrap;\">\n<section style=\"margin-bottom: 1em;letter-spacing: 0.578px;text-wrap: wrap;color: rgba(0, 0, 0, 0.85);font-family: -apple-system, system-ui, &quot;segoe ui&quot;, Roboto, &quot;helvetica neue&quot;, Arial, &quot;noto sans&quot;, sans-serif, &quot;apple color emoji&quot;, &quot;segoe ui emoji&quot;, &quot;segoe ui symbol&quot;, &quot;noto color emoji&quot;, monospace;text-align: start;background-color: rgb(255, 255, 255);text-shadow: none !important;line-height: 1.5rem !important;font-size: 1rem !important;\"><span style=\"text-align: justify;color: rgb(0, 0, 0);font-family: &quot;Helvetica Neue&quot;;font-size: 17px;\">\u4eca\u5929\u5c31\u8bb2\u5230\u8fd9\u91cc\uff0c\u5982\u679c\u6709\u95ee\u9898\u9700\u8981\u54a8\u8be2\uff0c\u5927\u5bb6\u53ef\u4ee5\u76f4\u63a5\u7559\u8a00\u6216\u626b\u4e0b\u65b9\u4e8c\u7ef4\u7801\u6765\u77e5\u8bc6\u661f\u7403\u627e\u6211\uff0c\u6211\u4eec\u4f1a\u5c3d\u529b\u4e3a\u4f60\u89e3\u7b54\u3002<\/span><\/section>\n<p style=\"margin-bottom: 0px;letter-spacing: 0.578px;text-wrap: wrap;text-align: center;\"><img decoding=\"async\" class=\"rich_pages wxw-img lazyload\" data-cropselx1=\"0\" data-cropselx2=\"578\" data-cropsely1=\"0\" data-cropsely2=\"317\" data-galleryid=\"\" data-imgfileid=\"100012975\" data-ratio=\"0.549074074074074\" data-s=\"300,640\"  data-type=\"jpeg\" data-w=\"1080\" style=\"height: 318px;width: 578px;\" data-src=\"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/08\/20240801222720276.jpeg\" 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-cropselx1=\"0\" data-cropselx2=\"578\" data-cropsely1=\"0\" data-cropsely2=\"317\" data-galleryid=\"\" data-imgfileid=\"100012975\" data-ratio=\"0.549074074074074\" data-s=\"300,640\"  data-type=\"jpeg\" data-w=\"1080\" style=\"height: 318px;width: 578px;\" src=\"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/08\/20240801222720276.jpeg\"  \/><\/noscript><\/p>\n<section style=\"margin-bottom: 1em;letter-spacing: 0.578px;text-wrap: wrap;color: rgba(0, 0, 0, 0.85);font-family: -apple-system, system-ui, &quot;segoe ui&quot;, Roboto, &quot;helvetica neue&quot;, Arial, &quot;noto sans&quot;, sans-serif, &quot;apple color emoji&quot;, &quot;segoe ui emoji&quot;, &quot;segoe ui symbol&quot;, &quot;noto color emoji&quot;, monospace;text-align: start;background-color: rgb(255, 255, 255);text-shadow: none !important;line-height: 1.5rem !important;font-size: 1rem !important;\"><\/section>\n<section style=\"margin-bottom: 1em;letter-spacing: 0.578px;text-wrap: wrap;color: rgba(0, 0, 0, 0.85);font-family: -apple-system, system-ui, &quot;segoe ui&quot;, Roboto, &quot;helvetica neue&quot;, Arial, &quot;noto sans&quot;, sans-serif, &quot;apple color emoji&quot;, &quot;segoe ui emoji&quot;, &quot;segoe ui symbol&quot;, &quot;noto color emoji&quot;, monospace;text-align: start;background-color: rgb(255, 255, 255);text-shadow: none !important;line-height: 1.5rem !important;font-size: 1rem !important;\"><span style=\"letter-spacing: 0.544px;color: rgb(51, 51, 51);font-family: mp-quote, -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;text-align: justify;font-size: 17px;\">AI\u8d44\u6e90\u805a\u5408\u7ad9\u5df2\u7ecf\u6b63\u5f0f\u4e0a\u7ebf\uff0c\u8be5\u5e73\u53f0\u4e0d\u4ec5\u4ec5\u662f\u4e00\u4e2aAI\u8d44\u6e90\u805a\u5408\u7ad9\uff0c\u66f4\u662f\u4e00\u4e2a\u4e3a\u8ffd\u6c42\u77e5\u8bc6\u6df1\u5ea6\u548c\u5e7f\u5ea6\u7684\u4eba\u4eec\u6253\u9020\u7684\u667a\u6167\u805a\u96c6\u5730\u3002\u901a\u8fc7\u8bbf\u95ee AI \u8d44\u6e90\u805a\u5408\u7f51\u7ad9 https:\/\/ai-ziyuan.techwisdom.cn\/\uff0c\u4f60\u5c06\u8fdb\u5165\u4e00\u4e2a\u5168\u65b9\u4f4d\u6db5\u76d6\u4eba\u5de5\u667a\u80fd\u548c\u8bed\u8a00\u6a21\u578b\u9886\u57df\u7684\u5b9d\u85cf\u5e93<span style=\"font-family: mp-quote, -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;letter-spacing: 0.578px;\">\u3002<\/span><\/span><\/section>\n<p style=\"margin-bottom: 0px;letter-spacing: 0.578px;text-wrap: wrap;\">\n<section style=\"margin-bottom: 0px;letter-spacing: 0.578px;text-wrap: wrap;min-height: 1em;text-align: center;line-height: 2em;\"><img decoding=\"async\" class=\"rich_pages wxw-img lazyload\" data-imgfileid=\"100012974\" data-ratio=\"0.9921414538310412\" data-s=\"300,640\"  data-type=\"png\" data-w=\"509\" style=\"width: 509px !important;visibility: visible !important;\" data-src=\"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/08\/20240801222729618.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-imgfileid=\"100012974\" data-ratio=\"0.9921414538310412\" data-s=\"300,640\"  data-type=\"png\" data-w=\"509\" style=\"width: 509px !important;visibility: visible !important;\" src=\"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/08\/20240801222729618.png\"  \/><\/noscript><\/section>\n<section style=\"margin-bottom: 0px;letter-spacing: 0.578px;text-wrap: wrap;min-height: 1em;text-align: center;line-height: 2em;\"><img decoding=\"async\" class=\"rich_pages wxw-img lazyload\" data-imgfileid=\"100012972\" data-ratio=\"0.25\" data-s=\"300,640\"  data-type=\"png\" data-w=\"424\" style=\"width: 424px !important;visibility: visible !important;\" data-src=\"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/08\/20240801222735588.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-imgfileid=\"100012972\" data-ratio=\"0.25\" data-s=\"300,640\"  data-type=\"png\" data-w=\"424\" style=\"width: 424px !important;visibility: visible !important;\" src=\"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/08\/20240801222735588.png\"  \/><\/noscript><\/section>\n<section style=\"margin-bottom: 0px;letter-spacing: 0.578px;text-wrap: wrap;min-height: 1em;text-align: center;line-height: 2em;\"><img decoding=\"async\" class=\"rich_pages wxw-img lazyload\" data-imgfileid=\"100012973\" data-ratio=\"0.5142857142857142\" data-s=\"300,640\"  data-type=\"png\" data-w=\"210\" style=\"width: 210px !important;visibility: visible !important;\" data-src=\"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/08\/20240801222741954.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-imgfileid=\"100012973\" data-ratio=\"0.5142857142857142\" data-s=\"300,640\"  data-type=\"png\" data-w=\"210\" style=\"width: 210px !important;visibility: visible !important;\" src=\"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/08\/20240801222741954.png\"  \/><\/noscript><\/section>\n<section style=\"margin-bottom: 0px;letter-spacing: 0.578px;text-wrap: wrap;min-height: 1em;text-align: center;line-height: 2em;\"><span style=\"font-size: 16px;\"><strong><span style=\"color: rgb(0, 0, 0);font-family: &quot;Helvetica Neue&quot;;letter-spacing: 0.544px;text-align: start;background-color: rgb(255, 255, 255);\">\u4f5c\u8005\uff1a\u8def\u6761\u7f16\u7a0b\uff08\u8f6c\u8f7d\u8bf7\u83b7\u672c\u516c\u4f17\u53f7\u6388\u6743\uff0c\u5e76\u6ce8\u660e\u4f5c\u8005\u4e0e\u51fa\u5904\uff09<\/span><\/strong><\/span><\/section>\n<p style=\"display: none;\"><mp-style-type data-value=\"3\"><\/mp-style-type><\/p>\n<blockquote>\n<p>\u672c\u7bc7\u6587\u7ae0\u6765\u6e90\u4e8e\u5fae\u4fe1\u516c\u4f17\u53f7:                 \u8def\u6761\u7f16\u7a0b              <\/p>\n<\/blockquote>\n<\/div>\n","raw":"","protected":false},"excerpt":{"rendered":"<p>\u672c\u4e13\u9898\u6df1\u5165\u63a2\u8ba8\u4e8612306\u706b\u8f66\u8d2d\u7968\u7cfb\u7edf\u5728\u9ad8\u5cf0\u671f\u9047\u5230\u7684\u4e00\u7cfb\u5217\u7591\u96be\u6280\u672f\u95ee\u9898\uff0c\u7279\u522b\u805a\u7126\u4e8e\u5982\u4f55\u501f\u52a9Spring Boot 3.x\u7684\u5f3a\u5927\u529f\u80fd &#8230;<\/p>\n","protected":false},"author":1,"featured_media":5781,"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-5823","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\/2024\/08\/20240801222615952-150x150.jpeg","content_first_image":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/08\/20240801222631766.png","post_medium_image_300":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/08\/20240801222615952-300x127.jpeg","post_thumbnail_image_624":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/08\/20240801222615952-1024x434.jpeg","post_frist_image":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/08\/20240801222631766.png","post_medium_image":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/08\/20240801222615952-300x127.jpeg","post_large_image":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/08\/20240801222615952-1024x434.jpeg","post_full_image":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/08\/20240801222615952.jpeg","post_all_images":[{"imagesurl":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/08\/20240801222631766.png","id":"image0"},{"imagesurl":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/08\/20240801222631766.png","id":"image1"},{"imagesurl":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/08\/20240801222720276.jpeg","id":"image2"},{"imagesurl":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/08\/20240801222720276.jpeg","id":"image3"},{"imagesurl":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/08\/20240801222729618.png","id":"image4"},{"imagesurl":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/08\/20240801222729618.png","id":"image5"},{"imagesurl":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/08\/20240801222735588.png","id":"image6"},{"imagesurl":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/08\/20240801222735588.png","id":"image7"},{"imagesurl":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/08\/20240801222741954.png","id":"image8"},{"imagesurl":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/08\/20240801222741954.png","id":"image9"}],"videoAdId":"","listAd":"0","listAdId":"","listAdEvery":6,"total_comments":0,"category_name":"Spring Boot","post_date":"2024-08-01","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":275,"next_post_id":6197,"next_post_title":"SpringBoot+mail \u8f7b\u677e\u5b9e\u73b0\u5404\u7c7b\u90ae\u4ef6\u81ea\u52a8\u63a8\u9001","previous_post_id":5843,"previous_post_title":"Vue\u6253\u5305\u6587\u4ef6dist\u653e\u5728SpringBoot\u9879\u76ee\u4e0b\u8fd0\u884c\uff08\u6b63\u786e\u5b9e\u73b0\u5168\u8fc7\u7a0b\uff09","_links":{"self":[{"href":"https:\/\/xinchewhd.com.cn\/index.php\/wp-json\/wp\/v2\/posts\/5823","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\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/xinchewhd.com.cn\/index.php\/wp-json\/wp\/v2\/comments?post=5823"}],"version-history":[{"count":1,"href":"https:\/\/xinchewhd.com.cn\/index.php\/wp-json\/wp\/v2\/posts\/5823\/revisions"}],"predecessor-version":[{"id":6273,"href":"https:\/\/xinchewhd.com.cn\/index.php\/wp-json\/wp\/v2\/posts\/5823\/revisions\/6273"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/xinchewhd.com.cn\/index.php\/wp-json\/wp\/v2\/media\/5781"}],"wp:attachment":[{"href":"https:\/\/xinchewhd.com.cn\/index.php\/wp-json\/wp\/v2\/media?parent=5823"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/xinchewhd.com.cn\/index.php\/wp-json\/wp\/v2\/categories?post=5823"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/xinchewhd.com.cn\/index.php\/wp-json\/wp\/v2\/tags?post=5823"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}