{"id":96031,"date":"2024-04-11T14:54:49","date_gmt":"2024-04-11T06:54:49","guid":{"rendered":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/96031.html"},"modified":"2024-04-11T14:54:51","modified_gmt":"2024-04-11T06:54:51","slug":"%e9%83%bd%e6%9c%89%e5%93%aa%e4%ba%9bjava%e4%b8%ad%e9%97%b4%e4%bb%b6","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/96031.html","title":{"rendered":"\u90fd\u6709\u54ea\u4e9bjava\u4e2d\u95f4\u4ef6"},"content":{"rendered":"<p style=\"text-align:center\"><img decoding=\"async\" src=\"https:\/\/cdn-kb.worktile.com\/kb\/wp-content\/uploads\/2024\/04\/02172529\/3a67a914-5346-4dd1-ab4b-6bb2a059f473.webp\" alt=\"\u90fd\u6709\u54ea\u4e9bjava\u4e2d\u95f4\u4ef6\" \/><\/p>\n<p><p><strong>Java\u4e2d\u95f4\u4ef6<\/strong> \u662f\u4f4d\u4e8e\u64cd\u4f5c\u7cfb\u7edf\u548c\u5e94\u7528\u7a0b\u5e8f\u4e4b\u95f4\u7684\u4e00\u79cd\u8f6f\u4ef6\uff0c\u7528\u6765\u7b80\u5316\u5e94\u7528\u7684\u5f00\u53d1\u3001\u7ba1\u7406\u548c\u7ef4\u62a4\u3002\u5178\u578b\u7684Java\u4e2d\u95f4\u4ef6\u5305\u62ec<strong>\u5e94\u7528\u670d\u52a1\u5668\u3001\u6d88\u606f\u961f\u5217\u3001\u4e8b\u52a1\u5904\u7406\u5668<\/strong>\u7b49\u3002\u5176\u4e2d\uff0c<strong>\u5e94\u7528\u670d\u52a1\u5668<\/strong>\u5982 Apache Tomcat \u548c JBoss WildFly \u63d0\u4f9b\u4e86\u5b9e\u73b0\u4f01\u4e1a\u7ea7\u5e94\u7528\u7684\u73af\u5883\uff0c\u5b83\u4eec\u652f\u6301\u591a\u79cdJava EE\u89c4\u8303\uff0c\u63d0\u4f9b\u6570\u636e\u5e93\u8fde\u63a5\u3001\u5b89\u5168\u3001\u4e8b\u52a1\u7ba1\u7406\u7b49\u670d\u52a1\u3002<\/p>\n<\/p>\n<p><p>\u5728\u5c55\u5f00\u8be6\u7ec6\u63cf\u8ff0\u4e4b\u524d\uff0c\u8ba9\u6211\u4eec\u9996\u5148\u68b3\u7406\u4e00\u4e0b\u5e38\u89c1\u7684Java\u4e2d\u95f4\u4ef6\u7c7b\u578b\u548c\u5b83\u4eec\u7684\u4f5c\u7528\u3002<\/p>\n<\/p>\n<p><p>\u4e00\u3001<strong>\u5e94\u7528\u670d\u52a1\u5668<\/strong><\/p>\n<\/p>\n<p><p>\u5e94\u7528\u670d\u52a1\u5668\u662fJava\u4e2d\u95f4\u4ef6\u7684\u6838\u5fc3\u3002\u5b83\u63d0\u4f9b\u4e86\u8fd0\u884cJava EE\u7ec4\u4ef6\u6240\u9700\u7684\u5404\u79cd\u670d\u52a1\u548cAPI\u3002\u4f8b\u5982\uff0c<strong>JBoss WildFly<\/strong>\u3001<strong>Apache Tomcat<\/strong> \u548c <strong>IBM WebSphere<\/strong> \u90fd\u662f\u6d41\u884c\u7684Java\u5e94\u7528\u670d\u52a1\u5668\u3002<\/p>\n<\/p>\n<ul>\n<li><strong>JBoss WildFly<\/strong> \u4e0d\u4ec5\u662f\u8f7b\u91cf\u7ea7\u548c\u6a21\u5757\u5316\u7684\uff0c\u8fd8\u652f\u6301\u6700\u65b0\u7684Java EE\u89c4\u8303\u548c\u5fae\u670d\u52a1\u67b6\u6784\u3002<\/li>\n<li><strong>Apache Tomcat<\/strong> \u867d\u7136\u662f\u4e00\u4e2a\u8f7b\u91cf\u7ea7\u7684\u5e94\u7528\u670d\u52a1\u5668\uff0c\u901a\u5e38\u88ab\u79f0\u4e3aServlet\u5bb9\u5668\uff0c\u4f46\u5b83\u975e\u5e38\u6d41\u884c\uff0c\u56e0\u4e3a\u5b83\u65e2\u7b80\u5355\u6613\u7528\u53c8\u7a33\u5b9a\u53ef\u9760\u3002<\/li>\n<li><strong>IBM WebSphere<\/strong> \u63d0\u4f9b\u4e86\u4e00\u4e2a\u66f4\u52a0\u5065\u58ee\u7684\u4f01\u4e1a\u7ea7\u73af\u5883\uff0c\u5b83\u80fd\u591f\u652f\u6301\u5927\u89c4\u6a21\u548c\u9ad8\u4e8b\u52a1\u91cf\u7684\u5e94\u7528\u7a0b\u5e8f\u3002<\/li>\n<\/ul>\n<p><p>\u4e8c\u3001<strong>\u6d88\u606f\u961f\u5217<\/strong><\/p>\n<\/p>\n<p><p>\u6d88\u606f\u961f\u5217\u4e2d\u95f4\u4ef6\u63d0\u4f9b\u4e86\u5e94\u7528\u7a0b\u5e8f\u4e4b\u95f4\u7684\u5f02\u6b65\u901a\u4fe1\u80fd\u529b\u3002<strong>Apache Kafka<\/strong> \u548c <strong>RabbitMQ<\/strong> \u662f\u8fd9\u7c7b\u4e2d\u95f4\u4ef6\u4e2d\u975e\u5e38\u77e5\u540d\u7684\u4f8b\u5b50\u3002<\/p>\n<\/p>\n<ul>\n<li><strong>Apache Kafka<\/strong> \u8bbe\u8ba1\u7528\u4e8e\u5904\u7406\u9ad8\u541e\u5410\u91cf\u7684\u6570\u636e\u6d41\uff0c\u5b83\u5728\u5206\u5e03\u5f0f\u7cfb\u7edf\u548c\u6d41\u6570\u636e\u5e73\u53f0\u5c42\u9762\u663e\u793a\u4e86\u5b83\u5f3a\u5927\u7684\u80fd\u529b\u3002<\/li>\n<li><strong>RabbitMQ<\/strong> \u662f\u4e00\u4e2a\u5f00\u6e90\u6d88\u606f\u4ee3\u7406\uff0c\u652f\u6301\u591a\u79cd\u6d88\u606f\u961f\u5217\u534f\u8bae\uff0c\u53ef\u4ee5\u7528\u6765\u5b9e\u73b0\u590d\u6742\u7684\u6d88\u606f\u8def\u7531\u3001\u8d1f\u8f7d\u5e73\u8861\u548c\u6301\u4e45\u5316\u3002<\/li>\n<\/ul>\n<p><p>\u4e09\u3001<strong>\u4e8b\u52a1\u5904\u7406\u5668<\/strong><\/p>\n<\/p>\n<p><p>\u4e8b\u52a1\u5904\u7406\u4e2d\u95f4\u4ef6\uff0c\u5982 <strong>Atomikos<\/strong> \u548c <strong>JBoss Transactions<\/strong>\uff0c\u8d1f\u8d23\u8de8\u8d44\u6e90\u534f\u8c03\u4e8b\u52a1\uff0c\u786e\u4fdd\u6570\u636e\u7684\u4e00\u81f4\u6027\u548c\u53ef\u9760\u6027\u3002<\/p>\n<\/p>\n<ul>\n<li><strong>Atomikos<\/strong> \u63d0\u4f9b\u4e86\u4e00\u79cd\u7b80\u5355\u7684\u65b9\u5f0f\u6765\u7ba1\u7406\u4e0d\u540c\u6570\u636e\u5e93\u548c\u6d88\u606f\u670d\u52a1\u4e4b\u95f4\u7684\u4e8b\u52a1\u3002<\/li>\n<li><strong>JBoss Transactions<\/strong> \u662f\u4e00\u4e2a\u591a\u529f\u80fd\u4e8b\u52a1\u7ba1\u7406\u5668\uff0c\u5b83\u652f\u6301\u957f\u8dd1\u4e8b\u52a1\u548c\u5d4c\u5957\u4e8b\u52a1\u3002<\/li>\n<\/ul>\n<p><p>\u56db\u3001<strong>\u7f13\u5b58\u7cfb\u7edf<\/strong><\/p>\n<\/p>\n<p><p>\u7f13\u5b58\u7cfb\u7edf\u901a\u8fc7\u63d0\u4f9b\u5feb\u901f\u7684\u6570\u636e\u8bbf\u95ee\u6765\u63d0\u5347\u5e94\u7528\u7684\u6027\u80fd\u3002<strong>Ehcache<\/strong> \u548c <strong>Redis<\/strong> \u662f\u8fd9\u4e2a\u9886\u57df\u80fd\u627e\u5230\u7684\u4e24\u4e2a\u6770\u51fa\u4ee3\u8868\u3002<\/p>\n<\/p>\n<ul>\n<li><strong>Ehcache<\/strong> \u662f\u4e00\u4e2a\u7eafJava\u7684\u7f13\u5b58\uff0c\u4e0eHibernate\u8fd9\u7c7bORM\u6846\u67b6\u6709\u5f88\u597d\u7684\u96c6\u6210\u3002<\/li>\n<li><strong>Redis<\/strong> \u4e0d\u4ec5\u80fd\u591f\u4f5c\u4e3a\u7f13\u5b58\u4f7f\u7528\uff0c\u8fd8\u63d0\u4f9b\u4e86\u6570\u636e\u7ed3\u6784\u5b58\u50a8\u7684\u80fd\u529b\uff0c\u652f\u6301\u591a\u79cd\u6570\u636e\u7c7b\u578b\u3002<\/li>\n<\/ul>\n<p><p>\u4e94\u3001<strong>\u96c6\u6210\u6846\u67b6<\/strong><\/p>\n<\/p>\n<p><p>\u96c6\u6210\u6846\u67b6\uff0c\u5982 <strong>Apache Camel<\/strong> \u548c <strong>Spring Integration<\/strong>\uff0c\u5e2e\u52a9\u5f00\u53d1\u8005\u4ee5\u58f0\u660e\u6027\u7684\u65b9\u5f0f\u6765\u96c6\u6210\u4e0d\u540c\u7684\u5e94\u7528\u548c\u670d\u52a1\u7ec4\u4ef6\u3002<\/p>\n<\/p>\n<ul>\n<li><strong>Apache Camel<\/strong> \u63d0\u4f9b\u4e86\u4e30\u5bcc\u7684\u4f01\u4e1a\u96c6\u6210\u6a21\u5f0f(EIPs)\u5b9e\u73b0\uff0c\u5e76\u652f\u6301\u5927\u91cf\u7684\u4f20\u8f93\u534f\u8bae\u548c\u6570\u636e\u683c\u5f0f\u3002<\/li>\n<li><strong>Spring Integration<\/strong> \u662f\u4e00\u4e2a\u4e0eSpring\u751f\u6001\u7d27\u5bc6\u7ed3\u5408\u7684\u6846\u67b6\uff0c\u5b83\u7b80\u5316\u4e86\u6d88\u606f\u4f20\u9012\u7684\u5f00\u53d1\u548c\u4e8b\u4ef6\u9a71\u52a8\u7684\u5e94\u7528\u8bbe\u8ba1\u3002<\/li>\n<\/ul>\n<p><p>\u516d\u3001<strong>ORM\u6846\u67b6<\/strong><\/p>\n<\/p>\n<p><p>\u5bf9\u8c61\u5173\u7cfb\u6620\u5c04(ORM)\u6846\u67b6\uff0c\u5982 <strong>Hibernate<\/strong> \u548c <strong>MyBatis<\/strong>\uff0c\u662f\u7528\u4e8e\u6570\u636e\u5e93\u64cd\u4f5c\u7684\u4e2d\u95f4\u4ef6\uff0c\u5b83\u4eec\u901a\u8fc7\u6620\u5c04\u5bf9\u8c61\u5230\u6570\u636e\u5e93\u8868\uff0c\u7b80\u5316\u4e86\u6570\u636e\u5e93\u7684CRUD\u64cd\u4f5c\u3002<\/p>\n<\/p>\n<ul>\n<li><strong>Hibernate<\/strong> \u662f\u4e00\u4e2a\u5168\u529f\u80fd\u7684ORM\u6846\u67b6\uff0c\u5b83\u901a\u8fc7Session\uff08\u4f1a\u8bdd\uff09\u548c\u4e8b\u52a1\u6765\u7ba1\u7406\u6570\u636e\u5e93\u64cd\u4f5c\uff0c\u652f\u6301\u5ef6\u8fdf\u52a0\u8f7d\u548c\u7f13\u5b58\u7b56\u7565\u3002<\/li>\n<li><strong>MyBatis<\/strong> \u5c06SQL\u8bed\u53e5\u4e0eJava\u4ee3\u7801\u5206\u79bb\uff0c\u901a\u8fc7XML\u6216\u6ce8\u89e3\u65b9\u5f0f\u914d\u7f6eSQL\u8bed\u53e5\uff0c\u63d0\u4f9b\u4e86\u66f4\u7cbe\u7ec6\u7684\u6570\u636e\u64cd\u4f5c\u63a7\u5236\u3002<\/li>\n<\/ul>\n<p><p>\u6b63\u6587\u5185\u5bb9\u4e3b\u8981\u9488\u5bf9\u8fd9\u516d\u7c7b\u4e2d\u95f4\u4ef6\u7684\u529f\u80fd\u548c\u7528\u9014\u8fdb\u884c\u8be6\u7ec6\u7684\u8ba8\u8bba\u3002<\/p>\n<\/p>\n<h2><strong>\u76f8\u5173\u95ee\u7b54FAQs\uff1a<\/strong><\/h2>\n<p><strong>1.  Java\u4e2d\u95f4\u4ef6\u6709\u54ea\u4e9b\u5e38\u89c1\u7684\u7c7b\u578b\uff1f<\/strong><\/p>\n<p>Java\u4e2d\u95f4\u4ef6\u662f\u6307\u8fd0\u884c\u5728Java\u865a\u62df\u673a\u4e4b\u4e0a\u7684\u8f6f\u4ef6\uff0c\u7528\u4e8e\u63d0\u4f9b\u5404\u79cd\u670d\u52a1\u548c\u529f\u80fd\u3002\u5e38\u89c1\u7684Java\u4e2d\u95f4\u4ef6\u7c7b\u578b\u5305\u62ec\uff1a\u5e94\u7528\u670d\u52a1\u5668\u3001\u6d88\u606f\u4e2d\u95f4\u4ef6\u3001\u7f13\u5b58\u4e2d\u95f4\u4ef6\u3001\u96c6\u7fa4\u4e2d\u95f4\u4ef6\u548c\u6570\u636e\u8bbf\u95ee\u4e2d\u95f4\u4ef6\u7b49\u3002\u6bcf\u79cd\u4e2d\u95f4\u4ef6\u90fd\u6709\u4e0d\u540c\u7684\u7528\u9014\u548c\u7279\u70b9\uff0c\u53ef\u4ee5\u6839\u636e\u5177\u4f53\u7684\u9700\u6c42\u9009\u62e9\u5408\u9002\u7684\u4e2d\u95f4\u4ef6\u6765\u4f7f\u7528\u3002<\/p>\n<p><strong>2.  \u54ea\u4e9b\u6d41\u884c\u7684Java\u4e2d\u95f4\u4ef6\u53ef\u4ee5\u7528\u4e8e\u6784\u5efa\u5206\u5e03\u5f0f\u7cfb\u7edf\uff1f<\/strong><\/p>\n<p>\u6784\u5efa\u5206\u5e03\u5f0f\u7cfb\u7edf\u65f6\uff0c\u5e38\u5e38\u9700\u8981\u4f9d\u8d56Java\u4e2d\u95f4\u4ef6\u6765\u5b9e\u73b0\u4e0d\u540c\u670d\u52a1\u4e4b\u95f4\u7684\u901a\u4fe1\u548c\u534f\u8c03\u3002\u4e00\u4e9b\u6d41\u884c\u7684Java\u4e2d\u95f4\u4ef6\u53ef\u4ee5\u7528\u4e8e\u6784\u5efa\u5206\u5e03\u5f0f\u7cfb\u7edf\uff0c\u5982Apache Kafka\u3001RabbitMQ\u3001Apache Cassandra\u3001Redis\u7b49\u3002\u8fd9\u4e9b\u4e2d\u95f4\u4ef6\u63d0\u4f9b\u7684\u529f\u80fd\u5305\u62ec\u5206\u5e03\u5f0f\u6d88\u606f\u961f\u5217\u3001\u6570\u636e\u7f13\u5b58\u3001\u5206\u5e03\u5f0f\u6570\u636e\u5e93\u7b49\uff0c\u53ef\u4ee5\u5e2e\u52a9\u5f00\u53d1\u4eba\u5458\u6784\u5efa\u53ef\u4f38\u7f29\u3001\u9ad8\u53ef\u9760\u6027\u7684\u5206\u5e03\u5f0f\u7cfb\u7edf\u3002<\/p>\n<p><strong>3.  \u6709\u54ea\u4e9bJava\u4e2d\u95f4\u4ef6\u9002\u7528\u4e8e\u5927\u89c4\u6a21\u7f51\u7ad9\u7684\u9ad8\u5e76\u53d1\u573a\u666f\uff1f<\/strong><\/p>\n<p>\u5728\u5927\u89c4\u6a21\u7f51\u7ad9\u7684\u9ad8\u5e76\u53d1\u573a\u666f\u4e0b\uff0c\u9009\u62e9\u9002\u5408\u7684Java\u4e2d\u95f4\u4ef6\u662f\u975e\u5e38\u91cd\u8981\u7684\u3002\u4e00\u4e9b\u53ef\u4ee5\u5e94\u5bf9\u9ad8\u5e76\u53d1\u573a\u666f\u7684Java\u4e2d\u95f4\u4ef6\u5305\u62ecNginx\u3001Apache Tomcat\u3001Netty\u7b49\u3002Nginx\u662f\u4e00\u4e2a\u9ad8\u6027\u80fd\u7684\u53cd\u5411\u4ee3\u7406\u670d\u52a1\u5668\uff0c\u53ef\u4ee5\u5904\u7406\u5927\u91cf\u5e76\u53d1\u8bf7\u6c42\uff1bApache Tomcat\u662f\u4e00\u4e2a\u6d41\u884c\u7684Java\u5e94\u7528\u670d\u52a1\u5668\uff0c\u5177\u6709\u826f\u597d\u7684\u5e76\u53d1\u80fd\u529b\uff1bNetty\u662f\u4e00\u4e2a\u57fa\u4e8e\u4e8b\u4ef6\u9a71\u52a8\u7684\u5f02\u6b65\u7f51\u7edc\u6846\u67b6\uff0c\u9002\u7528\u4e8e\u9ad8\u6027\u80fd\u548c\u9ad8\u5e76\u53d1\u7684\u573a\u666f\u3002\u6839\u636e\u5177\u4f53\u7684\u9700\u6c42\uff0c\u53ef\u4ee5\u9009\u62e9\u5408\u9002\u7684\u4e2d\u95f4\u4ef6\u6765\u5e94\u5bf9\u9ad8\u5e76\u53d1\u7684\u6311\u6218\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"Java\u4e2d\u95f4\u4ef6 \u662f\u4f4d\u4e8e\u64cd\u4f5c\u7cfb\u7edf\u548c\u5e94\u7528\u7a0b\u5e8f\u4e4b\u95f4\u7684\u4e00\u79cd\u8f6f\u4ef6\uff0c\u7528\u6765\u7b80\u5316\u5e94\u7528\u7684\u5f00\u53d1\u3001\u7ba1\u7406\u548c\u7ef4\u62a4\u3002\u5178\u578b\u7684Java\u4e2d\u95f4\u4ef6\u5305 [&hellip;]","protected":false},"author":3,"featured_media":96036,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[37],"tags":[],"acf":[],"_links":{"self":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/96031"}],"collection":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/comments?post=96031"}],"version-history":[{"count":0,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/96031\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/96036"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=96031"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=96031"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=96031"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}