{"id":576,"date":"2023-03-23T21:28:47","date_gmt":"2023-03-23T13:28:47","guid":{"rendered":""},"modified":"2023-03-23T21:28:47","modified_gmt":"2023-03-23T13:28:47","slug":"SpringBoot \u6559\u7a0b","status":"publish","type":"post","link":"https:\/\/bianchenghao6.com\/576.html","title":{"rendered":"SpringBoot \u6559\u7a0b"},"content":{"rendered":"
\n
<\/p>\n
<\/p>\n
Spring Boot\u4e2d\u4f7f\u7528\u4e86\u4f9d\u8d56\u9879\u6ce8\u5165\u65b9\u6cd5\u3002<\/span> Spring Data: <\/strong>\u5b83\u7b80\u5316\u4e86\u6765\u81ea\u5173\u7cfb\u6570\u636e\u5e93\u548c NoSQL <\/strong>\u6570\u636e\u5e93\u7684\u6570\u636e\u8bbf\u95ee\u3002<\/span> \u5b83\u521b\u5efa\u72ec\u7acb<\/strong> Spring\u5e94\u7528\u7a0b\u5e8f\uff0c\u8fd9\u4e9b\u5e94\u7528\u7a0b\u5e8f\u53ef\u4ee5\u4f7f\u7528Java -jar <\/strong>\u542f\u52a8\u3002<\/span> \u63d0\u4f9b\u6709\u76ee\u7684\u7684\u5f00\u53d1\u65b9\u6cd5<\/span> Java 1.8 <\/span> Web\u5f00\u53d1<\/span> <\/code>\n <\/div>\n <\/body>
\n \u5b83\u5305\u542b\u5f3a\u5927\u7684\u6570\u636e\u5e93\u4e8b\u52a1\u7ba1\u7406\u529f\u80fd\u3002<\/span>
\n \u5b83\u7b80\u5316\u4e86\u4e0e\u5176\u4ed6Java\u6846\u67b6(\u5982JPA\/Hibernate ORM\uff0cStruts\u7b49)\u7684\u96c6\u6210\u3002<\/span>
\n \u5b83\u51cf\u5c11\u4e86\u5e94\u7528\u7a0b\u5e8f\u7684\u6210\u672c\u548c\u5f00\u53d1\u65f6\u95f4\u3002<\/span> <\/p>\n
\n Spring Batch: <\/strong>\u5b83\u63d0\u4f9b\u4e86\u5f3a\u5927\u7684\u6279\u5904\u7406<\/strong>\u5904\u7406\u3002<\/span>
\n Spring Security: <\/strong>\u8fd9\u662f\u4e00\u4e2a\u5b89\u5168\u6846\u67b6\uff0c\u53ef\u4e3a\u5e94\u7528\u7a0b\u5e8f\u63d0\u4f9b\u5f3a\u5927\u7684\u5b89\u5168\u6027<\/strong>\u3002<\/span>
\n Spring Social: <\/strong>\u5b83\u652f\u6301\u4e0eLinkedIn\u7b49\u793e\u4ea4\u7f51\u7edc<\/strong>\u96c6\u6210\u3002<\/span>
\n Spring Integration: <\/strong>\u5b83\u662f\u4f01\u4e1a\u96c6\u6210\u6a21\u5f0f\u7684\u5b9e\u73b0\u3002\u4f7f\u7528\u8f7b\u91cf\u7ea7\u6d88\u606f\u4f20\u9012\u548c\u58f0\u660e\u6027\u9002\u914d\u5668\uff0c\u5b83\u6709\u52a9\u4e8e\u4e0e\u5176\u4ed6\u4f01\u4e1a\u5e94\u7528\u7a0b\u5e8f<\/strong>\u96c6\u6210\u3002<\/span> <\/p>\n Spring Boot\u7684\u4f18\u70b9<\/h2>\n
\n \u501f\u52a9\u4e0d\u540c\u7684\u5d4c\u5165\u5f0f<\/strong> HTTP\u670d\u52a1\u5668(\u4f8b\u5982 Tomcat\uff0cJetty <\/strong>\u7b49)\uff0c\u5b83\u53ef\u4ee5\u8f7b\u677e\u6d4b\u8bd5Web\u5e94\u7528\u7a0b\u5e8f\u3002\u6211\u4eec\u4e0d\u9700\u8981\u90e8\u7f72WAR\u6587\u4ef6\u3002<\/span>
\n \u5b83\u63d0\u4f9b\u4e86\u6709\u7528\u7684' starter <\/strong>'POM\uff0c\u4ee5\u7b80\u5316\u6211\u4eec\u7684Maven\u914d\u7f6e\u3002<\/span>
\n \u5b83\u63d0\u4f9b\u4e86production-ready<\/strong>\u529f\u80fd\uff0c\u4f8b\u5982metrics, health checks<\/strong>\u548cexternalized configuration.<\/strong>\u3002<\/span>
\n \u4e0d\u9700\u8981 XML <\/strong>\u914d\u7f6e\u3002<\/span>
\n \u5b83\u63d0\u4f9b\u4e86\u4e00\u4e2a\u7528\u4e8e\u5f00\u53d1\u548c\u6d4b\u8bd5Spring Boot\u5e94\u7528\u7a0b\u5e8f\u7684 CLI <\/strong>\u5de5\u5177\u3002<\/span>
\n \u5b83\u63d0\u4f9b\u4e86\u8bb8\u591a\u63d2\u4ef6<\/strong>\u3002<\/span>
\n \u5b83\u8fd8\u6700\u5927\u9650\u5ea6\u5730\u51cf\u5c11\u4e86\u7f16\u5199\u591a\u4e2a\u6837\u677f\u4ee3\u7801<\/strong>(\u5fc5\u987b\u5728\u51e0\u4e4e\u6ca1\u6709\u4efb\u4f55\u6539\u52a8\u7684\u60c5\u51b5\u4e0b\u5c06\u5176\u5305\u542b\u5728\u8bb8\u591a\u5730\u65b9)\uff0cXML\u914d\u7f6e\u548c\u6ce8\u91ca\u7684\u60c5\u51b5\u3002<\/span>
\n \u5b83\u63d0\u9ad8\u751f\u4ea7\u529b<\/strong>\u5e76\u51cf\u5c11\u5f00\u53d1\u65f6\u95f4\u3002<\/span> <\/p>\n Spring Boot\u7684\u9650\u5236<\/h2>\n
Spring Boot\u7684\u76ee\u6807<\/h2>\n
\n \u5f00\u53d1\uff0c\u5355\u5143\u6d4b\u8bd5<\/strong>\u548c
\n \u96c6\u6210\u6d4b\u8bd5<\/strong>\u65f6\u95f4\u3002\n <\/div>\n
\n \u907f\u514d\u5b9a\u4e49\u66f4\u591a\u7684\u6ce8\u91ca\u914d\u7f6e<\/span>
\n \u907f\u514d\u7f16\u5199\u5927\u91cf\u5bfc\u5165\u8bed\u53e5<\/span>
\n \u907f\u514dXML\u914d\u7f6e\u3002<\/span> <\/p>\n
\n \u5f00\u53d1\u65f6\u95f4\uff0c\u5f00\u53d1\u4eba\u5458\u5de5\u4f5c\u91cf<\/strong>\u5e76
\n \u63d0\u9ad8\u4e86\u751f\u4ea7\u529b<\/strong>\u3002\n <\/div>\n Spring Boot\u7684\u5148\u51b3\u6761\u4ef6<\/h2>\n
\n Spring Tool Suite <\/strong>(STS)IDE\u3002\n <\/div>\n
\n Maven 3.0 + <\/span>
\n Spring Framework 5.0.0.BUILD-SNAPSHOT <\/span>
\n \u5efa\u8bae\u4f7f\u7528IDE(Spring\u5de5\u5177\u5957\u4ef6)\u3002<\/span> <\/p>\n Spring Boot\u529f\u80fd<\/h2>\n
\n SpringApplication <\/span>
\n \u5e94\u7528\u7a0b\u5e8f\u4e8b\u4ef6\u548c\u4fa6\u542c\u5668<\/span>
\n \u5e94\u7528\u7ba1\u7406<\/span>
\n \u5916\u90e8\u914d\u7f6e<\/span>
\n \u5c5e\u6027\u6587\u4ef6<\/span>
\n YAML\u652f\u6301<\/span>
\n \u7c7b\u578b\u5b89\u5168\u914d\u7f6e<\/span>
\n \u65e5\u5fd7<\/span>
\n \u5b89\u5168\u6027<\/span> <\/p>\n
\n Tomcat\uff0cJetty <\/strong>\u6216Undertow\u7b49\u5d4c\u5165\u5f0f\u670d\u52a1\u5668\u3002\u6211\u4eec\u53ef\u4ee5\u4f7f\u7528
\n spring-boot-starter-web <\/strong>\u6a21\u5757\u5feb\u901f\u542f\u52a8\u548c\u8fd0\u884c\u5e94\u7528\u7a0b\u5e8f\u3002\n <\/div>\n\r\npublic <\/span>static void <\/span>main(String[] args)\r\n{ \r\nSpringApplication.run<\/span>(ClassName.class, args); \r\n}\r\n<\/pre>\n
\n ApplicationListener\u952e<\/strong>\u6765\u5f15\u7528\u5b83\u3002\n <\/div>\n
\n META-INF\/spring.factories <\/strong>\u3002\n <\/div>\n
\n spring.application.admin.enabled <\/strong>\u5c5e\u6027\u5728Spring Boot\u5e94\u7528\u7a0b\u5e8f\u4e2d\u542f\u7528\u5b83\u3002\n <\/div>\n
\n \u5e94\u7528\u7a0b\u5e8f\u5c5e\u6027<\/strong>\u3002\u56e0\u6b64\uff0c\u6211\u4eec\u53ef\u4ee5\u5728\u9879\u76ee\u7684\u5c5e\u6027\u6587\u4ef6\u4e2d\u4f7f\u7528\u5b83\u3002\u8be5\u5c5e\u6027\u6587\u4ef6\u7528\u4e8e\u8bbe\u7f6e\u8bf8\u5982
\n server-port = 8082 <\/strong>\u7b49\u5c5e\u6027\u3002\u5b83\u6709\u52a9\u4e8e\u7ec4\u7ec7\u5e94\u7528\u7a0b\u5e8f\u5c5e\u6027\u3002\n <\/div>\n
\n
\n<\/html><\/p>\n","protected":false},"excerpt":{"rendered":"SpringBoot \u6559\u7a0bzh-cn","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[104],"tags":[],"class_list":["post-576","post","type-post","status-publish","format-standard","hentry","category-bc_springboot_jc"],"_links":{"self":[{"href":"https:\/\/bianchenghao6.com\/wp-json\/wp\/v2\/posts\/576"}],"collection":[{"href":"https:\/\/bianchenghao6.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/bianchenghao6.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/bianchenghao6.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/bianchenghao6.com\/wp-json\/wp\/v2\/comments?post=576"}],"version-history":[{"count":0,"href":"https:\/\/bianchenghao6.com\/wp-json\/wp\/v2\/posts\/576\/revisions"}],"wp:attachment":[{"href":"https:\/\/bianchenghao6.com\/wp-json\/wp\/v2\/media?parent=576"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/bianchenghao6.com\/wp-json\/wp\/v2\/categories?post=576"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/bianchenghao6.com\/wp-json\/wp\/v2\/tags?post=576"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}