{"id":7680,"date":"2023-11-28T19:52:18","date_gmt":"2023-11-28T11:52:18","guid":{"rendered":"https:\/\/wx.kaifamiao.info\/?p=7680"},"modified":"2023-12-05T15:48:47","modified_gmt":"2023-12-05T07:48:47","slug":"springboot-zhong-shen-me-shi-zi-dong-pei-zhi","status":"publish","type":"post","link":"http:\/\/wx.kaifamiao.info\/index.php\/2023\/11\/28\/springboot-zhong-shen-me-shi-zi-dong-pei-zhi\/","title":{"rendered":"SpringBoot\u4e2d\u4ec0\u4e48\u662f\u81ea\u52a8\u914d\u7f6e\uff1f"},"content":{"rendered":"<p>\u5728 Spring Boot \u4e2d\uff0c\u81ea\u52a8\u914d\u7f6e\uff08Auto-Configuration\uff09\u662f\u4e00\u79cd\u673a\u5236\uff0c\u7528\u4e8e\u6839\u636e\u5e94\u7528\u7a0b\u5e8f\u7684\u4f9d\u8d56\u5173\u7cfb\u548c\u7c7b\u8def\u5f84\u4e0a\u7684\u8d44\u6e90\u81ea\u52a8\u914d\u7f6e Spring \u5e94\u7528\u7a0b\u5e8f\u3002\u901a\u8fc7\u81ea\u52a8\u914d\u7f6e\uff0cSpring Boot \u53ef\u4ee5\u4e3a\u5f00\u53d1\u8005\u63d0\u4f9b\u4e00\u79cd\u96f6\u914d\u7f6e\u6216\u6700\u5c0f\u914d\u7f6e\u7684\u5f00\u53d1\u4f53\u9a8c\uff0c\u51cf\u5c11\u4e86\u7e41\u7410\u7684\u914d\u7f6e\u5de5\u4f5c\uff0c\u8ba9\u5f00\u53d1\u8005\u80fd\u591f\u66f4\u4e13\u6ce8\u4e8e\u4e1a\u52a1\u903b\u8f91\u7684\u5b9e\u73b0\u3002<\/p>\n<p>\u81ea\u52a8\u914d\u7f6e\u7684\u5173\u952e\u70b9\u5728\u4e8e Spring Boot \u4f1a\u5c1d\u8bd5\u6839\u636e\u5e94\u7528\u7a0b\u5e8f\u7684\u7c7b\u8def\u5f84\u548c\u4f9d\u8d56\u9879\u6765\u5224\u65ad\u5e94\u7528\u7a0b\u5e8f\u6240\u9700\u7684\u914d\u7f6e\uff0c\u5e76\u5728\u542f\u52a8\u65f6\u81ea\u52a8\u5e94\u7528\u8fd9\u4e9b\u914d\u7f6e\u3002\u8fd9\u610f\u5473\u7740\u5f00\u53d1\u8005\u5728\u5f88\u591a\u60c5\u51b5\u4e0b\u65e0\u9700\u624b\u52a8\u914d\u7f6e\u5927\u91cf\u7684 Spring \u76f8\u5173\u7684\u914d\u7f6e\u3002<\/p>\n<p>\u4ee5\u4e0b\u662f\u81ea\u52a8\u914d\u7f6e\u7684\u4e00\u4e9b\u5173\u952e\u7279\u6027\u548c\u4f7f\u7528\u65b9\u5f0f\uff1a<\/p>\n<ol>\n<li>\n<strong>\u6761\u4ef6\u5316\u914d\u7f6e\uff1a<\/strong><\/p>\n<ul>\n<li>Spring Boot \u81ea\u52a8\u914d\u7f6e\u662f\u6761\u4ef6\u5316\u7684\uff0c\u5b83\u4f1a\u6839\u636e\u7279\u5b9a\u7684\u6761\u4ef6\u5224\u65ad\u662f\u5426\u5e94\u8be5\u5e94\u7528\u67d0\u4e2a\u914d\u7f6e\u3002<\/li>\n<li>\u4f8b\u5982\uff0c\u5f53\u7c7b\u8def\u5f84\u4e0a\u5b58\u5728\u67d0\u4e2a\u7279\u5b9a\u7684\u5e93\u65f6\uff0c\u81ea\u52a8\u914d\u7f6e\u5c06\u5c1d\u8bd5\u5e94\u7528\u4e0e\u8be5\u5e93\u76f8\u5173\u7684\u914d\u7f6e\u3002<\/li>\n<\/ul>\n<\/li>\n<li>\n<strong>\u542f\u52a8\u5668\uff08Starters\uff09\uff1a<\/strong><\/p>\n<ul>\n<li>Spring Boot \u63d0\u4f9b\u4e86\u4e00\u7cfb\u5217\u7684\u542f\u52a8\u5668\uff0c\u5b83\u4eec\u662f\u4e00\u7ec4\u9884\u5b9a\u4e49\u7684\u4f9d\u8d56\u96c6\u5408\uff0c\u7528\u4e8e\u7b80\u5316\u9879\u76ee\u7684\u4f9d\u8d56\u7ba1\u7406\u3002<\/li>\n<li>\u901a\u8fc7\u4f7f\u7528\u542f\u52a8\u5668\uff0c\u5f00\u53d1\u8005\u53ef\u4ee5\u8f7b\u677e\u5f15\u5165\u5e38\u7528\u5e93\u548c\u6846\u67b6\uff0c\u800c\u4e0d\u9700\u8981\u624b\u52a8\u7ba1\u7406\u8fd9\u4e9b\u4f9d\u8d56\u3002<\/li>\n<\/ul>\n<\/li>\n<li>\n<strong>\u81ea\u5b9a\u4e49\u914d\u7f6e\uff1a<\/strong><\/p>\n<ul>\n<li>\u5f00\u53d1\u8005\u53ef\u4ee5\u901a\u8fc7\u63d0\u4f9b\u81ea\u5b9a\u4e49\u7684\u914d\u7f6e\u7c7b\u6216\u5c5e\u6027\u6765\u8986\u76d6\u81ea\u52a8\u914d\u7f6e\u3002\u5728 Spring Boot \u5e94\u7528\u7a0b\u5e8f\u4e2d\uff0c\u81ea\u5b9a\u4e49\u914d\u7f6e\u4f1a\u8986\u76d6\u9ed8\u8ba4\u7684\u81ea\u52a8\u914d\u7f6e\u3002<\/li>\n<li>\u901a\u8fc7 <code>@EnableAutoConfiguration<\/code> \u6ce8\u89e3\uff0c\u5f00\u53d1\u8005\u53ef\u4ee5\u9009\u62e9\u6027\u5730\u542f\u7528\u6216\u7981\u7528\u7279\u5b9a\u7684\u81ea\u52a8\u914d\u7f6e\u3002<\/li>\n<\/ul>\n<\/li>\n<li>\n<strong><code>spring.factories<\/code> \u6587\u4ef6\uff1a<\/strong><\/p>\n<ul>\n<li>\u81ea\u52a8\u914d\u7f6e\u7684\u89c4\u5219\u548c\u6761\u4ef6\u901a\u5e38\u5b9a\u4e49\u5728 <code>spring.factories<\/code> \u6587\u4ef6\u4e2d\u3002\u8fd9\u4e2a\u6587\u4ef6\u4f4d\u4e8e\u7c7b\u8def\u5f84\u7684 <code>META-INF<\/code> \u76ee\u5f55\u4e0b\uff0c\u5176\u4e2d\u5305\u542b\u4e86\u81ea\u52a8\u914d\u7f6e\u7684\u7c7b\u548c\u6761\u4ef6\u3002<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n<p>\u81ea\u52a8\u914d\u7f6e\u7684\u673a\u5236\u4f7f\u5f97 Spring Boot \u5e94\u7528\u7a0b\u5e8f\u7684\u5f00\u53d1\u53d8\u5f97\u66f4\u52a0\u4fbf\u6377\uff0c\u540c\u65f6\u4e5f\u63d0\u9ad8\u4e86\u5e94\u7528\u7a0b\u5e8f\u7684\u53ef\u7ef4\u62a4\u6027\u548c\u53ef\u6269\u5c55\u6027\u3002\u5728\u5927\u591a\u6570\u60c5\u51b5\u4e0b\uff0c\u5f00\u53d1\u8005\u53ef\u4ee5\u901a\u8fc7\u7b80\u5355\u7684\u5f15\u5165\u542f\u52a8\u5668\u548c\u63d0\u4f9b\u6781\u5c11\u6216\u6ca1\u6709\u914d\u7f6e\u7684\u65b9\u5f0f\uff0c\u5c31\u80fd\u591f\u542f\u52a8\u548c\u8fd0\u884c\u4e00\u4e2a\u529f\u80fd\u5b8c\u6574\u7684 Spring Boot \u5e94\u7528\u7a0b\u5e8f\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5728 Spring Boot \u4e2d\uff0c\u81ea\u52a8\u914d\u7f6e\uff08Auto-Configuration\uff09\u662f\u4e00\u79cd\u673a\u5236\uff0c\u7528\u4e8e\u6839\u636e\u5e94\u7528\u7a0b\u5e8f\u7684 [&hellip;]<\/p>\n","protected":false},"author":9,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[100],"tags":[],"class_list":["post-7680","post","type-post","status-publish","format-standard","hentry","category-springboot"],"_links":{"self":[{"href":"http:\/\/wx.kaifamiao.info\/index.php\/wp-json\/wp\/v2\/posts\/7680","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/wx.kaifamiao.info\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/wx.kaifamiao.info\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/wx.kaifamiao.info\/index.php\/wp-json\/wp\/v2\/users\/9"}],"replies":[{"embeddable":true,"href":"http:\/\/wx.kaifamiao.info\/index.php\/wp-json\/wp\/v2\/comments?post=7680"}],"version-history":[{"count":2,"href":"http:\/\/wx.kaifamiao.info\/index.php\/wp-json\/wp\/v2\/posts\/7680\/revisions"}],"predecessor-version":[{"id":16541,"href":"http:\/\/wx.kaifamiao.info\/index.php\/wp-json\/wp\/v2\/posts\/7680\/revisions\/16541"}],"wp:attachment":[{"href":"http:\/\/wx.kaifamiao.info\/index.php\/wp-json\/wp\/v2\/media?parent=7680"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/wx.kaifamiao.info\/index.php\/wp-json\/wp\/v2\/categories?post=7680"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/wx.kaifamiao.info\/index.php\/wp-json\/wp\/v2\/tags?post=7680"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}