{"id":1949,"date":"2023-06-19T17:49:49","date_gmt":"2023-06-19T09:49:49","guid":{"rendered":"https:\/\/xinchewhd.com.cn\/?p=1949"},"modified":"2023-06-19T17:49:49","modified_gmt":"2023-06-19T09:49:49","slug":"spring-%e4%b9%8b-%e4%ba%8b%e5%8a%a1%e5%a4%b1%e8%b4%a5%e7%9a%84%e5%87%a0%e7%a7%8d%e5%b8%b8%e8%a7%81%e5%9c%ba%e6%99%af","status":"publish","type":"post","link":"https:\/\/xinchewhd.com.cn\/index.php\/java\/spring-%e4%b9%8b-%e4%ba%8b%e5%8a%a1%e5%a4%b1%e8%b4%a5%e7%9a%84%e5%87%a0%e7%a7%8d%e5%b8%b8%e8%a7%81%e5%9c%ba%e6%99%af\/","title":{"rendered":"Spring \u4e4b \u4e8b\u52a1\u5931\u8d25\u7684\u51e0\u79cd\u5e38\u89c1\u573a\u666f"},"content":{"rendered":"<div class=\"wxsyncmain\">\n<p style=\"margin-bottom: 0px;\"><strong style=\"outline: 0px; max-width: 100%; text-align: left; white-space: normal; color: #222222; font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Helvetica Neue', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei UI', 'Microsoft YaHei', Arial, sans-serif; font-size: 14px; letter-spacing: 0.544px; background-color: #ffffff; visibility: visible; box-sizing: border-box !important; overflow-wrap: break-word !important;\"><span style=\"outline: 0px; max-width: 100%; color: #ff0000; visibility: visible; box-sizing: border-box !important; overflow-wrap: break-word !important;\">\u6b22\u8fce\u5173\u6ce8\u672c\u516c\u4f17\u53f7\uff1a<\/span><\/strong><\/p>\n<section><\/section>\n<p style=\"margin-bottom: 0px;\"><strong style=\"outline: 0px; max-width: 100%; text-align: left; white-space: normal; color: #222222; font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Helvetica Neue', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei UI', 'Microsoft YaHei', Arial, sans-serif; font-size: 14px; letter-spacing: 0.544px; background-color: #ffffff; visibility: visible; box-sizing: border-box !important; overflow-wrap: break-word !important;\"><span style=\"outline: 0px; max-width: 100%; color: #ff0000; visibility: visible; box-sizing: border-box !important; overflow-wrap: break-word !important;\">\u672c\u6587\u6574\u7406\u81ea\uff1a<\/span><\/strong><\/p>\n<section><\/section>\n<h2 style=\"margin: 1em auto; padding-left: 10px; outline: 0px; font-weight: bold; font-size: 22px; max-width: 100%; font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, 'PingFang SC', Cambria, Cochin, Georgia, Times, 'Times New Roman', serif; text-align: left; white-space: normal; background-color: #ffffff; color: #009688; border-left: 3px solid #009688; visibility: visible; box-sizing: border-box !important; overflow-wrap: break-word !important;\" data-tool=\"mdnice\u7f16\u8f91\u5668\"><span style=\"outline: 0px; max-width: 100%; visibility: visible; box-sizing: border-box !important; overflow-wrap: break-word !important;\">\u6982\u8ff0<\/span><\/h2>\n<p style=\"margin-bottom: 0px; padding-top: 8px; padding-bottom: 8px; outline: 0px; max-width: 100%; color: #000000; font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, 'PingFang SC', Cambria, Cochin, Georgia, Times, 'Times New Roman', serif; font-size: 16px; white-space: normal; background-color: #ffffff; line-height: 26px; visibility: visible; box-sizing: border-box !important; overflow-wrap: break-word !important;\" data-tool=\"mdnice\u7f16\u8f91\u5668\">Spring\u9488\u5bf9Java Transaction API (JTA)\u3001JDBC\u3001Hibernate\u548cJava Persistence API(JPA)\u7b49\u4e8b\u52a1 API\uff0c\u5b9e\u73b0\u4e86\u4e00\u81f4\u7684\u7f16\u7a0b\u6a21\u578b\uff0c\u800cSpring\u7684\u58f0\u660e\u5f0f\u4e8b\u52a1\u529f\u80fd\u66f4\u662f\u63d0\u4f9b\u4e86\u6781\u5176\u65b9\u4fbf\u7684\u4e8b\u52a1\u914d\u7f6e\u65b9\u5f0f\uff0c\u914d\u5408Spring Boot\u7684\u81ea\u52a8\u914d\u7f6e\uff0c\u5927\u591a\u6570Spring Boot\u9879\u76ee\u53ea\u9700\u8981\u5728\u65b9\u6cd5\u4e0a\u6807\u8bb0<code style=\"margin-right: 2px; margin-left: 2px; padding: 2px 4px; outline: 0px; max-width: 100%; font-size: 14px; border-radius: 4px; background-color: rgba(27, 31, 35, 0.05); font-family: 'Operator Mono', Consolas, Monaco, Menlo, monospace; word-break: break-all; color: #009688; visibility: visible; box-sizing: border-box !important; overflow-wrap: break-word !important;\">@Transactional<\/code>\u6ce8\u89e3\uff0c\u5373\u53ef\u4e00\u952e\u5f00\u542f\u65b9\u6cd5\u7684\u4e8b\u52a1\u6027\u914d\u7f6e\u3002<\/p>\n<p style=\"margin-bottom: 0px; padding-top: 8px; padding-bottom: 8px; outline: 0px; max-width: 100%; color: #000000; font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, 'PingFang SC', Cambria, Cochin, Georgia, Times, 'Times New Roman', serif; font-size: 16px; white-space: normal; background-color: #ffffff; line-height: 26px; visibility: visible; box-sizing: border-box !important; overflow-wrap: break-word !important;\" data-tool=\"mdnice\u7f16\u8f91\u5668\">\u4f46\u662f\uff0c\u4e8b\u52a1\u5982\u679c\u6ca1\u6709\u88ab\u6b63\u786e\u51fa\uff0c\u5f88\u6709\u53ef\u80fd\u4f1a\u5bfc\u81f4\u4e8b\u52a1\u7684\u5931\u6548\uff0c\u5e26\u6765\u610f\u60f3\u4e0d\u5230\u7684\u6570\u636e\u4e0d\u4e00\u81f4\u95ee\u9898\uff0c\u968f\u540e\u5c31\u662f\u5927\u91cf\u7684\u4eba\u5de5\u63a5\u5165\u67e5\u770b\u548c\u4fee\u590d\u6570\u636e\uff0c\u8be5\u7bc7\u4e3b\u8981\u5206\u4eabSpring\u4e8b\u52a1\u5728\u6280\u672f\u4e0a\u7684\u6b63\u786e\u4f7f\u7528\u65b9\u5f0f\uff0c\u907f\u514d\u56e0\u4e3a\u4e8b\u52a1\u5904\u7406\u4e0d\u5f53\u5bfc\u81f4\u4e1a\u52a1\u903b\u8f91\u4ea7\u751f\u5927\u91cf\u5076\u53d1\u6027BUG\u3002<\/p>\n<p style=\"margin-bottom: 0px; padding-top: 8px; padding-bottom: 8px; outline: 0px; max-width: 100%; color: #000000; font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, 'PingFang SC', Cambria, Cochin, Georgia, Times, 'Times New Roman', serif; font-size: 16px; white-space: normal; background-color: #ffffff; line-height: 26px; visibility: visible; box-sizing: border-box !important; overflow-wrap: break-word !important;\" data-tool=\"mdnice\u7f16\u8f91\u5668\">\u5728\u5206\u6790\u4e8b\u52a1\u5931\u6548\u7684\u5e38\u89c1\u573a\u666f\u4e4b\u524d\uff0c\u6211\u4eec\u5148\u6765\u4e86\u89e3\u4e00\u4e0b\uff1a\u4e8b\u52a1\u7684\u4f20\u64ad\u7c7b\u578b \u548c\u00a0<code style=\"margin-right: 2px; margin-left: 2px; padding: 2px 4px; outline: 0px; max-width: 100%; font-size: 14px; border-radius: 4px; background-color: rgba(27, 31, 35, 0.05); font-family: 'Operator Mono', Consolas, Monaco, Menlo, monospace; word-break: break-all; color: #009688; visibility: visible; box-sizing: border-box !important; overflow-wrap: break-word !important;\">@Transactionnal<\/code>\u00a0\u6ce8\u89e3\u7684\u4e0d\u540c\u5c5e\u6027\u7684\u542b\u4e49\u3002<\/p>\n<h4 style=\"margin: 0.6em auto; padding-left: 10px; outline: 0px; font-weight: bold; font-size: 1.2em; max-width: 100%; color: #000000; font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, 'PingFang SC', Cambria, Cochin, Georgia, Times, 'Times New Roman', serif; text-align: left; white-space: normal; background-color: #ffffff; border-left: 2px dashed #009688; visibility: visible; box-sizing: border-box !important; overflow-wrap: break-word !important;\" data-tool=\"mdnice\u7f16\u8f91\u5668\"><span style=\"outline: 0px; max-width: 100%; visibility: visible; box-sizing: border-box !important; overflow-wrap: break-word !important;\">\u4e8b\u52a1\u7684\u4f20\u64ad\u7c7b\u578b<\/span><\/h4>\n<pre style=\"margin-top: 10px; margin-bottom: 10px; outline: 0px; max-width: 100%; color: #000000; font-size: 16px; text-align: left; background-color: #ffffff; border-radius: 5px; box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px; visibility: visible; box-sizing: border-box !important; overflow-wrap: break-word !important;\" data-tool=\"mdnice\u7f16\u8f91\u5668\"><code style=\"padding: 15px 16px 16px; outline: 0px; max-width: 100%; overflow-x: auto; color: #abb2bf; display: -webkit-box; font-family: 'Operator Mono', Consolas, Monaco, Menlo, monospace; font-size: 12px; background: #282c34; border-radius: 5px; visibility: visible; box-sizing: border-box !important; overflow-wrap: break-word !important;\"><span style=\"outline: 0px; max-width: 100%; color: #5c6370; font-style: italic; line-height: 26px; visibility: visible; box-sizing: border-box !important; overflow-wrap: break-word !important;\">\/\/\u5982\u679c\u6709\u4e8b\u52a1,\u00a0\u90a3\u4e48\u52a0\u5165\u4e8b\u52a1,\u00a0\u6ca1\u6709\u7684\u8bdd\u65b0\u5efa\u4e00\u4e2a(\u9ed8\u8ba4)<\/span><br style=\"outline: 0px; max-width: 100%; visibility: visible; box-sizing: border-box !important; overflow-wrap: break-word !important;\" \/><span style=\"outline: 0px; max-width: 100%; color: #61aeee; line-height: 26px; visibility: visible; box-sizing: border-box !important; overflow-wrap: break-word !important;\">@Transactional<\/span>(propagation=Propagation.REQUIRED)<br style=\"outline: 0px; max-width: 100%; visibility: visible; box-sizing: border-box !important; overflow-wrap: break-word !important;\" \/><span style=\"outline: 0px; max-width: 100%; color: #5c6370; font-style: italic; line-height: 26px; visibility: visible; box-sizing: border-box !important; overflow-wrap: break-word !important;\">\/\/\u5bb9\u5668\u4e0d\u4e3a\u8fd9\u4e2a\u65b9\u6cd5\u5f00\u542f\u4e8b\u52a1\u00a0<\/span><br style=\"outline: 0px; max-width: 100%; visibility: visible; box-sizing: border-box !important; overflow-wrap: break-word !important;\" \/><span style=\"outline: 0px; max-width: 100%; color: #61aeee; line-height: 26px; visibility: visible; box-sizing: border-box !important; overflow-wrap: break-word !important;\">@Transactional<\/span>(propagation=Propagation.NOT_SUPPORTED)<br style=\"outline: 0px; max-width: 100%; visibility: visible; box-sizing: border-box !important; overflow-wrap: break-word !important;\" \/><span style=\"outline: 0px; max-width: 100%; color: #5c6370; font-style: italic; line-height: 26px; visibility: visible; box-sizing: border-box !important; overflow-wrap: break-word !important;\">\/\/\u4e0d\u7ba1\u662f\u5426\u5b58\u5728\u4e8b\u52a1,\u00a0\u90fd\u521b\u5efa\u4e00\u4e2a\u65b0\u7684\u4e8b\u52a1,\u00a0\u539f\u6765\u7684\u6302\u8d77,\u00a0\u65b0\u7684\u6267\u884c\u5b8c\u6bd5,\u00a0\u7ee7\u7eed\u6267\u884c\u8001\u7684\u4e8b\u52a1\u00a0<\/span><br style=\"outline: 0px; max-width: 100%; visibility: visible; box-sizing: border-box !important; overflow-wrap: break-word !important;\" \/><span style=\"outline: 0px; max-width: 100%; color: #61aeee; line-height: 26px; visibility: visible; box-sizing: border-box !important; overflow-wrap: break-word !important;\">@Transactional<\/span>(propagation=Propagation.REQUIRES_NEW)\u00a0<br style=\"outline: 0px; max-width: 100%; visibility: visible; box-sizing: border-box !important; overflow-wrap: break-word !important;\" \/><span style=\"outline: 0px; max-width: 100%; color: #5c6370; font-style: italic; line-height: 26px; visibility: visible; box-sizing: border-box !important; overflow-wrap: break-word !important;\">\/\/\u5fc5\u987b\u5728\u4e00\u4e2a\u5df2\u6709\u7684\u4e8b\u52a1\u4e2d\u6267\u884c,\u00a0\u5426\u5219\u629b\u51fa\u5f02\u5e38<\/span><br style=\"outline: 0px; max-width: 100%; visibility: visible; box-sizing: border-box !important; overflow-wrap: break-word !important;\" \/><span style=\"outline: 0px; max-width: 100%; color: #61aeee; line-height: 26px; visibility: visible; box-sizing: border-box !important; overflow-wrap: break-word !important;\">@Transactional<\/span>(propagation=Propagation.MANDATORY)\u00a0<br style=\"outline: 0px; max-width: 100%; visibility: visible; box-sizing: border-box !important; overflow-wrap: break-word !important;\" \/><span style=\"outline: 0px; max-width: 100%; color: #5c6370; font-style: italic; line-height: 26px; visibility: visible; box-sizing: border-box !important; overflow-wrap: break-word !important;\">\/\/\u5fc5\u987b\u5728\u4e00\u4e2a\u6ca1\u6709\u7684\u4e8b\u52a1\u4e2d\u6267\u884c,\u00a0\u5426\u5219\u629b\u51fa\u5f02\u5e38(\u4e0ePropagation.MANDATORY\u76f8\u53cd)<\/span><br style=\"outline: 0px; max-width: 100%; visibility: visible; box-sizing: border-box !important; overflow-wrap: break-word !important;\" \/><span style=\"outline: 0px; max-width: 100%; color: #61aeee; line-height: 26px; visibility: visible; box-sizing: border-box !important; overflow-wrap: break-word !important;\">@Transactional<\/span>(propagation=Propagation.NEVER)\u00a0<br style=\"outline: 0px; max-width: 100%; visibility: visible; box-sizing: border-box !important; overflow-wrap: break-word !important;\" \/><span style=\"outline: 0px; max-width: 100%; color: #5c6370; font-style: italic; line-height: 26px; visibility: visible; box-sizing: border-box !important; overflow-wrap: break-word !important;\">\/\/\u5982\u679c\u5176\u4ed6bean\u8c03\u7528\u8fd9\u4e2a\u65b9\u6cd5,\u00a0\u5728\u5176\u4ed6bean\u4e2d\u58f0\u660e\u4e8b\u52a1,\u00a0\u90a3\u5c31\u7528\u4e8b\u52a1,\u00a0\u5982\u679c\u5176\u4ed6bean\u6ca1\u6709\u58f0\u660e\u4e8b\u52a1,\u00a0\u90a3\u5c31\u4e0d\u7528\u4e8b\u52a1<\/span><br style=\"outline: 0px; max-width: 100%; visibility: visible; box-sizing: border-box !important; overflow-wrap: break-word !important;\" \/><span style=\"outline: 0px; max-width: 100%; color: #61aeee; line-height: 26px; visibility: visible; box-sizing: border-box !important; overflow-wrap: break-word !important;\">@Transactional<\/span>(propagation=Propagation.SUPPORTS)\u00a0<br style=\"outline: 0px; max-width: 100%; visibility: visible; box-sizing: border-box !important; overflow-wrap: break-word !important;\" \/><\/code><\/pre>\n<h4 style=\"margin: 0.6em auto; padding-left: 10px; outline: 0px; font-weight: bold; font-size: 1.2em; max-width: 100%; color: #000000; font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, 'PingFang SC', Cambria, Cochin, Georgia, Times, 'Times New Roman', serif; text-align: left; white-space: normal; background-color: #ffffff; border-left: 2px dashed #009688; visibility: visible; box-sizing: border-box !important; overflow-wrap: break-word !important;\" data-tool=\"mdnice\u7f16\u8f91\u5668\"><span style=\"outline: 0px; max-width: 100%; visibility: visible; box-sizing: border-box !important; overflow-wrap: break-word !important;\">isolation<\/span><\/h4>\n<p style=\"margin-bottom: 0px; padding-top: 8px; padding-bottom: 8px; outline: 0px; max-width: 100%; color: #000000; font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, 'PingFang SC', Cambria, Cochin, Georgia, Times, 'Times New Roman', serif; font-size: 16px; white-space: normal; background-color: #ffffff; line-height: 26px; visibility: visible; box-sizing: border-box !important; overflow-wrap: break-word !important;\" data-tool=\"mdnice\u7f16\u8f91\u5668\">\u8be5\u5c5e\u6027\u7528\u4e8e\u8bbe\u7f6e\u5e95\u5c42\u6570\u636e\u5e93\u7684\u4e8b\u52a1\u9694\u79bb\u7ea7\u522b\uff0c\u4e8b\u52a1\u7684\u9694\u79bb\u7ea7\u522b\u4ecb\u7ecd\uff1a<\/p>\n<pre style=\"margin-top: 10px; margin-bottom: 10px; outline: 0px; max-width: 100%; color: #000000; font-size: 16px; text-align: left; background-color: #ffffff; border-radius: 5px; box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px; box-sizing: border-box !important; overflow-wrap: break-word !important;\" data-tool=\"mdnice\u7f16\u8f91\u5668\"><code style=\"padding: 15px 16px 16px; outline: 0px; max-width: 100%; overflow-x: auto; color: #abb2bf; display: -webkit-box; font-family: 'Operator Mono', Consolas, Monaco, Menlo, monospace; font-size: 12px; background: #282c34; border-radius: 5px; box-sizing: border-box !important; overflow-wrap: break-word !important;\"><span style=\"outline: 0px; max-width: 100%; color: #5c6370; font-style: italic; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\">\/\/\u00a0\u8bfb\u53d6\u672a\u63d0\u4ea4\u6570\u636e(\u4f1a\u51fa\u73b0\u810f\u8bfb,\u00a0\u4e0d\u53ef\u91cd\u590d\u8bfb)\u00a0\u57fa\u672c\u4e0d\u4f7f\u7528<\/span><br style=\"outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;\" \/><span style=\"outline: 0px; max-width: 100%; color: #61aeee; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\">@Transactional<\/span>(isolation\u00a0=\u00a0Isolation.READ_UNCOMMITTED)<br style=\"outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;\" \/><span style=\"outline: 0px; max-width: 100%; color: #5c6370; font-style: italic; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\">\/\/\u00a0\u8bfb\u53d6\u5df2\u63d0\u4ea4\u6570\u636e(\u4f1a\u51fa\u73b0\u4e0d\u53ef\u91cd\u590d\u8bfb\u548c\u5e7b\u8bfb)\u00a0Oracle\u9ed8\u8ba4<\/span><br style=\"outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;\" \/><span style=\"outline: 0px; max-width: 100%; color: #61aeee; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\">@Transactional<\/span>(isolation\u00a0=\u00a0Isolation.READ_COMMITTED)<br style=\"outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;\" \/><span style=\"outline: 0px; max-width: 100%; color: #5c6370; font-style: italic; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\">\/\/\u00a0\u53ef\u91cd\u590d\u8bfb(\u4f1a\u51fa\u73b0\u5e7b\u8bfb)\u00a0MySQL\u9ed8\u8ba4<\/span><br style=\"outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;\" \/><span style=\"outline: 0px; max-width: 100%; color: #61aeee; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\">@Transactional<\/span>(isolation\u00a0=\u00a0Isolation.REPEATABLE_READ)<br style=\"outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;\" \/><span style=\"outline: 0px; max-width: 100%; color: #5c6370; font-style: italic; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\">\/\/\u00a0\u4e32\u884c\u5316<\/span><br style=\"outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;\" \/><span style=\"outline: 0px; max-width: 100%; color: #61aeee; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\">@Transactional<\/span>(isolation\u00a0=\u00a0Isolation.SERIALIZABLE)<br style=\"outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;\" \/><\/code><\/pre>\n<h4 style=\"margin: 0.6em auto; padding-left: 10px; outline: 0px; font-weight: bold; font-size: 1.2em; max-width: 100%; color: #000000; font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, 'PingFang SC', Cambria, Cochin, Georgia, Times, 'Times New Roman', serif; text-align: left; white-space: normal; background-color: #ffffff; border-left: 2px dashed #009688; box-sizing: border-box !important; overflow-wrap: break-word !important;\" data-tool=\"mdnice\u7f16\u8f91\u5668\"><span style=\"outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;\">@Transactionnal\u6ce8\u89e3\u5c5e\u6027<\/span><\/h4>\n<p style=\"margin-bottom: 0px; padding-top: 8px; padding-bottom: 8px; outline: 0px; max-width: 100%; color: #000000; font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, 'PingFang SC', Cambria, Cochin, Georgia, Times, 'Times New Roman', serif; font-size: 16px; white-space: normal; background-color: #ffffff; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\" data-tool=\"mdnice\u7f16\u8f91\u5668\"><code style=\"margin-right: 2px; margin-left: 2px; padding: 2px 4px; outline: 0px; max-width: 100%; font-size: 14px; border-radius: 4px; background-color: rgba(27, 31, 35, 0.05); font-family: 'Operator Mono', Consolas, Monaco, Menlo, monospace; word-break: break-all; color: #009688; box-sizing: border-box !important; overflow-wrap: break-word !important;\">@Transactional<\/code>\u6ce8\u89e3\u53ef\u4ee5\u4f5c\u7528\u4e8e\u63a5\u53e3\u3001\u63a5\u53e3\u65b9\u6cd5\u3001\u7c7b\u4ee5\u53ca\u7c7b\u65b9\u6cd5\u4e0a\uff0c\u5b83\u53ef\u4ee5\u901a\u8fc7\u4e0d\u540c\u7684\u53c2\u6570\u6765\u9009\u62e9\u4ec0\u4e48\u7c7b\u578bException\u5f02\u5e38\u4e0b\u6267\u884c\u56de\u6eda\u6216\u8005\u4e0d\u56de\u6eda\u64cd\u4f5c\u3002<\/p>\n<figure style=\"margin-top: 10px; margin-bottom: 10px; outline: 0px; max-width: 100%; color: #000000; font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, 'PingFang SC', Cambria, Cochin, Georgia, Times, 'Times New Roman', serif; font-size: 16px; text-align: left; white-space: normal; background-color: #ffffff; display: flex; flex-direction: column; justify-content: center; align-items: center; box-sizing: border-box !important; overflow-wrap: break-word !important;\" data-tool=\"mdnice\u7f16\u8f91\u5668\"><img decoding=\"async\" class=\"rich_pages wxw-img lazyload\" style=\"margin-right: auto; margin-left: auto; outline: 0px; display: block; box-sizing: border-box !important; overflow-wrap: break-word !important; width: 677px !important; visibility: visible !important; height: auto !important;\" data-src=\"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2023\/05\/20230528050408634.png\" src=\"https:\/\/s.nmxc.ltd\/sakurairo_vision\/@2.6\/load_svg\/inload.svg\" onerror=\"imgError(this)\" data-ratio=\"0.524300441826215\" data-type=\"png\" data-w=\"679\" \/><noscript><img decoding=\"async\" class=\"rich_pages wxw-img\" style=\"margin-right: auto; margin-left: auto; outline: 0px; display: block; box-sizing: border-box !important; overflow-wrap: break-word !important; width: 677px !important; visibility: visible !important; height: auto !important;\" src=\"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2023\/05\/20230528050408634.png\" data-ratio=\"0.524300441826215\" data-type=\"png\" data-w=\"679\" \/><\/noscript><\/figure>\n<h2 style=\"margin: 1em auto; padding-left: 10px; outline: 0px; font-weight: bold; font-size: 22px; max-width: 100%; font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, 'PingFang SC', Cambria, Cochin, Georgia, Times, 'Times New Roman', serif; text-align: left; white-space: normal; background-color: #ffffff; color: #009688; border-left: 3px solid #009688; box-sizing: border-box !important; overflow-wrap: break-word !important;\" data-tool=\"mdnice\u7f16\u8f91\u5668\"><span style=\"outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;\">Spring\u4e8b\u52a1\u5931\u6548\u7684\u573a\u666f<\/span><\/h2>\n<h4 style=\"margin: 0.6em auto; padding-left: 10px; outline: 0px; font-weight: bold; font-size: 1.2em; max-width: 100%; color: #000000; font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, 'PingFang SC', Cambria, Cochin, Georgia, Times, 'Times New Roman', serif; text-align: left; white-space: normal; background-color: #ffffff; border-left: 2px dashed #009688; box-sizing: border-box !important; overflow-wrap: break-word !important;\" data-tool=\"mdnice\u7f16\u8f91\u5668\"><span style=\"outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;\">1. \u4e8b\u52a1\u65b9\u6cd5\u672a\u88abSpring\u7ba1\u7406<\/span><\/h4>\n<p style=\"margin-bottom: 0px; padding-top: 8px; padding-bottom: 8px; outline: 0px; max-width: 100%; color: #000000; font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, 'PingFang SC', Cambria, Cochin, Georgia, Times, 'Times New Roman', serif; font-size: 16px; white-space: normal; background-color: #ffffff; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\" data-tool=\"mdnice\u7f16\u8f91\u5668\">\u5982\u679c\u4e8b\u52a1\u65b9\u6cd5\u6240\u5728\u7684\u7c7b\u6ca1\u6709\u6ce8\u518c\u5230Spring IOC\u5bb9\u5668\u4e2d\uff0c\u4e5f\u5c31\u662f\u8bf4\uff0c\u4e8b\u52a1\u65b9\u6cd5\u6240\u5728\u7c7b\u5e76\u6ca1\u6709\u88abSpring\u7ba1\u7406\uff0c\u5219Spring\u4e8b\u52a1\u4f1a\u5931\u6548\uff0c\u4e3e\u4e2a\u4f8b\u5b50?\uff1a<\/p>\n<pre style=\"margin-top: 10px; margin-bottom: 10px; outline: 0px; max-width: 100%; color: #000000; font-size: 16px; text-align: left; background-color: #ffffff; border-radius: 5px; box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px; box-sizing: border-box !important; overflow-wrap: break-word !important;\" data-tool=\"mdnice\u7f16\u8f91\u5668\"><code style=\"padding: 15px 16px 16px; outline: 0px; max-width: 100%; overflow-x: auto; color: #abb2bf; display: -webkit-box; font-family: 'Operator Mono', Consolas, Monaco, Menlo, monospace; font-size: 12px; background: #282c34; border-radius: 5px; box-sizing: border-box !important; overflow-wrap: break-word !important;\"><span style=\"outline: 0px; max-width: 100%; color: #5c6370; font-style: italic; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\">\/**<br style=\"outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;\" \/>\u00a0*\u00a0\u5546\u54c1\u4e1a\u52a1\u5b9e\u73b0\u5c42<br style=\"outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;\" \/>\u00a0*<br style=\"outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;\" \/>\u00a0*\u00a0<span style=\"outline: 0px; max-width: 100%; color: #c678dd; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\">@author<\/span>:\u00a0austin<br style=\"outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;\" \/>\u00a0*\u00a0<span style=\"outline: 0px; max-width: 100%; color: #c678dd; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\">@since<\/span>:\u00a02023\/2\/10\u00a014:19<br style=\"outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;\" \/>\u00a0*\/<\/span><br style=\"outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;\" \/><span style=\"outline: 0px; max-width: 100%; color: #c678dd; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\">public<\/span>\u00a0<span style=\"outline: 0px; max-width: 100%; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\"><span style=\"outline: 0px; max-width: 100%; color: #c678dd; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\">class<\/span>\u00a0<span style=\"outline: 0px; max-width: 100%; color: #e6c07b; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\">ProductServiceImpl<\/span>\u00a0<span style=\"outline: 0px; max-width: 100%; color: #c678dd; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\">extends<\/span>\u00a0<span style=\"outline: 0px; max-width: 100%; color: #e6c07b; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\">ServiceImpl<\/span>&lt;<span style=\"outline: 0px; max-width: 100%; color: #e6c07b; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\">ProductMapper<\/span>,\u00a0<span style=\"outline: 0px; max-width: 100%; color: #e6c07b; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\">Product<\/span>&gt;\u00a0<span style=\"outline: 0px; max-width: 100%; color: #c678dd; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\">implements<\/span>\u00a0<span style=\"outline: 0px; max-width: 100%; color: #e6c07b; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\">IProductService<\/span>\u00a0<\/span>{<br style=\"outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;\" \/><br style=\"outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;\" \/>\u00a0\u00a0\u00a0\u00a0<span style=\"outline: 0px; max-width: 100%; color: #61aeee; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\">@Autowired<\/span><br style=\"outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;\" \/>\u00a0\u00a0\u00a0\u00a0<span style=\"outline: 0px; max-width: 100%; color: #c678dd; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\">private<\/span>\u00a0ProductMapper\u00a0productMapper;<br style=\"outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;\" \/><br style=\"outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;\" \/>\u00a0\u00a0\u00a0\u00a0<span style=\"outline: 0px; max-width: 100%; color: #61aeee; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\">@Override<\/span><br style=\"outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;\" \/>\u00a0\u00a0\u00a0\u00a0<span style=\"outline: 0px; max-width: 100%; color: #61aeee; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\">@Transactional<\/span>(propagation\u00a0=\u00a0Propagation.REQUIRES_NEW)<br style=\"outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;\" \/>\u00a0\u00a0\u00a0\u00a0<span style=\"outline: 0px; max-width: 100%; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\"><span style=\"outline: 0px; max-width: 100%; color: #c678dd; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\">public<\/span>\u00a0<span style=\"outline: 0px; max-width: 100%; color: #c678dd; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\">void<\/span>\u00a0<span style=\"outline: 0px; max-width: 100%; color: #61aeee; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\">updateProductStockById<\/span><span style=\"outline: 0px; max-width: 100%; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\">(Integer\u00a0stockCount,\u00a0Long\u00a0productId)<\/span>\u00a0<\/span>{<br style=\"outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;\" \/>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0productMapper.updateProductStockById(stockCount,\u00a0productId);<br style=\"outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;\" \/>\u00a0\u00a0\u00a0\u00a0}<br style=\"outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;\" \/>}<br style=\"outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;\" \/><\/code><\/pre>\n<p style=\"margin-bottom: 0px; padding-top: 8px; padding-bottom: 8px; outline: 0px; max-width: 100%; color: #000000; font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, 'PingFang SC', Cambria, Cochin, Georgia, Times, 'Times New Roman', serif; font-size: 16px; white-space: normal; background-color: #ffffff; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\" data-tool=\"mdnice\u7f16\u8f91\u5668\"><code style=\"margin-right: 2px; margin-left: 2px; padding: 2px 4px; outline: 0px; max-width: 100%; font-size: 14px; border-radius: 4px; background-color: rgba(27, 31, 35, 0.05); font-family: 'Operator Mono', Consolas, Monaco, Menlo, monospace; word-break: break-all; color: #009688; box-sizing: border-box !important; overflow-wrap: break-word !important;\">ProductServiceImpl<\/code>\u5b9e\u73b0\u7c7b\u4e0a\u6ca1\u6709\u6dfb\u52a0<code style=\"margin-right: 2px; margin-left: 2px; padding: 2px 4px; outline: 0px; max-width: 100%; font-size: 14px; border-radius: 4px; background-color: rgba(27, 31, 35, 0.05); font-family: 'Operator Mono', Consolas, Monaco, Menlo, monospace; word-break: break-all; color: #009688; box-sizing: border-box !important; overflow-wrap: break-word !important;\">@Service<\/code>\u6ce8\u89e3\uff0cProduct\u7684\u5b9e\u4f8b\u4e5f\u5c31\u6ca1\u6709\u88ab\u52a0\u8f7d\u5230Spring IOC\u5bb9\u5668\uff0c\u6b64\u65f6<code style=\"margin-right: 2px; margin-left: 2px; padding: 2px 4px; outline: 0px; max-width: 100%; font-size: 14px; border-radius: 4px; background-color: rgba(27, 31, 35, 0.05); font-family: 'Operator Mono', Consolas, Monaco, Menlo, monospace; word-break: break-all; color: #009688; box-sizing: border-box !important; overflow-wrap: break-word !important;\">updateProductStockById()<\/code>\u65b9\u6cd5\u7684\u4e8b\u52a1\u5c31\u4f1a\u5728Spring\u4e2d\u5931\u6548\u3002<\/p>\n<h4 style=\"margin: 0.6em auto; padding-left: 10px; outline: 0px; font-weight: bold; font-size: 1.2em; max-width: 100%; color: #000000; font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, 'PingFang SC', Cambria, Cochin, Georgia, Times, 'Times New Roman', serif; text-align: left; white-space: normal; background-color: #ffffff; border-left: 2px dashed #009688; box-sizing: border-box !important; overflow-wrap: break-word !important;\" data-tool=\"mdnice\u7f16\u8f91\u5668\"><span style=\"outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;\">2. \u65b9\u6cd5\u4f7f\u7528final\u7c7b\u578b\u4fee\u9970<\/span><\/h4>\n<p style=\"margin-bottom: 0px; padding-top: 8px; padding-bottom: 8px; outline: 0px; max-width: 100%; color: #000000; font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, 'PingFang SC', Cambria, Cochin, Georgia, Times, 'Times New Roman', serif; font-size: 16px; white-space: normal; background-color: #ffffff; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\" data-tool=\"mdnice\u7f16\u8f91\u5668\">\u6709\u65f6\u5019\uff0c\u67d0\u4e2a\u65b9\u6cd5\u4e0d\u60f3\u88ab\u5b50\u7c7b\u91cd\u65b0\uff0c\u8fd9\u65f6\u53ef\u4ee5\u5c06\u8be5\u65b9\u6cd5\u5b9a\u4e49\u6210final\u7684\u3002\u666e\u901a\u65b9\u6cd5\u8fd9\u6837\u5b9a\u4e49\u662f\u6ca1\u95ee\u9898\u7684\uff0c\u4f46\u5982\u679c\u5c06\u4e8b\u52a1\u65b9\u6cd5\u5b9a\u4e49\u6210final\uff0c\u4f8b\u5982\uff1a<\/p>\n<pre style=\"margin-top: 10px; margin-bottom: 10px; outline: 0px; max-width: 100%; color: #000000; font-size: 16px; text-align: left; background-color: #ffffff; border-radius: 5px; box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px; box-sizing: border-box !important; overflow-wrap: break-word !important;\" data-tool=\"mdnice\u7f16\u8f91\u5668\"><code style=\"padding: 15px 16px 16px; outline: 0px; max-width: 100%; overflow-x: auto; color: #abb2bf; display: -webkit-box; font-family: 'Operator Mono', Consolas, Monaco, Menlo, monospace; font-size: 12px; background: #282c34; border-radius: 5px; box-sizing: border-box !important; overflow-wrap: break-word !important;\"><span style=\"outline: 0px; max-width: 100%; color: #61aeee; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\">@Service<\/span><br style=\"outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;\" \/><span style=\"outline: 0px; max-width: 100%; color: #c678dd; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\">public<\/span>\u00a0<span style=\"outline: 0px; max-width: 100%; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\"><span style=\"outline: 0px; max-width: 100%; color: #c678dd; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\">class<\/span>\u00a0<span style=\"outline: 0px; max-width: 100%; color: #e6c07b; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\">OrderServiceImpl<\/span>\u00a0<\/span>{<br style=\"outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;\" \/><br style=\"outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;\" \/>\u00a0\u00a0\u00a0\u00a0<span style=\"outline: 0px; max-width: 100%; color: #61aeee; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\">@Transactional<\/span><br style=\"outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;\" \/>\u00a0\u00a0\u00a0\u00a0<span style=\"outline: 0px; max-width: 100%; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\"><span style=\"outline: 0px; max-width: 100%; color: #c678dd; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\">public<\/span>\u00a0<span style=\"outline: 0px; max-width: 100%; color: #c678dd; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\">final<\/span>\u00a0<span style=\"outline: 0px; max-width: 100%; color: #c678dd; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\">void<\/span>\u00a0<span style=\"outline: 0px; max-width: 100%; color: #61aeee; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\">cancel<\/span><span style=\"outline: 0px; max-width: 100%; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\">(OrderDTO\u00a0orderDTO)<\/span>\u00a0<\/span>{<br style=\"outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;\" \/>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<span style=\"outline: 0px; max-width: 100%; color: #5c6370; font-style: italic; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\">\/\/\u00a0\u53d6\u6d88\u8ba2\u5355<\/span><br style=\"outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;\" \/>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0cancelOrder(orderDTO);<br style=\"outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;\" \/>\u00a0\u00a0\u00a0\u00a0}<br style=\"outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;\" \/>}<br style=\"outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;\" \/><\/code><\/pre>\n<p style=\"margin-bottom: 0px; padding-top: 8px; padding-bottom: 8px; outline: 0px; max-width: 100%; color: #000000; font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, 'PingFang SC', Cambria, Cochin, Georgia, Times, 'Times New Roman', serif; font-size: 16px; white-space: normal; background-color: #ffffff; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\" data-tool=\"mdnice\u7f16\u8f91\u5668\"><code style=\"margin-right: 2px; margin-left: 2px; padding: 2px 4px; outline: 0px; max-width: 100%; font-size: 14px; border-radius: 4px; background-color: rgba(27, 31, 35, 0.05); font-family: 'Operator Mono', Consolas, Monaco, Menlo, monospace; word-break: break-all; color: #009688; box-sizing: border-box !important; overflow-wrap: break-word !important;\">OrderServiceImpl<\/code>\u7684cancel\u53d6\u6d88\u8ba2\u5355\u65b9\u6cd5\u88abfinal\u4fee\u9970\u7b26\u4fee\u9970\uff0cSpring\u4e8b\u52a1\u5e95\u5c42\u4f7f\u7528\u4e86AOP\uff0c\u4e5f\u5c31\u662f\u901a\u8fc7JDK\u52a8\u6001\u4ee3\u7406\u6216\u8005cglib\uff0c\u5e2e\u6211\u4eec\u751f\u6210\u4e86\u4ee3\u7406\u7c7b\uff0c\u5728\u4ee3\u7406\u7c7b\u4e2d\u5b9e\u73b0\u7684\u4e8b\u52a1\u529f\u80fd\u3002\u4f46\u5982\u679c\u67d0\u4e2a\u65b9\u6cd5\u7528final\u4fee\u9970\u4e86\uff0c\u90a3\u4e48\u5728\u5b83\u7684\u4ee3\u7406\u7c7b\u4e2d\uff0c\u5c31\u65e0\u6cd5\u91cd\u5199\u8be5\u65b9\u6cd5\uff0c\u4ece\u800c\u65e0\u6cd5\u6dfb\u52a0\u4e8b\u52a1\u529f\u80fd\u3002\u8fd9\u79cd\u60c5\u51b5\u4e8b\u52a1\u5c31\u4f1a\u5728Spring\u4e2d\u5931\u6548\u3002<\/p>\n<blockquote style=\"margin-top: 20px; margin-bottom: 20px; padding: 10px 10px 10px 1em; outline: 0px; border-left-width: 2px; border-left-color: #888888; color: #777777; font-size: 0.9em; max-width: 100%; font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, 'PingFang SC', Cambria, Cochin, Georgia, Times, 'Times New Roman', serif; text-align: left; white-space: normal; border-top: none; border-bottom: none; overflow: auto; background: rgba(0, 0, 0, 0.05); border-right: 2px solid #888888; box-sizing: border-box !important; overflow-wrap: break-word !important;\" data-tool=\"mdnice\u7f16\u8f91\u5668\">\n<p style=\"padding-top: 8px; padding-bottom: 8px; outline: 0px; max-width: 100%; font-size: 16px; text-align: justify; color: black; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\">?Tips: \u5982\u679c\u67d0\u4e2a\u65b9\u6cd5\u662fstatic\u7684\uff0c\u540c\u6837\u65e0\u6cd5\u901a\u8fc7\u52a8\u6001\u4ee3\u7406\u5c06\u65b9\u6cd5\u58f0\u660e\u4e3a\u4e8b\u52a1\u65b9\u6cd5\u3002<\/p>\n<\/blockquote>\n<h4 style=\"margin: 0.6em auto; padding-left: 10px; outline: 0px; font-weight: bold; font-size: 1.2em; max-width: 100%; color: #000000; font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, 'PingFang SC', Cambria, Cochin, Georgia, Times, 'Times New Roman', serif; text-align: left; white-space: normal; background-color: #ffffff; border-left: 2px dashed #009688; box-sizing: border-box !important; overflow-wrap: break-word !important;\" data-tool=\"mdnice\u7f16\u8f91\u5668\"><span style=\"outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;\">3. \u975epublic\u4fee\u9970\u7684\u65b9\u6cd5<\/span><\/h4>\n<p style=\"margin-bottom: 0px; padding-top: 8px; padding-bottom: 8px; outline: 0px; max-width: 100%; color: #000000; font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, 'PingFang SC', Cambria, Cochin, Georgia, Times, 'Times New Roman', serif; font-size: 16px; white-space: normal; background-color: #ffffff; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\" data-tool=\"mdnice\u7f16\u8f91\u5668\">\u5982\u679c\u4e8b\u52a1\u65b9\u5f0f\u4e0d\u662fpublic\u4fee\u9970\uff0c\u6b64\u65f6Spring\u4e8b\u52a1\u4f1a\u5931\u6548\uff0c\u4e3e\u4e2a\u4f8b\u5b50?\uff1a<\/p>\n<pre style=\"margin-top: 10px; margin-bottom: 10px; outline: 0px; max-width: 100%; color: #000000; font-size: 16px; text-align: left; background-color: #ffffff; border-radius: 5px; box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px; box-sizing: border-box !important; overflow-wrap: break-word !important;\" data-tool=\"mdnice\u7f16\u8f91\u5668\"><code style=\"padding: 15px 16px 16px; outline: 0px; max-width: 100%; overflow-x: auto; color: #abb2bf; display: -webkit-box; font-family: 'Operator Mono', Consolas, Monaco, Menlo, monospace; font-size: 12px; background: #282c34; border-radius: 5px; box-sizing: border-box !important; overflow-wrap: break-word !important;\"><span style=\"outline: 0px; max-width: 100%; color: #5c6370; font-style: italic; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\">\/**<br style=\"outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;\" \/>\u00a0*\u00a0\u5546\u54c1\u4e1a\u52a1\u5b9e\u73b0\u5c42<br style=\"outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;\" \/>\u00a0*<br style=\"outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;\" \/>\u00a0*\u00a0<span style=\"outline: 0px; max-width: 100%; color: #c678dd; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\">@author<\/span>:\u00a0austin<br style=\"outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;\" \/>\u00a0*\u00a0<span style=\"outline: 0px; max-width: 100%; color: #c678dd; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\">@since<\/span>:\u00a02023\/2\/10\u00a014:19<br style=\"outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;\" \/>\u00a0*\/<\/span><br style=\"outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;\" \/><span style=\"outline: 0px; max-width: 100%; color: #61aeee; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\">@Service<\/span><br style=\"outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;\" \/><span style=\"outline: 0px; max-width: 100%; color: #c678dd; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\">public<\/span>\u00a0<span style=\"outline: 0px; max-width: 100%; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\"><span style=\"outline: 0px; max-width: 100%; color: #c678dd; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\">class<\/span>\u00a0<span style=\"outline: 0px; max-width: 100%; color: #e6c07b; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\">ProductServiceImpl<\/span>\u00a0<span style=\"outline: 0px; max-width: 100%; color: #c678dd; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\">extends<\/span>\u00a0<span style=\"outline: 0px; max-width: 100%; color: #e6c07b; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\">ServiceImpl<\/span>&lt;<span style=\"outline: 0px; max-width: 100%; color: #e6c07b; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\">ProductMapper<\/span>,\u00a0<span style=\"outline: 0px; max-width: 100%; color: #e6c07b; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\">Product<\/span>&gt;\u00a0<span style=\"outline: 0px; max-width: 100%; color: #c678dd; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\">implements<\/span>\u00a0<span style=\"outline: 0px; max-width: 100%; color: #e6c07b; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\">IProductService<\/span>\u00a0<\/span>{<br style=\"outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;\" \/><br style=\"outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;\" \/>\u00a0\u00a0\u00a0\u00a0<span style=\"outline: 0px; max-width: 100%; color: #61aeee; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\">@Autowired<\/span><br style=\"outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;\" \/>\u00a0\u00a0\u00a0\u00a0<span style=\"outline: 0px; max-width: 100%; color: #c678dd; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\">private<\/span>\u00a0ProductMapper\u00a0productMapper;<br style=\"outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;\" \/><br style=\"outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;\" \/>\u00a0\u00a0\u00a0\u00a0<span style=\"outline: 0px; max-width: 100%; color: #61aeee; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\">@Override<\/span><br style=\"outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;\" \/>\u00a0\u00a0\u00a0\u00a0<span style=\"outline: 0px; max-width: 100%; color: #61aeee; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\">@Transactional<\/span>(propagation\u00a0=\u00a0Propagation.REQUIRES_NEW)<br style=\"outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;\" \/>\u00a0\u00a0\u00a0\u00a0<span style=\"outline: 0px; max-width: 100%; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\"><span style=\"outline: 0px; max-width: 100%; color: #c678dd; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\">private<\/span>\u00a0<span style=\"outline: 0px; max-width: 100%; color: #c678dd; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\">void<\/span>\u00a0<span style=\"outline: 0px; max-width: 100%; color: #61aeee; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\">updateProductStockById<\/span><span style=\"outline: 0px; max-width: 100%; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\">(Integer\u00a0stockCount,\u00a0String\u00a0productId)<\/span>\u00a0<\/span>{<br style=\"outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;\" \/>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0productMapper.updateProductStockById(stockCount,\u00a0productId);<br style=\"outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;\" \/>\u00a0\u00a0\u00a0\u00a0}<br style=\"outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;\" \/>}<br style=\"outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;\" \/><\/code><\/pre>\n<p style=\"margin-bottom: 0px; padding-top: 8px; padding-bottom: 8px; outline: 0px; max-width: 100%; color: #000000; font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, 'PingFang SC', Cambria, Cochin, Georgia, Times, 'Times New Roman', serif; font-size: 16px; white-space: normal; background-color: #ffffff; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\" data-tool=\"mdnice\u7f16\u8f91\u5668\">\u867d\u7136<code style=\"margin-right: 2px; margin-left: 2px; padding: 2px 4px; outline: 0px; max-width: 100%; font-size: 14px; border-radius: 4px; background-color: rgba(27, 31, 35, 0.05); font-family: 'Operator Mono', Consolas, Monaco, Menlo, monospace; word-break: break-all; color: #009688; box-sizing: border-box !important; overflow-wrap: break-word !important;\">ProductServiceImpl<\/code>\u6dfb\u52a0\u4e86<code style=\"margin-right: 2px; margin-left: 2px; padding: 2px 4px; outline: 0px; max-width: 100%; font-size: 14px; border-radius: 4px; background-color: rgba(27, 31, 35, 0.05); font-family: 'Operator Mono', Consolas, Monaco, Menlo, monospace; word-break: break-all; color: #009688; box-sizing: border-box !important; overflow-wrap: break-word !important;\">@Service<\/code>\u6ce8\u89e3\uff0c\u540c\u65f6<code style=\"margin-right: 2px; margin-left: 2px; padding: 2px 4px; outline: 0px; max-width: 100%; font-size: 14px; border-radius: 4px; background-color: rgba(27, 31, 35, 0.05); font-family: 'Operator Mono', Consolas, Monaco, Menlo, monospace; word-break: break-all; color: #009688; box-sizing: border-box !important; overflow-wrap: break-word !important;\">updateProductStockById()<\/code>\u65b9\u6cd5\u4e0a\u6dfb\u52a0\u4e86<code style=\"margin-right: 2px; margin-left: 2px; padding: 2px 4px; outline: 0px; max-width: 100%; font-size: 14px; border-radius: 4px; background-color: rgba(27, 31, 35, 0.05); font-family: 'Operator Mono', Consolas, Monaco, Menlo, monospace; word-break: break-all; color: #009688; box-sizing: border-box !important; overflow-wrap: break-word !important;\">@Transactional(propagation = Propagation.REQUIRES_NEW)<\/code>\u6ce8\u89e3\uff0c\u4f46\u662f\u7531\u4e8e\u4e8b\u52a1\u65b9\u6cd5<code style=\"margin-right: 2px; margin-left: 2px; padding: 2px 4px; outline: 0px; max-width: 100%; font-size: 14px; border-radius: 4px; background-color: rgba(27, 31, 35, 0.05); font-family: 'Operator Mono', Consolas, Monaco, Menlo, monospace; word-break: break-all; color: #009688; box-sizing: border-box !important; overflow-wrap: break-word !important;\">updateProductStockById()<\/code>\u88ab private \u5b9a\u4e49\u4e3a\u65b9\u6cd5\u5185\u79c1\u6709\uff0c\u540c\u6837Spring\u4e8b\u52a1\u4f1a\u5931\u6548\u3002<\/p>\n<h4 style=\"margin: 0.6em auto; padding-left: 10px; outline: 0px; font-weight: bold; font-size: 1.2em; max-width: 100%; color: #000000; font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, 'PingFang SC', Cambria, Cochin, Georgia, Times, 'Times New Roman', serif; text-align: left; white-space: normal; background-color: #ffffff; border-left: 2px dashed #009688; box-sizing: border-box !important; overflow-wrap: break-word !important;\" data-tool=\"mdnice\u7f16\u8f91\u5668\"><span style=\"outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;\">4. \u540c\u4e00\u4e2a\u7c7b\u4e2d\u7684\u65b9\u6cd5\u76f8\u4e92\u8c03\u7528<\/span><\/h4>\n<pre style=\"margin-top: 10px; margin-bottom: 10px; outline: 0px; max-width: 100%; color: #000000; font-size: 16px; text-align: left; background-color: #ffffff; border-radius: 5px; box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px; box-sizing: border-box !important; overflow-wrap: break-word !important;\" data-tool=\"mdnice\u7f16\u8f91\u5668\"><code style=\"padding: 15px 16px 16px; outline: 0px; max-width: 100%; overflow-x: auto; color: #abb2bf; display: -webkit-box; font-family: 'Operator Mono', Consolas, Monaco, Menlo, monospace; font-size: 12px; background: #282c34; border-radius: 5px; box-sizing: border-box !important; overflow-wrap: break-word !important;\"><span style=\"outline: 0px; max-width: 100%; color: #61aeee; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\">@Service<\/span><br style=\"outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;\" \/><span style=\"outline: 0px; max-width: 100%; color: #c678dd; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\">public<\/span>\u00a0<span style=\"outline: 0px; max-width: 100%; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\"><span style=\"outline: 0px; max-width: 100%; color: #c678dd; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\">class<\/span>\u00a0<span style=\"outline: 0px; max-width: 100%; color: #e6c07b; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\">OrderServiceImpl<\/span>\u00a0<span style=\"outline: 0px; max-width: 100%; color: #c678dd; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\">extends<\/span>\u00a0<span style=\"outline: 0px; max-width: 100%; color: #e6c07b; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\">ServiceImpl<\/span>&lt;<span style=\"outline: 0px; max-width: 100%; color: #e6c07b; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\">OrderMapper<\/span>,\u00a0<span style=\"outline: 0px; max-width: 100%; color: #e6c07b; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\">Order<\/span>&gt;\u00a0<span style=\"outline: 0px; max-width: 100%; color: #c678dd; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\">implements<\/span>\u00a0<span style=\"outline: 0px; max-width: 100%; color: #e6c07b; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\">IOrderService<\/span>\u00a0<\/span>{<br style=\"outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;\" \/>\u00a0\u00a0\u00a0\u00a0<span style=\"outline: 0px; max-width: 100%; color: #61aeee; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\">@Autowired<\/span><br style=\"outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;\" \/>\u00a0\u00a0\u00a0\u00a0<span style=\"outline: 0px; max-width: 100%; color: #c678dd; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\">private<\/span>\u00a0OrderMapper\u00a0orderMapper;<br style=\"outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;\" \/>\u00a0\u00a0\u00a0\u00a0<span style=\"outline: 0px; max-width: 100%; color: #61aeee; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\">@Autowired<\/span><br style=\"outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;\" \/>\u00a0\u00a0\u00a0\u00a0<span style=\"outline: 0px; max-width: 100%; color: #c678dd; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\">private<\/span>\u00a0ProductMapper\u00a0productMapper;<br style=\"outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;\" \/><br style=\"outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;\" \/>\u00a0\u00a0\u00a0\u00a0<span style=\"outline: 0px; max-width: 100%; color: #61aeee; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\">@Override<\/span><br style=\"outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;\" \/>\u00a0\u00a0\u00a0\u00a0<span style=\"outline: 0px; max-width: 100%; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\"><span style=\"outline: 0px; max-width: 100%; color: #c678dd; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\">public<\/span>\u00a0ResponseEntity\u00a0<span style=\"outline: 0px; max-width: 100%; color: #61aeee; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\">submitOrder<\/span><span style=\"outline: 0px; max-width: 100%; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\">(Order\u00a0order)<\/span>\u00a0<\/span>{<br style=\"outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;\" \/>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<span style=\"outline: 0px; max-width: 100%; color: #5c6370; font-style: italic; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\">\/\/\u00a0\u4fdd\u5b58\u751f\u6210\u8ba2\u5355\u4fe1\u606f<\/span><br style=\"outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;\" \/>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<span style=\"outline: 0px; max-width: 100%; color: #c678dd; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\">long<\/span>\u00a0orderNo\u00a0=\u00a0Math.abs(ThreadLocalRandom.current().nextLong(<span style=\"outline: 0px; max-width: 100%; color: #d19a66; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\">1000<\/span>));<br style=\"outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;\" \/>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0order.setOrderNo(<span style=\"outline: 0px; max-width: 100%; color: #98c379; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\">\"ORDER_\"<\/span>\u00a0+\u00a0orderNo);<br style=\"outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;\" \/>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0orderMapper.insert(order);<br style=\"outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;\" \/><br style=\"outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;\" \/>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<span style=\"outline: 0px; max-width: 100%; color: #5c6370; font-style: italic; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\">\/\/\u00a0\u6263\u51cf\u5e93\u5b58<\/span><br style=\"outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;\" \/>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<span style=\"outline: 0px; max-width: 100%; color: #c678dd; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\">this<\/span>.updateProductStockById(order.getProductId(),\u00a0<span style=\"outline: 0px; max-width: 100%; color: #d19a66; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\">1L<\/span>);<br style=\"outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;\" \/>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<span style=\"outline: 0px; max-width: 100%; color: #c678dd; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\">return<\/span>\u00a0<span style=\"outline: 0px; max-width: 100%; color: #c678dd; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\">new<\/span>\u00a0ResponseEntity(HttpStatus.OK);<br style=\"outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;\" \/>\u00a0\u00a0\u00a0\u00a0}<br style=\"outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;\" \/><br style=\"outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;\" \/>\u00a0\u00a0\u00a0\u00a0<span style=\"outline: 0px; max-width: 100%; color: #61aeee; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\">@Transactional<\/span>(propagation\u00a0=\u00a0Propagation.REQUIRES_NEW)<br style=\"outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;\" \/>\u00a0\u00a0\u00a0\u00a0<span style=\"outline: 0px; max-width: 100%; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\"><span style=\"outline: 0px; max-width: 100%; color: #c678dd; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\">public<\/span>\u00a0<span style=\"outline: 0px; max-width: 100%; color: #c678dd; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\">void<\/span>\u00a0<span style=\"outline: 0px; max-width: 100%; color: #61aeee; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\">updateProductStockById<\/span><span style=\"outline: 0px; max-width: 100%; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\">(Integer\u00a0num,\u00a0Long\u00a0productId)<\/span>\u00a0<\/span>{<br style=\"outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;\" \/>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0productMapper.updateProductStockById(num,\u00a0productId);<br style=\"outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;\" \/>\u00a0\u00a0\u00a0\u00a0}<br style=\"outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;\" \/>}<br style=\"outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;\" \/><\/code><\/pre>\n<p style=\"margin-bottom: 0px; padding-top: 8px; padding-bottom: 8px; outline: 0px; max-width: 100%; color: #000000; font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, 'PingFang SC', Cambria, Cochin, Georgia, Times, 'Times New Roman', serif; font-size: 16px; white-space: normal; background-color: #ffffff; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\" data-tool=\"mdnice\u7f16\u8f91\u5668\"><code style=\"margin-right: 2px; margin-left: 2px; padding: 2px 4px; outline: 0px; max-width: 100%; font-size: 14px; border-radius: 4px; background-color: rgba(27, 31, 35, 0.05); font-family: 'Operator Mono', Consolas, Monaco, Menlo, monospace; word-break: break-all; color: #009688; box-sizing: border-box !important; overflow-wrap: break-word !important;\">submitOrder()<\/code>\u65b9\u6cd5\u548c<code style=\"margin-right: 2px; margin-left: 2px; padding: 2px 4px; outline: 0px; max-width: 100%; font-size: 14px; border-radius: 4px; background-color: rgba(27, 31, 35, 0.05); font-family: 'Operator Mono', Consolas, Monaco, Menlo, monospace; word-break: break-all; color: #009688; box-sizing: border-box !important; overflow-wrap: break-word !important;\">updateProductStockById()<\/code>\u65b9\u6cd5\u90fd\u5728OrderService\u7c7b\u4e2d\uff0c\u7136\u800c<code style=\"margin-right: 2px; margin-left: 2px; padding: 2px 4px; outline: 0px; max-width: 100%; font-size: 14px; border-radius: 4px; background-color: rgba(27, 31, 35, 0.05); font-family: 'Operator Mono', Consolas, Monaco, Menlo, monospace; word-break: break-all; color: #009688; box-sizing: border-box !important; overflow-wrap: break-word !important;\">submitOrder()<\/code>\u65b9\u6cd5\u6ca1\u6709\u6dfb\u52a0\u4e8b\u52a1\u6ce8\u89e3\uff0c<code style=\"margin-right: 2px; margin-left: 2px; padding: 2px 4px; outline: 0px; max-width: 100%; font-size: 14px; border-radius: 4px; background-color: rgba(27, 31, 35, 0.05); font-family: 'Operator Mono', Consolas, Monaco, Menlo, monospace; word-break: break-all; color: #009688; box-sizing: border-box !important; overflow-wrap: break-word !important;\">updateProductStockById()<\/code>\u65b9\u6cd5\u867d\u7136\u6dfb\u52a0\u4e86\u4e8b\u52a1\u6ce8\u89e3\uff0c\u8fd9\u79cd\u60c5\u51b5<code style=\"margin-right: 2px; margin-left: 2px; padding: 2px 4px; outline: 0px; max-width: 100%; font-size: 14px; border-radius: 4px; background-color: rgba(27, 31, 35, 0.05); font-family: 'Operator Mono', Consolas, Monaco, Menlo, monospace; word-break: break-all; color: #009688; box-sizing: border-box !important; overflow-wrap: break-word !important;\">updateProductStockById()<\/code>\u4f1a\u5728Spring\u4e8b\u52a1\u4e2d\u5931\u6548\u3002<\/p>\n<h4 style=\"margin: 0.6em auto; padding-left: 10px; outline: 0px; font-weight: bold; font-size: 1.2em; max-width: 100%; color: #000000; font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, 'PingFang SC', Cambria, Cochin, Georgia, Times, 'Times New Roman', serif; text-align: left; white-space: normal; background-color: #ffffff; border-left: 2px dashed #009688; box-sizing: border-box !important; overflow-wrap: break-word !important;\" data-tool=\"mdnice\u7f16\u8f91\u5668\"><span style=\"outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;\">5. \u65b9\u6cd5\u7684\u4e8b\u52a1\u4f20\u64ad\u7c7b\u578b\u4e0d\u652f\u6301\u4e8b\u52a1<\/span><\/h4>\n<p style=\"margin-bottom: 0px; padding-top: 8px; padding-bottom: 8px; outline: 0px; max-width: 100%; color: #000000; font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, 'PingFang SC', Cambria, Cochin, Georgia, Times, 'Times New Roman', serif; font-size: 16px; white-space: normal; background-color: #ffffff; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\" data-tool=\"mdnice\u7f16\u8f91\u5668\">\u5982\u679c\u5185\u90e8\u65b9\u6cd5\u7684\u4e8b\u52a1\u4f20\u64ad\u7c7b\u578b\u4e3a\u4e0d\u652f\u6301\u4e8b\u52a1\u7684\u4f20\u64ad\u7c7b\u578b\uff0c\u5219\u5185\u90e8\u65b9\u6cd5\u7684\u4e8b\u52a1\u540c\u6837\u4f1a\u5728Spring\u4e2d\u5931\u6548\uff0c\u4e3e\u4e2a\u4f8b\u5b50\uff1a<\/p>\n<pre style=\"margin-top: 10px; margin-bottom: 10px; outline: 0px; max-width: 100%; color: #000000; font-size: 16px; text-align: left; background-color: #ffffff; border-radius: 5px; box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px; box-sizing: border-box !important; overflow-wrap: break-word !important;\" data-tool=\"mdnice\u7f16\u8f91\u5668\"><code style=\"padding: 15px 16px 16px; outline: 0px; max-width: 100%; overflow-x: auto; color: #abb2bf; display: -webkit-box; font-family: 'Operator Mono', Consolas, Monaco, Menlo, monospace; font-size: 12px; background: #282c34; border-radius: 5px; box-sizing: border-box !important; overflow-wrap: break-word !important;\"><span style=\"outline: 0px; max-width: 100%; color: #61aeee; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\">@Service<\/span><br style=\"outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;\" \/><span style=\"outline: 0px; max-width: 100%; color: #c678dd; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\">public<\/span>\u00a0<span style=\"outline: 0px; max-width: 100%; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\"><span style=\"outline: 0px; max-width: 100%; color: #c678dd; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\">class<\/span>\u00a0<span style=\"outline: 0px; max-width: 100%; color: #e6c07b; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\">OrderServiceImpl<\/span>\u00a0<span style=\"outline: 0px; max-width: 100%; color: #c678dd; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\">extends<\/span>\u00a0<span style=\"outline: 0px; max-width: 100%; color: #e6c07b; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\">ServiceImpl<\/span>&lt;<span style=\"outline: 0px; max-width: 100%; color: #e6c07b; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\">OrderMapper<\/span>,\u00a0<span style=\"outline: 0px; max-width: 100%; color: #e6c07b; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\">Order<\/span>&gt;\u00a0<span style=\"outline: 0px; max-width: 100%; color: #c678dd; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\">implements<\/span>\u00a0<span style=\"outline: 0px; max-width: 100%; color: #e6c07b; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\">IOrderService<\/span>\u00a0<\/span>{<br style=\"outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;\" \/>\u00a0\u00a0\u00a0\u00a0<span style=\"outline: 0px; max-width: 100%; color: #61aeee; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\">@Autowired<\/span><br style=\"outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;\" \/>\u00a0\u00a0\u00a0\u00a0<span style=\"outline: 0px; max-width: 100%; color: #c678dd; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\">private<\/span>\u00a0OrderMapper\u00a0orderMapper;<br style=\"outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;\" \/>\u00a0\u00a0\u00a0\u00a0<span style=\"outline: 0px; max-width: 100%; color: #61aeee; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\">@Autowired<\/span><br style=\"outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;\" \/>\u00a0\u00a0\u00a0\u00a0<span style=\"outline: 0px; max-width: 100%; color: #c678dd; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\">private<\/span>\u00a0ProductMapper\u00a0productMapper;<br style=\"outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;\" \/><br style=\"outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;\" \/>\u00a0\u00a0\u00a0\u00a0<span style=\"outline: 0px; max-width: 100%; color: #61aeee; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\">@Override<\/span><br style=\"outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;\" \/>\u00a0\u00a0\u00a0\u00a0<span style=\"outline: 0px; max-width: 100%; color: #61aeee; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\">@Transactional<\/span>(propagation\u00a0=\u00a0Propagation.REQUIRES_NEW)<br style=\"outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;\" \/>\u00a0\u00a0\u00a0\u00a0<span style=\"outline: 0px; max-width: 100%; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\"><span style=\"outline: 0px; max-width: 100%; color: #c678dd; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\">public<\/span>\u00a0ResponseEntity\u00a0<span style=\"outline: 0px; max-width: 100%; color: #61aeee; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\">submitOrder<\/span><span style=\"outline: 0px; max-width: 100%; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\">(Order\u00a0order)<\/span>\u00a0<\/span>{<br style=\"outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;\" \/>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<span style=\"outline: 0px; max-width: 100%; color: #c678dd; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\">long<\/span>\u00a0orderNo\u00a0=\u00a0Math.abs(ThreadLocalRandom.current().nextLong(<span style=\"outline: 0px; max-width: 100%; color: #d19a66; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\">1000<\/span>));<br style=\"outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;\" \/>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0order.setOrderNo(<span style=\"outline: 0px; max-width: 100%; color: #98c379; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\">\"ORDER_\"<\/span>\u00a0+\u00a0orderNo);<br style=\"outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;\" \/>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0orderMapper.insert(order);<br style=\"outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;\" \/><br style=\"outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;\" \/>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<span style=\"outline: 0px; max-width: 100%; color: #5c6370; font-style: italic; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\">\/\/\u00a0\u6263\u51cf\u5e93\u5b58<\/span><br style=\"outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;\" \/>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<span style=\"outline: 0px; max-width: 100%; color: #c678dd; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\">this<\/span>.updateProductStockById(order.getProductId(),\u00a0<span style=\"outline: 0px; max-width: 100%; color: #d19a66; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\">1L<\/span>);<br style=\"outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;\" \/>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<span style=\"outline: 0px; max-width: 100%; color: #c678dd; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\">return<\/span>\u00a0<span style=\"outline: 0px; max-width: 100%; color: #c678dd; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\">new<\/span>\u00a0ResponseEntity(HttpStatus.OK);<br style=\"outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;\" \/>\u00a0\u00a0\u00a0\u00a0}<br style=\"outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;\" \/><br style=\"outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;\" \/>\u00a0<br style=\"outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;\" \/>\u00a0\u00a0\u00a0\u00a0<span style=\"outline: 0px; max-width: 100%; color: #5c6370; font-style: italic; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\">\/**<br style=\"outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;\" \/>\u00a0\u00a0\u00a0\u00a0\u00a0*\u00a0\u6263\u51cf\u5e93\u5b58\u65b9\u6cd5\u4e8b\u52a1\u7c7b\u578b\u58f0\u660e\u4e3aNOT_SUPPORTED\u4e0d\u652f\u6301\u4e8b\u52a1\u7684\u4f20\u64ad<br style=\"outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;\" \/>\u00a0\u00a0\u00a0\u00a0\u00a0*\/<\/span><br style=\"outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;\" \/>\u00a0\u00a0\u00a0\u00a0<span style=\"outline: 0px; max-width: 100%; color: #61aeee; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\">@Transactional<\/span>(propagation\u00a0=\u00a0Propagation.NOT_SUPPORTED)<br style=\"outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;\" \/>\u00a0\u00a0\u00a0\u00a0<span style=\"outline: 0px; max-width: 100%; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\"><span style=\"outline: 0px; max-width: 100%; color: #c678dd; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\">public<\/span>\u00a0<span style=\"outline: 0px; max-width: 100%; color: #c678dd; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\">void<\/span>\u00a0<span style=\"outline: 0px; max-width: 100%; color: #61aeee; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\">updateProductStockById<\/span><span style=\"outline: 0px; max-width: 100%; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\">(Integer\u00a0num,\u00a0Long\u00a0productId)<\/span>\u00a0<\/span>{<br style=\"outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;\" \/>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0productMapper.updateProductStockById(num,\u00a0productId);<br style=\"outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;\" \/>\u00a0\u00a0\u00a0\u00a0}<br style=\"outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;\" \/>}<br style=\"outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;\" \/><\/code><\/pre>\n<h4 style=\"margin: 0.6em auto; padding-left: 10px; outline: 0px; font-weight: bold; font-size: 1.2em; max-width: 100%; color: #000000; font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, 'PingFang SC', Cambria, Cochin, Georgia, Times, 'Times New Roman', serif; text-align: left; white-space: normal; background-color: #ffffff; border-left: 2px dashed #009688; box-sizing: border-box !important; overflow-wrap: break-word !important;\" data-tool=\"mdnice\u7f16\u8f91\u5668\"><span style=\"outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;\">6. \u5f02\u5e38\u88ab\u5185\u90e8catch\uff0c\u7a0b\u5e8f\u751f\u541e\u5f02\u5e38<\/span><\/h4>\n<pre style=\"margin-top: 10px; margin-bottom: 10px; outline: 0px; max-width: 100%; color: #000000; font-size: 16px; text-align: left; background-color: #ffffff; border-radius: 5px; box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px; box-sizing: border-box !important; overflow-wrap: break-word !important;\" data-tool=\"mdnice\u7f16\u8f91\u5668\"><code style=\"padding: 15px 16px 16px; outline: 0px; max-width: 100%; overflow-x: auto; color: #abb2bf; display: -webkit-box; font-family: 'Operator Mono', Consolas, Monaco, Menlo, monospace; font-size: 12px; background: #282c34; border-radius: 5px; box-sizing: border-box !important; overflow-wrap: break-word !important;\"><span style=\"outline: 0px; max-width: 100%; color: #61aeee; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\">@Service<\/span><br style=\"outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;\" \/><span style=\"outline: 0px; max-width: 100%; color: #c678dd; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\">public<\/span>\u00a0<span style=\"outline: 0px; max-width: 100%; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\"><span style=\"outline: 0px; max-width: 100%; color: #c678dd; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\">class<\/span>\u00a0<span style=\"outline: 0px; max-width: 100%; color: #e6c07b; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\">OrderServiceImpl<\/span>\u00a0<span style=\"outline: 0px; max-width: 100%; color: #c678dd; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\">extends<\/span>\u00a0<span style=\"outline: 0px; max-width: 100%; color: #e6c07b; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\">ServiceImpl<\/span>&lt;<span style=\"outline: 0px; max-width: 100%; color: #e6c07b; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\">OrderMapper<\/span>,\u00a0<span style=\"outline: 0px; max-width: 100%; color: #e6c07b; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\">Order<\/span>&gt;\u00a0<span style=\"outline: 0px; max-width: 100%; color: #c678dd; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\">implements<\/span>\u00a0<span style=\"outline: 0px; max-width: 100%; color: #e6c07b; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\">IOrderService<\/span>\u00a0<\/span>{<br style=\"outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;\" \/>\u00a0\u00a0\u00a0\u00a0<span style=\"outline: 0px; max-width: 100%; color: #61aeee; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\">@Autowired<\/span><br style=\"outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;\" \/>\u00a0\u00a0\u00a0\u00a0<span style=\"outline: 0px; max-width: 100%; color: #c678dd; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\">private<\/span>\u00a0OrderMapper\u00a0orderMapper;<br style=\"outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;\" \/>\u00a0\u00a0\u00a0\u00a0<span style=\"outline: 0px; max-width: 100%; color: #61aeee; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\">@Autowired<\/span><br style=\"outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;\" \/>\u00a0\u00a0\u00a0\u00a0<span style=\"outline: 0px; max-width: 100%; color: #c678dd; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\">private<\/span>\u00a0ProductMapper\u00a0productMapper;<br style=\"outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;\" \/><br style=\"outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;\" \/>\u00a0\u00a0\u00a0\u00a0<span style=\"outline: 0px; max-width: 100%; color: #61aeee; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\">@Override<\/span><br style=\"outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;\" \/>\u00a0\u00a0\u00a0\u00a0<span style=\"outline: 0px; max-width: 100%; color: #61aeee; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\">@Transactional<\/span>(propagation\u00a0=\u00a0Propagation.REQUIRES_NEW)<br style=\"outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;\" \/>\u00a0\u00a0\u00a0\u00a0<span style=\"outline: 0px; max-width: 100%; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\"><span style=\"outline: 0px; max-width: 100%; color: #c678dd; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\">public<\/span>\u00a0ResponseEntity\u00a0<span style=\"outline: 0px; max-width: 100%; color: #61aeee; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\">submitOrder<\/span><span style=\"outline: 0px; max-width: 100%; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\">(Order\u00a0order)<\/span>\u00a0<\/span>{<br style=\"outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;\" \/>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<span style=\"outline: 0px; max-width: 100%; color: #c678dd; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\">long<\/span>\u00a0orderNo\u00a0=\u00a0Math.abs(ThreadLocalRandom.current().nextLong(<span style=\"outline: 0px; max-width: 100%; color: #d19a66; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\">1000<\/span>));<br style=\"outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;\" \/>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0order.setOrderNo(<span style=\"outline: 0px; max-width: 100%; color: #98c379; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\">\"ORDER_\"<\/span>\u00a0+\u00a0orderNo);<br style=\"outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;\" \/>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0orderMapper.insert(order);<br style=\"outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;\" \/><br style=\"outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;\" \/>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<span style=\"outline: 0px; max-width: 100%; color: #5c6370; font-style: italic; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\">\/\/\u00a0\u6263\u51cf\u5e93\u5b58<\/span><br style=\"outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;\" \/>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<span style=\"outline: 0px; max-width: 100%; color: #c678dd; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\">this<\/span>.updateProductStockById(order.getProductId(),\u00a0<span style=\"outline: 0px; max-width: 100%; color: #d19a66; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\">1L<\/span>);<br style=\"outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;\" \/>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<span style=\"outline: 0px; max-width: 100%; color: #c678dd; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\">return<\/span>\u00a0<span style=\"outline: 0px; max-width: 100%; color: #c678dd; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\">new<\/span>\u00a0ResponseEntity(HttpStatus.OK);<br style=\"outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;\" \/>\u00a0\u00a0\u00a0\u00a0}<br style=\"outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;\" \/><br style=\"outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;\" \/>\u00a0\u00a0\u00a0\u00a0<span style=\"outline: 0px; max-width: 100%; color: #5c6370; font-style: italic; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\">\/**<br style=\"outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;\" \/>\u00a0\u00a0\u00a0\u00a0\u00a0*\u00a0\u6263\u51cf\u5e93\u5b58\u65b9\u6cd5\u4e8b\u52a1\u7c7b\u578b\u58f0\u660e\u4e3aNOT_SUPPORTED\u4e0d\u652f\u6301\u4e8b\u52a1\u7684\u4f20\u64ad<br style=\"outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;\" \/>\u00a0\u00a0\u00a0\u00a0\u00a0*\/<\/span><br style=\"outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;\" \/>\u00a0\u00a0\u00a0\u00a0<span style=\"outline: 0px; max-width: 100%; color: #61aeee; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\">@Transactional<\/span>(propagation\u00a0=\u00a0Propagation.NOT_SUPPORTED)<br style=\"outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;\" \/>\u00a0\u00a0\u00a0\u00a0<span style=\"outline: 0px; max-width: 100%; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\"><span style=\"outline: 0px; max-width: 100%; color: #c678dd; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\">public<\/span>\u00a0<span style=\"outline: 0px; max-width: 100%; color: #c678dd; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\">void<\/span>\u00a0<span style=\"outline: 0px; max-width: 100%; color: #61aeee; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\">updateProductStockById<\/span><span style=\"outline: 0px; max-width: 100%; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\">(Integer\u00a0num,\u00a0Long\u00a0productId)<\/span>\u00a0<\/span>{<br style=\"outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;\" \/>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<span style=\"outline: 0px; max-width: 100%; color: #c678dd; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\">try<\/span>\u00a0{<br style=\"outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;\" \/>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0productMapper.updateProductStockById(num,\u00a0productId);<br style=\"outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;\" \/>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0}\u00a0<span style=\"outline: 0px; max-width: 100%; color: #c678dd; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\">catch<\/span>\u00a0(Exception\u00a0e)\u00a0{<br style=\"outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;\" \/>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<span style=\"outline: 0px; max-width: 100%; color: #5c6370; font-style: italic; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\">\/\/\u00a0\u8fd9\u91cc\u4ec5\u4ec5\u662f\u6355\u83b7\u5f02\u5e38\u4e4b\u540e\u7684\u6253\u5370\uff08\u76f8\u5f53\u4e8e\u7a0b\u5e8f\u541e\u6389\u4e86\u5f02\u5e38\uff09<\/span><br style=\"outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;\" \/>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0log.error(<span style=\"outline: 0px; max-width: 100%; color: #98c379; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\">\"Error\u00a0updating\u00a0product\u00a0Stock:\u00a0{}\"<\/span>,\u00a0e);<br style=\"outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;\" \/>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0}<br style=\"outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;\" \/>\u00a0\u00a0\u00a0\u00a0}<br style=\"outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;\" \/>}<br style=\"outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;\" \/><\/code><\/pre>\n<h4 style=\"margin: 0.6em auto; padding-left: 10px; outline: 0px; font-weight: bold; font-size: 1.2em; max-width: 100%; color: #000000; font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, 'PingFang SC', Cambria, Cochin, Georgia, Times, 'Times New Roman', serif; text-align: left; white-space: normal; background-color: #ffffff; border-left: 2px dashed #009688; box-sizing: border-box !important; overflow-wrap: break-word !important;\" data-tool=\"mdnice\u7f16\u8f91\u5668\"><span style=\"outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;\">7. \u6570\u636e\u5e93\u4e0d\u652f\u6301\u4e8b\u52a1<\/span><\/h4>\n<p style=\"margin-bottom: 0px; padding-top: 8px; padding-bottom: 8px; outline: 0px; max-width: 100%; color: #000000; font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, 'PingFang SC', Cambria, Cochin, Georgia, Times, 'Times New Roman', serif; font-size: 16px; white-space: normal; background-color: #ffffff; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\" data-tool=\"mdnice\u7f16\u8f91\u5668\">Spring\u4e8b\u52a1\u751f\u6548\u7684\u524d\u63d0\u662f\u8fde\u63a5\u7684\u6570\u636e\u5e93\u652f\u6301\u4e8b\u52a1\uff0c\u5982\u679c\u5e95\u5c42\u7684\u6570\u636e\u5e93\u90fd\u4e0d\u652f\u6301\u4e8b\u52a1\uff0c\u5219Spring\u4e8b\u52a1\u80af\u5b9a\u4f1a\u5931\u6548\u7684\uff0c\u4f8b\u5982?\uff1a\u4f7f\u7528MySQL\u6570\u636e\u5e93\uff0c\u9009\u7528<code style=\"margin-right: 2px; margin-left: 2px; padding: 2px 4px; outline: 0px; max-width: 100%; font-size: 14px; border-radius: 4px; background-color: rgba(27, 31, 35, 0.05); font-family: 'Operator Mono', Consolas, Monaco, Menlo, monospace; word-break: break-all; color: #009688; box-sizing: border-box !important; overflow-wrap: break-word !important;\">MyISAM<\/code>\u5b58\u50a8\u5f15\u64ce\uff0c\u56e0\u4e3a<code style=\"margin-right: 2px; margin-left: 2px; padding: 2px 4px; outline: 0px; max-width: 100%; font-size: 14px; border-radius: 4px; background-color: rgba(27, 31, 35, 0.05); font-family: 'Operator Mono', Consolas, Monaco, Menlo, monospace; word-break: break-all; color: #009688; box-sizing: border-box !important; overflow-wrap: break-word !important;\">MyISAM<\/code>\u5b58\u50a8\u5f15\u64ce\u672c\u8eab\u4e0d\u652f\u6301\u4e8b\u52a1\uff0c\u56e0\u6b64\u4e8b\u52a1\u6beb\u65e0\u7591\u95ee\u4f1a\u5931\u6548\u3002<\/p>\n<h4 style=\"margin: 0.6em auto; padding-left: 10px; outline: 0px; font-weight: bold; font-size: 1.2em; max-width: 100%; color: #000000; font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, 'PingFang SC', Cambria, Cochin, Georgia, Times, 'Times New Roman', serif; text-align: left; white-space: normal; background-color: #ffffff; border-left: 2px dashed #009688; box-sizing: border-box !important; overflow-wrap: break-word !important;\" data-tool=\"mdnice\u7f16\u8f91\u5668\"><span style=\"outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;\">8. \u672a\u914d\u7f6e\u5f00\u542f\u4e8b\u52a1<\/span><\/h4>\n<p style=\"margin-bottom: 0px; padding-top: 8px; padding-bottom: 8px; outline: 0px; max-width: 100%; color: #000000; font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, 'PingFang SC', Cambria, Cochin, Georgia, Times, 'Times New Roman', serif; font-size: 16px; white-space: normal; background-color: #ffffff; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\" data-tool=\"mdnice\u7f16\u8f91\u5668\">\u5982\u679c\u9879\u76ee\u4e2d\u6ca1\u6709\u914d\u7f6eSpring\u7684\u4e8b\u52a1\u7ba1\u7406\u5668\uff0c\u5373\u4f7f\u4f7f\u7528\u4e86Spring\u7684\u4e8b\u52a1\u7ba1\u7406\u529f\u80fd\uff0cSpring\u7684\u4e8b\u52a1\u4e5f\u4e0d\u4f1a\u751f\u6548\uff0c\u4f8b\u5982\uff0c\u5982\u679c\u4f60\u662fSpring Boot\u9879\u76ee\uff0c\u6ca1\u6709\u5728SpringBoot\u9879\u76ee\u4e2d\u914d\u7f6e\u5982\u4e0b\u4ee3\u7801\uff1a<\/p>\n<pre style=\"margin-top: 10px; margin-bottom: 10px; outline: 0px; max-width: 100%; color: #000000; font-size: 16px; text-align: left; background-color: #ffffff; border-radius: 5px; box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px; box-sizing: border-box !important; overflow-wrap: break-word !important;\" data-tool=\"mdnice\u7f16\u8f91\u5668\"><code style=\"padding: 15px 16px 16px; outline: 0px; max-width: 100%; overflow-x: auto; color: #abb2bf; display: -webkit-box; font-family: 'Operator Mono', Consolas, Monaco, Menlo, monospace; font-size: 12px; background: #282c34; border-radius: 5px; box-sizing: border-box !important; overflow-wrap: break-word !important;\"><span style=\"outline: 0px; max-width: 100%; color: #61aeee; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\">@Bean<\/span><br style=\"outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;\" \/><span style=\"outline: 0px; max-width: 100%; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\"><span style=\"outline: 0px; max-width: 100%; color: #c678dd; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\">public<\/span>\u00a0PlatformTransactionManager\u00a0<span style=\"outline: 0px; max-width: 100%; color: #61aeee; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\">transactionManager<\/span><span style=\"outline: 0px; max-width: 100%; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\">(DataSource\u00a0dataSource)<\/span>\u00a0<\/span>{<br style=\"outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;\" \/>\u00a0\u00a0\u00a0\u00a0<span style=\"outline: 0px; max-width: 100%; color: #c678dd; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\">return<\/span>\u00a0<span style=\"outline: 0px; max-width: 100%; color: #c678dd; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\">new<\/span>\u00a0DataSourceTransactionManager(dataSource);<br style=\"outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;\" \/>}<br style=\"outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;\" \/><\/code><\/pre>\n<p style=\"margin-bottom: 0px; padding-top: 8px; padding-bottom: 8px; outline: 0px; max-width: 100%; color: #000000; font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, 'PingFang SC', Cambria, Cochin, Georgia, Times, 'Times New Roman', serif; font-size: 16px; white-space: normal; background-color: #ffffff; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\" data-tool=\"mdnice\u7f16\u8f91\u5668\">\u5982\u679c\u662f\u4ee5\u5f80\u7684Spring MVC\u9879\u76ee\uff0c\u5982\u679c\u6ca1\u6709\u914d\u7f6e\u4e0b\u9762\u7684\u4ee3\u7801\uff0cSpring\u4e8b\u52a1\u4e5f\u4e0d\u4f1a\u751f\u6548\uff0c\u6b63\u5e38\u9700\u8981\u5728applicationContext.xml\u6587\u4ef6\u4e2d\uff0c\u624b\u52a8\u914d\u7f6e\u4e8b\u52a1\u76f8\u5173\u53c2\u6570\uff0c\u6bd4\u5982\uff1a<\/p>\n<pre style=\"margin-top: 10px; margin-bottom: 10px; outline: 0px; max-width: 100%; color: #000000; font-size: 16px; text-align: left; background-color: #ffffff; border-radius: 5px; box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px; box-sizing: border-box !important; overflow-wrap: break-word !important;\" data-tool=\"mdnice\u7f16\u8f91\u5668\"><code style=\"padding: 15px 16px 16px; outline: 0px; max-width: 100%; overflow-x: auto; color: #abb2bf; display: -webkit-box; font-family: 'Operator Mono', Consolas, Monaco, Menlo, monospace; font-size: 12px; background: #282c34; border-radius: 5px; box-sizing: border-box !important; overflow-wrap: break-word !important;\"><span style=\"outline: 0px; max-width: 100%; color: #5c6370; font-style: italic; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\">&lt;!--\u00a0\u914d\u7f6e\u4e8b\u52a1\u7ba1\u7406\u5668\u00a0--&gt;<\/span>\u00a0<br style=\"outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;\" \/><span style=\"outline: 0px; max-width: 100%; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\">&lt;<span style=\"outline: 0px; max-width: 100%; color: #e06c75; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\">bean<\/span>\u00a0<span style=\"outline: 0px; max-width: 100%; color: #d19a66; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\">class<\/span>=<span style=\"outline: 0px; max-width: 100%; color: #98c379; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\">\"org.springframework.jdbc.datasource.DataSourceTransactionManager\"<\/span>\u00a0<span style=\"outline: 0px; max-width: 100%; color: #d19a66; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\">id<\/span>=<span style=\"outline: 0px; max-width: 100%; color: #98c379; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\">\"transactionManager\"<\/span>&gt;<\/span>\u00a0<br style=\"outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;\" \/>\u00a0\u00a0\u00a0\u00a0<span style=\"outline: 0px; max-width: 100%; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\">&lt;<span style=\"outline: 0px; max-width: 100%; color: #e06c75; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\">property<\/span>\u00a0<span style=\"outline: 0px; max-width: 100%; color: #d19a66; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\">name<\/span>=<span style=\"outline: 0px; max-width: 100%; color: #98c379; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\">\"dataSource\"<\/span>\u00a0<span style=\"outline: 0px; max-width: 100%; color: #d19a66; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\">ref<\/span>=<span style=\"outline: 0px; max-width: 100%; color: #98c379; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\">\"dataSource\"<\/span>&gt;<\/span><span style=\"outline: 0px; max-width: 100%; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\">&lt;\/<span style=\"outline: 0px; max-width: 100%; color: #e06c75; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\">property<\/span>&gt;<\/span>\u00a0<br style=\"outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;\" \/><span style=\"outline: 0px; max-width: 100%; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\">&lt;\/<span style=\"outline: 0px; max-width: 100%; color: #e06c75; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\">bean<\/span>&gt;<\/span>\u00a0<br style=\"outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;\" \/><span style=\"outline: 0px; max-width: 100%; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\">&lt;<span style=\"outline: 0px; max-width: 100%; color: #e06c75; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\">tx:advice<\/span>\u00a0<span style=\"outline: 0px; max-width: 100%; color: #d19a66; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\">id<\/span>=<span style=\"outline: 0px; max-width: 100%; color: #98c379; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\">\"advice\"<\/span>\u00a0<span style=\"outline: 0px; max-width: 100%; color: #d19a66; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\">transaction-manager<\/span>=<span style=\"outline: 0px; max-width: 100%; color: #98c379; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\">\"transactionManager\"<\/span>&gt;<\/span>\u00a0<br style=\"outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;\" \/>\u00a0\u00a0\u00a0\u00a0<span style=\"outline: 0px; max-width: 100%; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\">&lt;<span style=\"outline: 0px; max-width: 100%; color: #e06c75; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\">tx:attributes<\/span>&gt;<\/span>\u00a0<br style=\"outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;\" \/>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<span style=\"outline: 0px; max-width: 100%; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\">&lt;<span style=\"outline: 0px; max-width: 100%; color: #e06c75; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\">tx:method<\/span>\u00a0<span style=\"outline: 0px; max-width: 100%; color: #d19a66; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\">name<\/span>=<span style=\"outline: 0px; max-width: 100%; color: #98c379; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\">\"*\"<\/span>\u00a0<span style=\"outline: 0px; max-width: 100%; color: #d19a66; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\">propagation<\/span>=<span style=\"outline: 0px; max-width: 100%; color: #98c379; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\">\"REQUIRED\"<\/span>\/&gt;<\/span><br style=\"outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;\" \/>\u00a0\u00a0\u00a0\u00a0<span style=\"outline: 0px; max-width: 100%; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\">&lt;\/<span style=\"outline: 0px; max-width: 100%; color: #e06c75; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\">tx:attributes<\/span>&gt;<\/span>\u00a0<br style=\"outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;\" \/><span style=\"outline: 0px; max-width: 100%; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\">&lt;\/<span style=\"outline: 0px; max-width: 100%; color: #e06c75; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\">tx:advice<\/span>&gt;<\/span>\u00a0<br style=\"outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;\" \/><span style=\"outline: 0px; max-width: 100%; color: #5c6370; font-style: italic; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\">&lt;!--\u00a0\u7528\u5207\u70b9\u628a\u4e8b\u52a1\u5207\u8fdb\u53bb\u00a0--&gt;<\/span>\u00a0<br style=\"outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;\" \/><span style=\"outline: 0px; max-width: 100%; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\">&lt;<span style=\"outline: 0px; max-width: 100%; color: #e06c75; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\">aop:config<\/span>&gt;<\/span>\u00a0<br style=\"outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;\" \/>\u00a0\u00a0\u00a0\u00a0<span style=\"outline: 0px; max-width: 100%; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\">&lt;<span style=\"outline: 0px; max-width: 100%; color: #e06c75; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\">aop:pointcut<\/span>\u00a0<span style=\"outline: 0px; max-width: 100%; color: #d19a66; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\">expression<\/span>=<span style=\"outline: 0px; max-width: 100%; color: #98c379; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\">\"execution(*\u00a0com.universal.ubdk.*.*(..))\"<\/span>\u00a0<span style=\"outline: 0px; max-width: 100%; color: #d19a66; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\">id<\/span>=<span style=\"outline: 0px; max-width: 100%; color: #98c379; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\">\"pointcut\"<\/span>\/&gt;<\/span>\u00a0<br style=\"outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;\" \/>\u00a0\u00a0\u00a0\u00a0<span style=\"outline: 0px; max-width: 100%; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\">&lt;<span style=\"outline: 0px; max-width: 100%; color: #e06c75; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\">aop:advisor<\/span>\u00a0<span style=\"outline: 0px; max-width: 100%; color: #d19a66; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\">advice-ref<\/span>=<span style=\"outline: 0px; max-width: 100%; color: #98c379; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\">\"advice\"<\/span>\u00a0<span style=\"outline: 0px; max-width: 100%; color: #d19a66; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\">pointcut-ref<\/span>=<span style=\"outline: 0px; max-width: 100%; color: #98c379; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\">\"pointcut\"<\/span>\/&gt;<\/span>\u00a0<br style=\"outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;\" \/><span style=\"outline: 0px; max-width: 100%; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\">&lt;\/<span style=\"outline: 0px; max-width: 100%; color: #e06c75; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\">aop:config<\/span>&gt;<\/span>\u00a0<br style=\"outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;\" \/><\/code><\/pre>\n<h4 style=\"margin: 0.6em auto; padding-left: 10px; outline: 0px; font-weight: bold; font-size: 1.2em; max-width: 100%; color: #000000; font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, 'PingFang SC', Cambria, Cochin, Georgia, Times, 'Times New Roman', serif; text-align: left; white-space: normal; background-color: #ffffff; border-left: 2px dashed #009688; box-sizing: border-box !important; overflow-wrap: break-word !important;\" data-tool=\"mdnice\u7f16\u8f91\u5668\"><span style=\"outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;\">9. \u9519\u8bef\u7684\u4f20\u64ad\u7279\u6027<\/span><\/h4>\n<p style=\"margin-bottom: 0px; padding-top: 8px; padding-bottom: 8px; outline: 0px; max-width: 100%; color: #000000; font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, 'PingFang SC', Cambria, Cochin, Georgia, Times, 'Times New Roman', serif; font-size: 16px; white-space: normal; background-color: #ffffff; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\" data-tool=\"mdnice\u7f16\u8f91\u5668\">\u5176\u5b9e\uff0c\u6211\u4eec\u5728\u4f7f\u7528<code style=\"margin-right: 2px; margin-left: 2px; padding: 2px 4px; outline: 0px; max-width: 100%; font-size: 14px; border-radius: 4px; background-color: rgba(27, 31, 35, 0.05); font-family: 'Operator Mono', Consolas, Monaco, Menlo, monospace; word-break: break-all; color: #009688; box-sizing: border-box !important; overflow-wrap: break-word !important;\">@Transactional<\/code>\u6ce8\u89e3\u65f6\uff0c\u662f\u53ef\u4ee5\u6307\u5b9a<code style=\"margin-right: 2px; margin-left: 2px; padding: 2px 4px; outline: 0px; max-width: 100%; font-size: 14px; border-radius: 4px; background-color: rgba(27, 31, 35, 0.05); font-family: 'Operator Mono', Consolas, Monaco, Menlo, monospace; word-break: break-all; color: #009688; box-sizing: border-box !important; overflow-wrap: break-word !important;\">propagation<\/code>\u53c2\u6570\u7684\u3002<\/p>\n<p style=\"margin-bottom: 0px; padding-top: 8px; padding-bottom: 8px; outline: 0px; max-width: 100%; color: #000000; font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, 'PingFang SC', Cambria, Cochin, Georgia, Times, 'Times New Roman', serif; font-size: 16px; white-space: normal; background-color: #ffffff; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\" data-tool=\"mdnice\u7f16\u8f91\u5668\">\u8be5\u53c2\u6570\u7684\u4f5c\u7528\u662f\u6307\u5b9a\u4e8b\u52a1\u7684\u4f20\u64ad\u7279\u6027\uff0c\u76ee\u524dSpring\u652f\u63017\u79cd\u4f20\u64ad\u7279\u6027\uff1a<\/p>\n<ul class=\"list-paddingleft-1\" style=\"margin-top: 8px; margin-bottom: 8px; padding-left: 25px; outline: 0px; max-width: 100%; color: #000000; font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, 'PingFang SC', Cambria, Cochin, Georgia, Times, 'Times New Roman', serif; font-size: 16px; white-space: normal; background-color: #ffffff; overflow-wrap: break-word !important;\" data-tool=\"mdnice\u7f16\u8f91\u5668\">\n<li style=\"outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;\">\n<section style=\"margin-top: 5px; margin-bottom: 5px; outline: 0px; max-width: 100%; line-height: 26px; color: #010101; box-sizing: border-box !important; overflow-wrap: break-word !important;\"><code style=\"margin-right: 2px; margin-left: 2px; padding: 2px 4px; outline: 0px; max-width: 100%; font-size: 14px; border-radius: 4px; background-color: rgba(27, 31, 35, 0.05); font-family: 'Operator Mono', Consolas, Monaco, Menlo, monospace; word-break: break-all; color: #009688; box-sizing: border-box !important; overflow-wrap: break-word !important;\">REQUIRED<\/code>\u00a0\u5982\u679c\u5f53\u524d\u4e0a\u4e0b\u6587\u4e2d\u5b58\u5728\u4e8b\u52a1\uff0c\u90a3\u4e48\u52a0\u5165\u8be5\u4e8b\u52a1\uff0c\u5982\u679c\u4e0d\u5b58\u5728\u4e8b\u52a1\uff0c\u521b\u5efa\u4e00\u4e2a\u4e8b\u52a1\uff0c\u8fd9\u662f\u9ed8\u8ba4\u7684\u4f20\u64ad\u5c5e\u6027\u503c\u3002<\/section>\n<\/li>\n<li style=\"outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;\">\n<section style=\"margin-top: 5px; margin-bottom: 5px; outline: 0px; max-width: 100%; line-height: 26px; color: #010101; box-sizing: border-box !important; overflow-wrap: break-word !important;\"><code style=\"margin-right: 2px; margin-left: 2px; padding: 2px 4px; outline: 0px; max-width: 100%; font-size: 14px; border-radius: 4px; background-color: rgba(27, 31, 35, 0.05); font-family: 'Operator Mono', Consolas, Monaco, Menlo, monospace; word-break: break-all; color: #009688; box-sizing: border-box !important; overflow-wrap: break-word !important;\">SUPPORTS<\/code>\u00a0\u5982\u679c\u5f53\u524d\u4e0a\u4e0b\u6587\u5b58\u5728\u4e8b\u52a1\uff0c\u5219\u652f\u6301\u4e8b\u52a1\u52a0\u5165\u4e8b\u52a1\uff0c\u5982\u679c\u4e0d\u5b58\u5728\u4e8b\u52a1\uff0c\u5219\u4f7f\u7528\u975e\u4e8b\u52a1\u7684\u65b9\u5f0f\u6267\u884c\u3002<\/section>\n<\/li>\n<li style=\"outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;\">\n<section style=\"margin-top: 5px; margin-bottom: 5px; outline: 0px; max-width: 100%; line-height: 26px; color: #010101; box-sizing: border-box !important; overflow-wrap: break-word !important;\"><code style=\"margin-right: 2px; margin-left: 2px; padding: 2px 4px; outline: 0px; max-width: 100%; font-size: 14px; border-radius: 4px; background-color: rgba(27, 31, 35, 0.05); font-family: 'Operator Mono', Consolas, Monaco, Menlo, monospace; word-break: break-all; color: #009688; box-sizing: border-box !important; overflow-wrap: break-word !important;\">MANDATORY<\/code>\u00a0\u5982\u679c\u5f53\u524d\u4e0a\u4e0b\u6587\u4e2d\u5b58\u5728\u4e8b\u52a1\uff0c\u5426\u5219\u629b\u51fa\u5f02\u5e38\u3002<\/section>\n<\/li>\n<li style=\"outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;\">\n<section style=\"margin-top: 5px; margin-bottom: 5px; outline: 0px; max-width: 100%; line-height: 26px; color: #010101; box-sizing: border-box !important; overflow-wrap: break-word !important;\"><code style=\"margin-right: 2px; margin-left: 2px; padding: 2px 4px; outline: 0px; max-width: 100%; font-size: 14px; border-radius: 4px; background-color: rgba(27, 31, 35, 0.05); font-family: 'Operator Mono', Consolas, Monaco, Menlo, monospace; word-break: break-all; color: #009688; box-sizing: border-box !important; overflow-wrap: break-word !important;\">REQUIRES_NEW<\/code>\u00a0\u6bcf\u6b21\u90fd\u4f1a\u65b0\u5efa\u4e00\u4e2a\u4e8b\u52a1\uff0c\u5e76\u4e14\u540c\u65f6\u5c06\u4e0a\u4e0b\u6587\u4e2d\u7684\u4e8b\u52a1\u6302\u8d77\uff0c\u6267\u884c\u5f53\u524d\u65b0\u5efa\u4e8b\u52a1\u5b8c\u6210\u4ee5\u540e\uff0c\u4e0a\u4e0b\u6587\u4e8b\u52a1\u6062\u590d\u518d\u6267\u884c\u3002<\/section>\n<\/li>\n<li style=\"outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;\">\n<section style=\"margin-top: 5px; margin-bottom: 5px; outline: 0px; max-width: 100%; line-height: 26px; color: #010101; box-sizing: border-box !important; overflow-wrap: break-word !important;\"><code style=\"margin-right: 2px; margin-left: 2px; padding: 2px 4px; outline: 0px; max-width: 100%; font-size: 14px; border-radius: 4px; background-color: rgba(27, 31, 35, 0.05); font-family: 'Operator Mono', Consolas, Monaco, Menlo, monospace; word-break: break-all; color: #009688; box-sizing: border-box !important; overflow-wrap: break-word !important;\">NOT_SUPPORTED<\/code>\u00a0\u5982\u679c\u5f53\u524d\u4e0a\u4e0b\u6587\u4e2d\u5b58\u5728\u4e8b\u52a1\uff0c\u5219\u6302\u8d77\u5f53\u524d\u4e8b\u52a1\uff0c\u7136\u540e\u65b0\u7684\u65b9\u6cd5\u5728\u6ca1\u6709\u4e8b\u52a1\u7684\u73af\u5883\u4e2d\u6267\u884c\u3002<\/section>\n<\/li>\n<li style=\"outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;\">\n<section style=\"margin-top: 5px; margin-bottom: 5px; outline: 0px; max-width: 100%; line-height: 26px; color: #010101; box-sizing: border-box !important; overflow-wrap: break-word !important;\"><code style=\"margin-right: 2px; margin-left: 2px; padding: 2px 4px; outline: 0px; max-width: 100%; font-size: 14px; border-radius: 4px; background-color: rgba(27, 31, 35, 0.05); font-family: 'Operator Mono', Consolas, Monaco, Menlo, monospace; word-break: break-all; color: #009688; box-sizing: border-box !important; overflow-wrap: break-word !important;\">NEVER<\/code>\u00a0\u5982\u679c\u5f53\u524d\u4e0a\u4e0b\u6587\u4e2d\u5b58\u5728\u4e8b\u52a1\uff0c\u5219\u629b\u51fa\u5f02\u5e38\uff0c\u5426\u5219\u5728\u65e0\u4e8b\u52a1\u73af\u5883\u4e0a\u6267\u884c\u4ee3\u7801\u3002<\/section>\n<\/li>\n<li style=\"outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;\">\n<section style=\"margin-top: 5px; margin-bottom: 5px; outline: 0px; max-width: 100%; line-height: 26px; color: #010101; box-sizing: border-box !important; overflow-wrap: break-word !important;\"><code style=\"margin-right: 2px; margin-left: 2px; padding: 2px 4px; outline: 0px; max-width: 100%; font-size: 14px; border-radius: 4px; background-color: rgba(27, 31, 35, 0.05); font-family: 'Operator Mono', Consolas, Monaco, Menlo, monospace; word-break: break-all; color: #009688; box-sizing: border-box !important; overflow-wrap: break-word !important;\">NESTED<\/code>\u00a0\u5982\u679c\u5f53\u524d\u4e0a\u4e0b\u6587\u4e2d\u5b58\u5728\u4e8b\u52a1\uff0c\u5219\u5d4c\u5957\u4e8b\u52a1\u6267\u884c\uff0c\u5982\u679c\u4e0d\u5b58\u5728\u4e8b\u52a1\uff0c\u5219\u65b0\u5efa\u4e8b\u52a1\u3002<\/section>\n<\/li>\n<\/ul>\n<p style=\"margin-bottom: 0px; padding-top: 8px; padding-bottom: 8px; outline: 0px; max-width: 100%; color: #000000; font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, 'PingFang SC', Cambria, Cochin, Georgia, Times, 'Times New Roman', serif; font-size: 16px; white-space: normal; background-color: #ffffff; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\" data-tool=\"mdnice\u7f16\u8f91\u5668\">\u5982\u679c\u6211\u4eec\u5728\u624b\u52a8\u8bbe\u7f6e<code style=\"margin-right: 2px; margin-left: 2px; padding: 2px 4px; outline: 0px; max-width: 100%; font-size: 14px; border-radius: 4px; background-color: rgba(27, 31, 35, 0.05); font-family: 'Operator Mono', Consolas, Monaco, Menlo, monospace; word-break: break-all; color: #009688; box-sizing: border-box !important; overflow-wrap: break-word !important;\">propagation<\/code>\u53c2\u6570\u7684\u65f6\u5019\uff0c\u628a\u4f20\u64ad\u7279\u6027\u8bbe\u7f6e\u9519\u4e86\uff0c\u6bd4\u5982\uff1a<\/p>\n<pre style=\"margin-top: 10px; margin-bottom: 10px; outline: 0px; max-width: 100%; color: #000000; font-size: 16px; text-align: left; background-color: #ffffff; border-radius: 5px; box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px; box-sizing: border-box !important; overflow-wrap: break-word !important;\" data-tool=\"mdnice\u7f16\u8f91\u5668\"><code style=\"padding: 15px 16px 16px; outline: 0px; max-width: 100%; overflow-x: auto; color: #abb2bf; display: -webkit-box; font-family: 'Operator Mono', Consolas, Monaco, Menlo, monospace; font-size: 12px; background: #282c34; border-radius: 5px; box-sizing: border-box !important; overflow-wrap: break-word !important;\"><span style=\"outline: 0px; max-width: 100%; color: #61aeee; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\">@Service<\/span><br style=\"outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;\" \/><span style=\"outline: 0px; max-width: 100%; color: #c678dd; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\">public<\/span>\u00a0<span style=\"outline: 0px; max-width: 100%; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\"><span style=\"outline: 0px; max-width: 100%; color: #c678dd; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\">class<\/span>\u00a0<span style=\"outline: 0px; max-width: 100%; color: #e6c07b; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\">OrderServiceImpl<\/span>\u00a0<\/span>{<br style=\"outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;\" \/><br style=\"outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;\" \/>\u00a0\u00a0\u00a0\u00a0<span style=\"outline: 0px; max-width: 100%; color: #61aeee; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\">@Transactional<\/span>(propagation\u00a0=\u00a0Propagation.NEVER)<br style=\"outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;\" \/>\u00a0\u00a0\u00a0\u00a0<span style=\"outline: 0px; max-width: 100%; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\"><span style=\"outline: 0px; max-width: 100%; color: #c678dd; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\">public<\/span>\u00a0<span style=\"outline: 0px; max-width: 100%; color: #c678dd; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\">void<\/span>\u00a0<span style=\"outline: 0px; max-width: 100%; color: #61aeee; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\">cancelOrder<\/span><span style=\"outline: 0px; max-width: 100%; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\">(UserModel\u00a0userModel)<\/span>\u00a0<\/span>{<br style=\"outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;\" \/>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<span style=\"outline: 0px; max-width: 100%; color: #5c6370; font-style: italic; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\">\/\/\u00a0\u53d6\u6d88\u8ba2\u5355<\/span><br style=\"outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;\" \/>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0cancelOrder(orderDTO);<br style=\"outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;\" \/>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<span style=\"outline: 0px; max-width: 100%; color: #5c6370; font-style: italic; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\">\/\/\u00a0\u8fd8\u539f\u5e93\u5b58<\/span><br style=\"outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;\" \/>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0restoreProductStock(orderDTO.getProductId(),\u00a0orderDTO.getProductCount());<br style=\"outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;\" \/>\u00a0\u00a0\u00a0\u00a0}<br style=\"outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;\" \/>}<br style=\"outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;\" \/><\/code><\/pre>\n<p style=\"margin-bottom: 0px; padding-top: 8px; padding-bottom: 8px; outline: 0px; max-width: 100%; color: #000000; font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, 'PingFang SC', Cambria, Cochin, Georgia, Times, 'Times New Roman', serif; font-size: 16px; white-space: normal; background-color: #ffffff; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\" data-tool=\"mdnice\u7f16\u8f91\u5668\">\u6211\u4eec\u53ef\u4ee5\u770b\u5230<code style=\"margin-right: 2px; margin-left: 2px; padding: 2px 4px; outline: 0px; max-width: 100%; font-size: 14px; border-radius: 4px; background-color: rgba(27, 31, 35, 0.05); font-family: 'Operator Mono', Consolas, Monaco, Menlo, monospace; word-break: break-all; color: #009688; box-sizing: border-box !important; overflow-wrap: break-word !important;\">cancelOrder()<\/code>\u65b9\u6cd5\u7684\u4e8b\u52a1\u4f20\u64ad\u7279\u6027\u5b9a\u4e49\u6210\u4e86<code style=\"margin-right: 2px; margin-left: 2px; padding: 2px 4px; outline: 0px; max-width: 100%; font-size: 14px; border-radius: 4px; background-color: rgba(27, 31, 35, 0.05); font-family: 'Operator Mono', Consolas, Monaco, Menlo, monospace; word-break: break-all; color: #009688; box-sizing: border-box !important; overflow-wrap: break-word !important;\">Propagation.NEVER<\/code>\uff0c\u8fd9\u79cd\u7c7b\u578b\u7684\u4f20\u64ad\u7279\u6027\u4e0d\u652f\u6301\u4e8b\u52a1\uff0c\u5982\u679c\u6709\u4e8b\u52a1\u5219\u4f1a\u629b\u5f02\u5e38\u3002<\/p>\n<h4 style=\"margin: 0.6em auto; padding-left: 10px; outline: 0px; font-weight: bold; font-size: 1.2em; max-width: 100%; color: #000000; font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, 'PingFang SC', Cambria, Cochin, Georgia, Times, 'Times New Roman', serif; text-align: left; white-space: normal; background-color: #ffffff; border-left: 2px dashed #009688; box-sizing: border-box !important; overflow-wrap: break-word !important;\" data-tool=\"mdnice\u7f16\u8f91\u5668\"><span style=\"outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;\">10. \u591a\u7ebf\u7a0b\u8c03\u7528<\/span><\/h4>\n<p style=\"margin-bottom: 0px; padding-top: 8px; padding-bottom: 8px; outline: 0px; max-width: 100%; color: #000000; font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, 'PingFang SC', Cambria, Cochin, Georgia, Times, 'Times New Roman', serif; font-size: 16px; white-space: normal; background-color: #ffffff; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\" data-tool=\"mdnice\u7f16\u8f91\u5668\">\u5728\u5b9e\u9645\u9879\u76ee\u5f00\u53d1\u4e2d\uff0c\u591a\u7ebf\u7a0b\u7684\u4f7f\u7528\u573a\u666f\u8fd8\u662f\u633a\u591a\u7684\u3002\u5982\u679cSpring\u4e8b\u52a1\u7528\u5728\u591a\u7ebf\u7a0b\u573a\u666f\u4e2d\u4f7f\u7528\u4e0d\u5f53\uff0c\u4e5f\u4f1a\u5bfc\u81f4\u4e8b\u52a1\u65e0\u6cd5\u751f\u6548\u3002<\/p>\n<pre style=\"margin-top: 10px; margin-bottom: 10px; outline: 0px; max-width: 100%; color: #000000; font-size: 16px; text-align: left; background-color: #ffffff; border-radius: 5px; box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px; box-sizing: border-box !important; overflow-wrap: break-word !important;\" data-tool=\"mdnice\u7f16\u8f91\u5668\"><code style=\"padding: 15px 16px 16px; outline: 0px; max-width: 100%; overflow-x: auto; color: #abb2bf; display: -webkit-box; font-family: 'Operator Mono', Consolas, Monaco, Menlo, monospace; font-size: 12px; background: #282c34; border-radius: 5px; box-sizing: border-box !important; overflow-wrap: break-word !important;\"><span style=\"outline: 0px; max-width: 100%; color: #61aeee; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\">@Slf<\/span>4j<br style=\"outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;\" \/><span style=\"outline: 0px; max-width: 100%; color: #61aeee; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\">@Service<\/span><br style=\"outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;\" \/><span style=\"outline: 0px; max-width: 100%; color: #c678dd; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\">public<\/span>\u00a0<span style=\"outline: 0px; max-width: 100%; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\"><span style=\"outline: 0px; max-width: 100%; color: #c678dd; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\">class<\/span>\u00a0<span style=\"outline: 0px; max-width: 100%; color: #e6c07b; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\">OrderServiceImpl<\/span>\u00a0<\/span>{<br style=\"outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;\" \/><br style=\"outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;\" \/>\u00a0\u00a0\u00a0\u00a0<span style=\"outline: 0px; max-width: 100%; color: #61aeee; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\">@Autowired<\/span><br style=\"outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;\" \/>\u00a0\u00a0\u00a0\u00a0<span style=\"outline: 0px; max-width: 100%; color: #c678dd; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\">private<\/span>\u00a0OrderMapper\u00a0orderMapper;<br style=\"outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;\" \/>\u00a0\u00a0\u00a0\u00a0<span style=\"outline: 0px; max-width: 100%; color: #61aeee; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\">@Autowired<\/span><br style=\"outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;\" \/>\u00a0\u00a0\u00a0\u00a0<span style=\"outline: 0px; max-width: 100%; color: #c678dd; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\">private<\/span>\u00a0MessageService\u00a0messageService;<br style=\"outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;\" \/><br style=\"outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;\" \/>\u00a0\u00a0\u00a0\u00a0<span style=\"outline: 0px; max-width: 100%; color: #61aeee; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\">@Transactional<\/span><br style=\"outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;\" \/>\u00a0\u00a0\u00a0\u00a0<span style=\"outline: 0px; max-width: 100%; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\"><span style=\"outline: 0px; max-width: 100%; color: #c678dd; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\">public<\/span>\u00a0<span style=\"outline: 0px; max-width: 100%; color: #c678dd; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\">void<\/span>\u00a0<span style=\"outline: 0px; max-width: 100%; color: #61aeee; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\">orderCommit<\/span><span style=\"outline: 0px; max-width: 100%; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\">(orderModel\u00a0orderModel)<\/span>\u00a0<span style=\"outline: 0px; max-width: 100%; color: #c678dd; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\">throws<\/span>\u00a0Exception\u00a0<\/span>{<br style=\"outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;\" \/>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0orderMapper.insertOrder(orderModel);<br style=\"outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;\" \/>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<span style=\"outline: 0px; max-width: 100%; color: #c678dd; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\">new<\/span>\u00a0Thread(()\u00a0-&gt;\u00a0{<br style=\"outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;\" \/>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0messageService.sendSms();<br style=\"outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;\" \/>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0}).start();<br style=\"outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;\" \/>\u00a0\u00a0\u00a0\u00a0}<br style=\"outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;\" \/>}<br style=\"outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;\" \/><br style=\"outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;\" \/><span style=\"outline: 0px; max-width: 100%; color: #61aeee; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\">@Service<\/span><br style=\"outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;\" \/><span style=\"outline: 0px; max-width: 100%; color: #c678dd; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\">public<\/span>\u00a0<span style=\"outline: 0px; max-width: 100%; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\"><span style=\"outline: 0px; max-width: 100%; color: #c678dd; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\">class<\/span>\u00a0<span style=\"outline: 0px; max-width: 100%; color: #e6c07b; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\">MessageService<\/span>\u00a0<\/span>{<br style=\"outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;\" \/><br style=\"outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;\" \/>\u00a0\u00a0\u00a0\u00a0<span style=\"outline: 0px; max-width: 100%; color: #61aeee; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\">@Transactional<\/span><br style=\"outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;\" \/>\u00a0\u00a0\u00a0\u00a0<span style=\"outline: 0px; max-width: 100%; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\"><span style=\"outline: 0px; max-width: 100%; color: #c678dd; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\">public<\/span>\u00a0<span style=\"outline: 0px; max-width: 100%; color: #c678dd; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\">void<\/span>\u00a0<span style=\"outline: 0px; max-width: 100%; color: #61aeee; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\">sendSms<\/span><span style=\"outline: 0px; max-width: 100%; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\">()<\/span>\u00a0<\/span>{<br style=\"outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;\" \/>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<span style=\"outline: 0px; max-width: 100%; color: #5c6370; font-style: italic; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\">\/\/\u00a0\u53d1\u9001\u77ed\u4fe1<\/span><br style=\"outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;\" \/>\u00a0\u00a0\u00a0\u00a0}<br style=\"outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;\" \/>}<br style=\"outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;\" \/><\/code><\/pre>\n<p style=\"margin-bottom: 0px; padding-top: 8px; padding-bottom: 8px; outline: 0px; max-width: 100%; color: #000000; font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, 'PingFang SC', Cambria, Cochin, Georgia, Times, 'Times New Roman', serif; font-size: 16px; white-space: normal; background-color: #ffffff; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\" data-tool=\"mdnice\u7f16\u8f91\u5668\">\u901a\u8fc7\u793a\u4f8b\uff0c\u6211\u4eec\u53ef\u4ee5\u770b\u5230\u8ba2\u5355\u63d0\u4ea4\u7684\u4e8b\u52a1\u65b9\u6cd5<code style=\"margin-right: 2px; margin-left: 2px; padding: 2px 4px; outline: 0px; max-width: 100%; font-size: 14px; border-radius: 4px; background-color: rgba(27, 31, 35, 0.05); font-family: 'Operator Mono', Consolas, Monaco, Menlo, monospace; word-break: break-all; color: #009688; box-sizing: border-box !important; overflow-wrap: break-word !important;\">orderCommit()<\/code>\u4e2d\uff0c\u8c03\u7528\u4e86\u53d1\u9001\u77ed\u4fe1\u7684\u4e8b\u52a1\u65b9\u6cd5<code style=\"margin-right: 2px; margin-left: 2px; padding: 2px 4px; outline: 0px; max-width: 100%; font-size: 14px; border-radius: 4px; background-color: rgba(27, 31, 35, 0.05); font-family: 'Operator Mono', Consolas, Monaco, Menlo, monospace; word-break: break-all; color: #009688; box-sizing: border-box !important; overflow-wrap: break-word !important;\">sendSms()<\/code>\uff0c\u4f46\u662f\u53d1\u9001\u77ed\u4fe1\u7684\u4e8b\u52a1\u65b9\u6cd5<code style=\"margin-right: 2px; margin-left: 2px; padding: 2px 4px; outline: 0px; max-width: 100%; font-size: 14px; border-radius: 4px; background-color: rgba(27, 31, 35, 0.05); font-family: 'Operator Mono', Consolas, Monaco, Menlo, monospace; word-break: break-all; color: #009688; box-sizing: border-box !important; overflow-wrap: break-word !important;\">sendSms()<\/code>\u662f\u53e6\u8d77\u4e86\u4e00\u4e2a\u7ebf\u7a0b\u8c03\u7528\u7684\u3002<\/p>\n<p style=\"margin-bottom: 0px; padding-top: 8px; padding-bottom: 8px; outline: 0px; max-width: 100%; color: #000000; font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, 'PingFang SC', Cambria, Cochin, Georgia, Times, 'Times New Roman', serif; font-size: 16px; white-space: normal; background-color: #ffffff; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\" data-tool=\"mdnice\u7f16\u8f91\u5668\">\u8fd9\u6837\u4f1a\u5bfc\u81f4\u4e24\u4e2a\u65b9\u6cd5\u4e0d\u5728\u540c\u4e00\u4e2a\u7ebf\u7a0b\u4e2d\uff0c\u4ece\u800c\u662f\u4e24\u4e2a\u4e0d\u540c\u7684\u4e8b\u52a1\u3002\u5982\u679c\u662f<code style=\"margin-right: 2px; margin-left: 2px; padding: 2px 4px; outline: 0px; max-width: 100%; font-size: 14px; border-radius: 4px; background-color: rgba(27, 31, 35, 0.05); font-family: 'Operator Mono', Consolas, Monaco, Menlo, monospace; word-break: break-all; color: #009688; box-sizing: border-box !important; overflow-wrap: break-word !important;\">sendSms()<\/code>\u65b9\u6cd5\u4e2d\u629b\u4e86\u5f02\u5e38\uff0c<code style=\"margin-right: 2px; margin-left: 2px; padding: 2px 4px; outline: 0px; max-width: 100%; font-size: 14px; border-radius: 4px; background-color: rgba(27, 31, 35, 0.05); font-family: 'Operator Mono', Consolas, Monaco, Menlo, monospace; word-break: break-all; color: #009688; box-sizing: border-box !important; overflow-wrap: break-word !important;\">orderCommit()<\/code>\u65b9\u6cd5\u4e5f\u56de\u6eda\u662f\u4e0d\u53ef\u80fd\u7684\u3002<\/p>\n<p style=\"margin-bottom: 0px; padding-top: 8px; padding-bottom: 8px; outline: 0px; max-width: 100%; color: #000000; font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, 'PingFang SC', Cambria, Cochin, Georgia, Times, 'Times New Roman', serif; font-size: 16px; white-space: normal; background-color: #ffffff; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\" data-tool=\"mdnice\u7f16\u8f91\u5668\">\u5b9e\u9645\u4e0a\uff0cSpring\u7684\u4e8b\u52a1\u662f\u901a\u8fc7ThreadLocal\u6765\u4fdd\u8bc1\u7ebf\u7a0b\u5b89\u5168\u7684\uff0c\u4e8b\u52a1\u548c\u5f53\u524d\u7ebf\u7a0b\u7ed1\u5b9a\uff0c\u591a\u4e2a\u7ebf\u7a0b\u81ea\u7136\u4f1a\u8ba9\u4e8b\u52a1\u5931\u6548\u3002<\/p>\n<figure style=\"margin-top: 10px; margin-bottom: 10px; outline: 0px; max-width: 100%; color: #000000; font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, 'PingFang SC', Cambria, Cochin, Georgia, Times, 'Times New Roman', serif; font-size: 16px; text-align: left; white-space: normal; background-color: #ffffff; display: flex; flex-direction: column; justify-content: center; align-items: center; box-sizing: border-box !important; overflow-wrap: break-word !important;\" data-tool=\"mdnice\u7f16\u8f91\u5668\"><img decoding=\"async\" class=\"rich_pages wxw-img lazyload\" style=\"margin-right: auto; margin-left: auto; outline: 0px; display: block; box-sizing: border-box !important; overflow-wrap: break-word !important; width: 677px !important; visibility: visible !important; height: auto !important;\" data-src=\"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2023\/05\/20230528050409664.png\" src=\"https:\/\/s.nmxc.ltd\/sakurairo_vision\/@2.6\/load_svg\/inload.svg\" onerror=\"imgError(this)\" data-ratio=\"0.5551558752997602\" data-type=\"png\" data-w=\"834\" \/><noscript><img decoding=\"async\" class=\"rich_pages wxw-img\" style=\"margin-right: auto; margin-left: auto; outline: 0px; display: block; box-sizing: border-box !important; overflow-wrap: break-word !important; width: 677px !important; visibility: visible !important; height: auto !important;\" src=\"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2023\/05\/20230528050409664.png\" data-ratio=\"0.5551558752997602\" data-type=\"png\" data-w=\"834\" \/><\/noscript><\/figure>\n<h2 style=\"margin: 1em auto; padding-left: 10px; outline: 0px; font-weight: bold; font-size: 22px; max-width: 100%; font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, 'PingFang SC', Cambria, Cochin, Georgia, Times, 'Times New Roman', serif; text-align: left; white-space: normal; background-color: #ffffff; color: #009688; border-left: 3px solid #009688; box-sizing: border-box !important; overflow-wrap: break-word !important;\" data-tool=\"mdnice\u7f16\u8f91\u5668\"><span style=\"outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;\">\u603b\u7ed3<\/span><\/h2>\n<p style=\"margin-bottom: 0px; padding-top: 8px; padding-bottom: 8px; outline: 0px; max-width: 100%; color: #000000; font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, 'PingFang SC', Cambria, Cochin, Georgia, Times, 'Times New Roman', serif; font-size: 16px; white-space: normal; background-color: #ffffff; line-height: 26px; box-sizing: border-box !important; overflow-wrap: break-word !important;\" data-tool=\"mdnice\u7f16\u8f91\u5668\">\u672c\u7bc7\u6587\u7ae0\u4e3b\u8981\u662f\u4ecb\u7ecdSpring\u4e8b\u52a1\u4f20\u64ad\u7279\u6027\uff0c\u9610\u660e\u4e86<code style=\"margin-right: 2px; margin-left: 2px; padding: 2px 4px; outline: 0px; max-width: 100%; font-size: 14px; border-radius: 4px; background-color: rgba(27, 31, 35, 0.05); font-family: 'Operator Mono', Consolas, Monaco, Menlo, monospace; word-break: break-all; color: #009688; box-sizing: border-box !important; overflow-wrap: break-word !important;\">@Transactional<\/code>\u6ce8\u89e3\u5c5e\u6027\u7684\u4f7f\u7528\u65b9\u5f0f\uff0c\u901a\u8fc7\u4e0d\u540c\u7684\u4ee3\u7801\u793a\u4f8b\u6f14\u793a\u4e86Spring\u4e8b\u52a1\u5931\u6548\u7684\u5e38\u89c1\u573a\u666f\uff0c\u5982\u679c\u6587\u7ae0\u5bf9\u4f60\u6709\u6240\u5e2e\u52a9\uff0c\u6b22\u8fce \u70b9\u8d5e?+\u8bc4\u8bba?+\u6536\u85cf\u2764<\/p>\n<p style=\"margin-bottom: 0px;\"><strong style=\"outline: 0px; max-width: 100%; text-align: left; color: #222222; font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Helvetica Neue', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei UI', 'Microsoft YaHei', Arial, sans-serif; font-size: 14px; letter-spacing: 0.544px; background-color: #ffffff; visibility: visible; box-sizing: border-box !important; overflow-wrap: break-word !important;\"><span style=\"outline: 0px; max-width: 100%; color: #ff0000; visibility: visible; box-sizing: border-box !important; overflow-wrap: break-word !important;\">\u6b22\u8fce\u5173\u6ce8\u672c\u516c\u4f17\u53f7\uff1a<\/span><\/strong><strong style=\"outline: 0px; max-width: 100%; white-space: normal; text-align: left; color: #222222; font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Helvetica Neue', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei UI', 'Microsoft YaHei', Arial, sans-serif; font-size: 14px; letter-spacing: 0.544px; background-color: #ffffff; visibility: visible; box-sizing: border-box !important; overflow-wrap: break-word !important;\"><span style=\"outline: 0px; max-width: 100%; color: #ff0000; visibility: visible; box-sizing: border-box !important; overflow-wrap: break-word !important;\">\u60a8\u7684\u5173\u6ce8\u662f\u6211\u524d\u884c\u7684\u52a8\u529b\uff01<\/span><\/strong><\/p>\n<section><\/section>\n<p style=\"text-align: left; margin-bottom: 0px;\"><span style=\"font-size: 14px;\"><strong style=\"outline: 0px; max-width: 100%; white-space: normal; text-align: left; color: #222222; font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Helvetica Neue', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei UI', 'Microsoft YaHei', Arial, sans-serif; font-size: 14px; letter-spacing: 0.544px; background-color: #ffffff; visibility: visible; box-sizing: border-box !important; overflow-wrap: break-word !important;\"><span style=\"font-size: 14px; outline: 0px; max-width: 100%; color: #ff0000; visibility: visible; box-sizing: border-box !important; overflow-wrap: break-word !important;\"><span style=\"font-size: 14px; outline: 0px; max-width: 100%; letter-spacing: 0.544px; background-color: #ffffff; text-align: left; widows: 1; caret-color: #3c3c3c; color: rgba(0, 0, 0, 0.8); font-family: Optima-Regular, PingFangTC-light;\">PS\uff1a\u56e0\u4e3a\u516c\u4f17\u53f7\u5e73\u53f0\u66f4\u6539\u4e86\u63a8\u9001\u89c4\u5219\uff0c\u5982\u679c\u4e0d\u60f3\u9519\u8fc7\u5185\u5bb9\uff0c\u8bb0\u5f97\u8bfb\u5b8c\u70b9\u4e00\u4e0b<\/span><span style=\"font-size: 14px; outline: 0px; max-width: 100%; letter-spacing: 0.544px; background-color: #ffffff; text-align: left; widows: 1; caret-color: #3c3c3c; font-family: Optima-Regular, PingFangTC-light; visibility: visible; color: #ff0000;\"><strong style=\"outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;\">\u201c\u5728\u770b\u201d<\/strong><\/span><span style=\"font-size: 14px; outline: 0px; max-width: 100%; letter-spacing: 0.544px; background-color: #ffffff; text-align: left; widows: 1; caret-color: #3c3c3c; color: rgba(0, 0, 0, 0.8); font-family: Optima-Regular, PingFangTC-light;\">\uff0c\u52a0\u4e2a<\/span><span style=\"font-size: 14px; outline: 0px; max-width: 100%; letter-spacing: 0.544px; background-color: #ffffff; text-align: left; widows: 1; caret-color: #3c3c3c; font-family: Optima-Regular, PingFangTC-light; visibility: visible; color: #ff0000;\"><strong style=\"outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;\">\u201c\u661f\u6807\u201d<\/strong><\/span><span style=\"font-size: 14px; outline: 0px; max-width: 100%; letter-spacing: 0.544px; background-color: #ffffff; text-align: left; widows: 1; caret-color: #3c3c3c; color: rgba(0, 0, 0, 0.8); font-family: Optima-Regular, PingFangTC-light;\">\uff0c\u8fd9\u6837\u6bcf\u6b21\u65b0\u6587\u7ae0\u63a8\u9001\u624d\u4f1a\u7b2c\u4e00\u65f6\u95f4\u51fa\u73b0\u5728\u4f60\u7684\u8ba2\u9605\u5217\u8868\u91cc\u3002<\/span><span style=\"font-size: 14px; outline: 0px; max-width: 100%; letter-spacing: 0.544px; background-color: #ffffff; text-align: left; widows: 1; caret-color: #3c3c3c; font-family: Optima-Regular, PingFangTC-light; visibility: visible; color: #ff0000;\">\u70b9<strong style=\"outline: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;\">\u201c\u5728\u770b\u201d\u652f\u6301<\/strong>\u6211\u4eec\u5427!<\/span><\/span><\/strong><\/span><\/p>\n<p style=\"display: none;\">\n<blockquote><p>\u672c\u7bc7\u6587\u7ae0\u6765\u6e90\u4e8e\u5fae\u4fe1\u516c\u4f17\u53f7: \u6570\u636e\u4e4b\u604b<\/p><\/blockquote>\n<\/div>\n","raw":"","protected":false},"excerpt":{"rendered":"<p>\u6b22\u8fce\u5173\u6ce8\u672c\u516c\u4f17\u53f7\uff1a \u672c\u6587\u6574\u7406\u81ea\uff1a \u6982\u8ff0 Spring\u9488\u5bf9Java Transaction API (JTA)\u3001JDBC\u3001Hiber &#8230;<\/p>\n","protected":false},"author":1,"featured_media":1946,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"emotion":"","emotion_color":"","title_style":"","license":"","footnotes":""},"categories":[2,6],"tags":[],"class_list":["post-1949","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-java","category-spring"],"post_thumbnail_image":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2023\/05\/20230528050406947-150x150.jpeg","content_first_image":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2023\/05\/20230528050408634.png","post_medium_image_300":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2023\/05\/20230528050406947-300x127.jpeg","post_thumbnail_image_624":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2023\/05\/20230528050406947.jpeg","post_frist_image":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2023\/05\/20230528050408634.png","post_medium_image":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2023\/05\/20230528050406947-300x127.jpeg","post_large_image":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2023\/05\/20230528050406947.jpeg","post_full_image":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2023\/05\/20230528050406947.jpeg","post_all_images":[{"imagesurl":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2023\/05\/20230528050408634.png","id":"image0"},{"imagesurl":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2023\/05\/20230528050408634.png","id":"image1"},{"imagesurl":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2023\/05\/20230528050409664.png","id":"image2"},{"imagesurl":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2023\/05\/20230528050409664.png","id":"image3"}],"videoAdId":"","listAd":"0","listAdId":"","listAdEvery":6,"total_comments":0,"category_name":"Java","post_date":"2023-06-19","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":299,"next_post_id":1942,"next_post_title":"Spring\u56fd\u9645\u5316","previous_post_id":1331,"previous_post_title":"\u9762\u8bd5\u5b98: \u7ebf\u7a0b\u6c60\u662f\u5982\u4f55\u505a\u5230\u7ebf\u7a0b\u590d\u7528\u7684\uff1f\u6709\u4e86\u89e3\u8fc7\u5417\uff0c\u8bf4\u8bf4\u770b","_links":{"self":[{"href":"https:\/\/xinchewhd.com.cn\/index.php\/wp-json\/wp\/v2\/posts\/1949","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=1949"}],"version-history":[{"count":0,"href":"https:\/\/xinchewhd.com.cn\/index.php\/wp-json\/wp\/v2\/posts\/1949\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/xinchewhd.com.cn\/index.php\/wp-json\/wp\/v2\/media\/1946"}],"wp:attachment":[{"href":"https:\/\/xinchewhd.com.cn\/index.php\/wp-json\/wp\/v2\/media?parent=1949"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/xinchewhd.com.cn\/index.php\/wp-json\/wp\/v2\/categories?post=1949"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/xinchewhd.com.cn\/index.php\/wp-json\/wp\/v2\/tags?post=1949"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}