{"id":580,"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 \u9879\u76ee\u521b\u5efa","status":"publish","type":"post","link":"https:\/\/bianchenghao6.com\/580.html","title":{"rendered":"SpringBoot \u9879\u76ee\u521b\u5efa"},"content":{"rendered":"


\n <\/head>
\n <\/p>\n

\n

SpringBoot \u9879\u76ee\u521b\u5efa<\/h1>\n<\/p><\/div>\n
\n \u4f7f\u7528SpringBoot CLI\u521b\u5efaSpringBoot\u9879\u76ee
\n \u4f7f\u7528STS\u521b\u5efaSpringBoot\u9879\u76ee\n <\/div>\n
\n \u4ee5\u4e0b\u662f\u521b\u5efa\u7b80\u5355Spring Boot\u9879\u76ee\u7684\u6b65\u9aa4\u3002\n <\/div>\n
\n \u6b65\u9aa41: <\/strong>\u6253\u5f00Spring initializr https:\/\/start.spring.io \u3002\n <\/div>\n
\n \u6b65\u9aa42: <\/strong>\u63d0\u4f9b
\n \u7ec4<\/strong>\u548c
\n \u5de5\u4ef6<\/strong>\u540d\u79f0\u3002\u6211\u4eec\u63d0\u4f9b\u4e86\u7ec4\u540d
\n com.lidihuo <\/strong>\u548c\u5de5\u4ef6
\n spring-boot-example <\/strong>\u3002\n <\/div>\n
\n \u6b65\u9aa43: <\/strong>\u73b0\u5728\uff0c\u70b9\u51fb
\n Generate <\/strong>(\u751f\u6210)\u3002\n <\/div>\n

SpringBoot \u9879\u76ee\u521b\u5efa_https:\/\/bianchenghao6.com_\u3010SpringBoot \u6559\u7a0b\u3011_\u7b2c1\u5f20 <\/p>\n

\n \u4f55\u65f6\u6211\u4eec\u5355\u51fb\"\u751f\u6210\"\u6309\u94ae\uff0c\u5b83\u5c06\u5f00\u59cb\u5c06\u9879\u76ee\u6253\u5305\u4e3a
\n .rar <\/strong>\u6587\u4ef6\u5e76\u4e0b\u8f7d\u8be5\u9879\u76ee\u3002\n <\/div>\n
\n \u6b65\u9aa44: <\/strong>\u63d0\u53d6
\n RAR <\/strong>\u6587\u4ef6\u3002\n <\/div>\n
\n \u6b65\u9aa45: <\/strong>
\n \u5bfc\u5165<\/strong>\u6587\u4ef6\u5939\u3002\n <\/div>\n
\n \u6587\u4ef6->\u5bfc\u5165->\u73b0\u6709Maven\u9879\u76ee->\u4e0b\u4e00\u6b65->\u6d4f\u89c8->\u9009\u62e9\u9879\u76ee->\u5b8c\u6210\n <\/div>\n
\n \u5bfc\u5165\u9700\u8981\u4e00\u4e9b\u65f6\u95f4\u8be5\u9879\u76ee\u3002\u6210\u529f\u5bfc\u5165\u9879\u76ee\u540e\uff0c\u6211\u4eec\u53ef\u4ee5\u5728
\n Package Explorer <\/strong>\u4e2d\u67e5\u770b\u9879\u76ee\u76ee\u5f55\u3002\u4e0b\u56fe\u663e\u793a\u4e86\u9879\u76ee\u76ee\u5f55:\n <\/div>\n

SpringBoot \u9879\u76ee\u521b\u5efa_https:\/\/bianchenghao6.com_\u3010SpringBoot \u6559\u7a0b\u3011_\u7b2c2\u5f20 <\/p>\n

\n SpringBootExampleApplication .java <\/strong>\n <\/div>\n
\n
\r\npackage <\/span>com.lidihuo.springbootexample;\r\nimport org.springframework.boot.SpringApplication;\r\nimport org.springframework.boot.autoconfigure.SpringBootApplication;\r\n@SpringBootApplication\r\npublic <\/span>class <\/span>SpringBootExampleApplication \r\n{\r\npublic <\/span>static void <\/span>main(String[] args) \r\n{\r\nSpringApplication.run<\/span>(SpringBootExampleApplication.class, args);\r\n}\r\n}\r\n<\/pre>\n

<\/code>\n <\/div>\n

\n pom.xml <\/strong>\n <\/div>\n
\n
\r\n<?xml version=\"1.0\"<\/span> encoding=\"UTF-8\"<\/span>?>\r\n<project xmlns=\"http:\/\/maven.apache.org\/POM\/4.0.0\"<\/span> xmlns:xsi=http:\/\/www.w3.org\/2001\/XMLSchema-instance xsi:schemaLocation=\"http:\/\/maven.apache.org\/POM\/4.0.0 https:\/\/maven.apache.org\/xsd\/maven-4.0.0.xsd\"<\/span>>\r\n<modelVersion>4.0.0<\/modelVersion>\r\n<parent>\r\n<groupId>org.springframework.boot<\/groupId>\r\n<artifactId>spring-boot-starter-parent<\/artifactId>\r\n<version>2.2.2.BUILD-SNAPSHOT<\/version>\r\n<relativePath\/> <!-- lookup parent from repository -->\r\n<\/parent>\r\n<groupId>com.lidihuo<\/groupId>\r\n<artifactId>spring-boot-example<\/artifactId>\r\n<version>0.0.1-SNAPSHOT<\/version>\r\n<name>spring-boot-example<\/name>\r\n<description>Demo project for <\/span>Spring Boot<\/description>\r\n<properties>\r\n<java.version>1.8<\/java.version>\r\n<\/properties>\r\n<dependencies>\r\n<dependency>\r\n<groupId>org.springframework.boot<\/groupId>\r\n<artifactId>spring-boot-starter<\/artifactId>\r\n<\/dependency>\r\n<dependency>\r\n<groupId>org.springframework.boot<\/groupId>\r\n<artifactId>spring-boot-starter-test<\/artifactId>\r\n<scope>test<\/scope>\r\n<exclusions>\r\n<exclusion>\r\n<groupId>org.junit.vintage<\/groupId>\r\n<artifactId>junit-vintage-engine<\/artifactId>\r\n<\/exclusion>\r\n<\/exclusions>\r\n<\/dependency>\r\n<\/dependencies>\r\n<build>\r\n<plugins>\r\n<plugin>\r\n<groupId>org.springframework.boot<\/groupId>\r\n<artifactId>spring-boot-maven-plugin<\/artifactId>\r\n<\/plugin>\r\n<\/plugins>\r\n<\/build>\r\n<repositories>\r\n<repository>\r\n<id>spring-milestones<\/id>\r\n<name>Spring Milestones<\/name>\r\n<url>https:\/\/repo.spring.io\/milestone<\/url>\r\n<\/repository>\r\n<repository>\r\n<id>spring-snapshots<\/id>\r\n<name>Spring Snapshots<\/name>\r\n<url>https:\/\/repo.spring.io\/snapshot<\/url>\r\n<snapshots>\r\n<enabled>true<\/enabled>\r\n<\/snapshots>\r\n<\/repository>\r\n<\/repositories>\r\n<pluginRepositories>\r\n<pluginRepository>\r\n<id>spring-milestones<\/id>\r\n<name>Spring Milestones<\/name>\r\n<url>https:\/\/repo.spring.io\/milestone<\/url>\r\n<\/pluginRepository>\r\n<pluginRepository>\r\n<id>spring-snapshots<\/id>\r\n<name>Spring Snapshots<\/name>\r\n<url>https:\/\/repo.spring.io\/snapshot<\/url>\r\n<snapshots>\r\n<enabled>true<\/enabled>\r\n<\/snapshots>\r\n<\/pluginRepository>\r\n<\/pluginRepositories>\r\n<\/project>\r\n<\/pre>\n

<\/code>\n <\/div>\n

\n \u6b65\u9aa46: <\/strong>: \u8fd0\u884c
\n SpringBootExampleApplication.java <\/strong>\u6587\u4ef6\u3002\n <\/div>\n
\n \u53f3\u952e\u5355\u51fb\u8be5\u6587\u4ef6->\u8fd0\u884c\u65b9\u5f0f-> Java\u5e94\u7528\u7a0b\u5e8f\n <\/div>\n

SpringBoot \u9879\u76ee\u521b\u5efa_https:\/\/bianchenghao6.com_\u3010SpringBoot \u6559\u7a0b\u3011_\u7b2c3\u5f20 <\/p>\n

\n \u4e0b\u56fe\u663e\u793a\u4e86\u5e94\u7528\u7a0b\u5e8f\u5df2\u6210\u529f\u8fd0\u884c\u3002\n <\/div>\n

SpringBoot \u9879\u76ee\u521b\u5efa_https:\/\/bianchenghao6.com_\u3010SpringBoot \u6559\u7a0b\u3011_\u7b2c4\u5f20 <\/p>\n


\n
\n \u4f7f\u7528SpringBoot CLI\u521b\u5efaSpringBoot\u9879\u76ee
\n \u4f7f\u7528STS\u521b\u5efaSpringBoot\u9879\u76ee\n <\/div>\n

<\/body>
\n<\/html><\/p>\n","protected":false},"excerpt":{"rendered":"SpringBoot \u9879\u76ee\u521b\u5efazh-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-580","post","type-post","status-publish","format-standard","hentry","category-bc_springboot_jc"],"_links":{"self":[{"href":"https:\/\/bianchenghao6.com\/wp-json\/wp\/v2\/posts\/580"}],"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=580"}],"version-history":[{"count":0,"href":"https:\/\/bianchenghao6.com\/wp-json\/wp\/v2\/posts\/580\/revisions"}],"wp:attachment":[{"href":"https:\/\/bianchenghao6.com\/wp-json\/wp\/v2\/media?parent=580"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/bianchenghao6.com\/wp-json\/wp\/v2\/categories?post=580"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/bianchenghao6.com\/wp-json\/wp\/v2\/tags?post=580"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}