导入 springboot - 依赖
- <parent>
- <groupId>org.springframework.boot</groupId>
- <artifactId>spring-boot-starter-parent</artifactId>
- <version>1.5.9.RELEASE</version>
- <relativePath/> <!-- lookup parent from repository -->
- </parent>
- <dependencies>
- <dependency>
- <groupId>org.springframework.boot</groupId>
- <artifactId>spring-boot-starter-web</artifactId>
- </dependency>
- </dependencies>
简化部署:
导入
- <plugins>
- <plugin>
- <groupId>org.springframework.boot</groupId>
- <artifactId>spring-boot-maven-plugin</artifactId>
- </plugin>
- </plugins>
将项目打成 jar 包, doc 窗口运行 java -jar
- <groupId>
- org.springframework.boot
- </groupId>
- <artifactId>
- spring-boot-dependencies
- </artifactId>
- <version>
- 1.5.9.RELEASE
- </version>
- <relativePath>
- ../../spring-boot-dependencies
- </relativePath>
控制着个 jar 包的版本号
spring-boot 将所有的场景抽取出来, 做成一个 starter 启动器, 只需要在项目中引入相应的 spring-boot-starter
比如: spring-boot-starter-Web
来源: http://www.bubuko.com/infodetail-3365023.html