官术网_书友最值得收藏!

Setting up Spring Boot with Maven

Spring Boot is compatible with Apache Maven 3.2 or above. If your machine doesn't already have Java 8 or above, first download Java 8 or above from Oracle's official website:

http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html

And if you don't already have Maven, first download it from https://maven.apache.org/; Ubuntu users can run sudo apt-get install maven. Let's see the following Spring Boot dependencies with the org.springframework.boot groupId:

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
   xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
   <modelVersion>4.0.0</modelVersion>

   <parent>        <groupId>org.springframework.boot</groupId>        <artifactId>spring-boot-starter-parent</artifactId>        <version>2.0.2.RELEASE</version>        <relativePath/> <!-- lookup parent from repository -->   </parent>

   <dependencies>
        <dependency>               <groupId>org.springframework.boot</groupId>             <artifactId>spring-boot-starter-web</artifactId>    
</dependency>
</dependencies> ... ... </project>

This .pom file is the minimum requirement for the Spring Boot 2.0 application.

Let's see the Gradle setup for the Spring Boot application.

主站蜘蛛池模板: 晋宁县| 观塘区| 长春市| 石台县| 芦山县| 许昌县| 香港 | 渑池县| 保康县| 建德市| 阳东县| 富源县| 房产| 大关县| 航空| 清涧县| 阳泉市| 南昌县| 英山县| 武平县| 平邑县| 九江市| 开原市| 若羌县| 固原市| 澄江县| 宝丰县| 天气| 沾益县| 汝州市| 武宣县| 乾安县| 保山市| 石城县| 永善县| 永兴县| 轮台县| 将乐县| 雷山县| 怀仁县| 扶绥县|