快速构建Spring Boot项目
2017-12-18 15:59
633 查看
1、Spring 官网构建:http://start.spring.io
2、Spring Tool Suite 在Eclipse中安装STS
3、使用 Intellij IDEA,可以直接新建 Spring initializr 项目
4、Spring Boot CLI:是Spring Boot 提供的控制台命令工具,下载安装配置环境变量即可使用。
示例:
spring init --build=maven --java-version=1.8 --dependencies=web --packaging=jar --boot-version=1.3.0.M1 --groupId=com.demo --artifactId=demo
5、Maven 手工构建
1、<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version></version>
<relativePath/>
</parent>
2、在dependencies 添加 Web 支持的 starter pom
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
3、添加Spring Boot的编译插件
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
4、配置资源库,使用里程碑版的 Spring Boot需要一下配置
<repositories>
<repository>
<id>spring-snapshots</id>
<name>Spring Snapshots</name>
<url>https://repo.spring.io/snapshot</url>
<snapshots>
<enabled>true</enabled>
4000
</snapshots>
</repository>
<repository>
<id>spring-milestones</id>
<name>Spring milestones</name>
<url>https://repo.spring.io/milestones</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>spring-snapshots</id>
<name>Spring snapshots</name>
<url>https://repo.spring.io/snapshots</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</pluginRepository>
<pluginRepository>
<id>spring-milestones</id>
<name>Spring milestones</name>
<url>https://repo.spring.io/milestones</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</pluginRepository>
</pluginRepositories>
2、Spring Tool Suite 在Eclipse中安装STS
3、使用 Intellij IDEA,可以直接新建 Spring initializr 项目
4、Spring Boot CLI:是Spring Boot 提供的控制台命令工具,下载安装配置环境变量即可使用。
示例:
spring init --build=maven --java-version=1.8 --dependencies=web --packaging=jar --boot-version=1.3.0.M1 --groupId=com.demo --artifactId=demo
5、Maven 手工构建
1、<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version></version>
<relativePath/>
</parent>
2、在dependencies 添加 Web 支持的 starter pom
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
3、添加Spring Boot的编译插件
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
4、配置资源库,使用里程碑版的 Spring Boot需要一下配置
<repositories>
<repository>
<id>spring-snapshots</id>
<name>Spring Snapshots</name>
<url>https://repo.spring.io/snapshot</url>
<snapshots>
<enabled>true</enabled>
4000
</snapshots>
</repository>
<repository>
<id>spring-milestones</id>
<name>Spring milestones</name>
<url>https://repo.spring.io/milestones</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>spring-snapshots</id>
<name>Spring snapshots</name>
<url>https://repo.spring.io/snapshots</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</pluginRepository>
<pluginRepository>
<id>spring-milestones</id>
<name>Spring milestones</name>
<url>https://repo.spring.io/milestones</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</pluginRepository>
</pluginRepositories>
相关文章推荐
- [SpringBoot]IDEA快速构建SpringBoot应用项目(二)整合Mybatis + Druid
- 快速构建可运行的Spring-boot项目(Hello World)
- 快速构建可运行的Spring-boot项目(Hello World)
- Spring Boot系列一----使用idea快速构建Spring boot项目
- 构建微服务:快速搭建Spring Boot项目
- 快速构建可运行的Spring-boot项目(Hello World)
- Maven快速使用教程(二) spring boot 项目构建
- 快速构建springboot项目
- 快速构建可运行的Spring-boot项目(Hello World)
- spring boot项目快速构建(spring mvc+jpa+hibernate+mysql+gradle)
- JAVAEE——SpringBoot入门:简介、微服务、环境准备、helloworld与探究、快速构建项目
- 快速构建可运行的Spring-boot项目(Hello World)
- 【springBoot】之快速构建一个web项目
- 快速构建可运行的Spring-boot项目(Hello World)
- springboot+maven快速构建项目的示例代码
- 使用spring boot快速构建spring框架的maven项目
- 快速创建一个基于Gradle构建的SpringBoot Web项目(SpringBoot-01)
- springBoot maven快速构建项目
- Maven快速使用教程(二) spring boot 项目构建
- SpringBoot快速入门-基本项目构建