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

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.

主站蜘蛛池模板: 潜江市| 稻城县| 德化县| 周宁县| 嘉义市| 台湾省| 米林县| 漳平市| 黄陵县| 巴彦淖尔市| 都匀市| 繁昌县| 扬州市| 怀化市| 新绛县| 莱州市| 苍山县| 烟台市| 左云县| 伊吾县| 鹤庆县| 绍兴县| 泽州县| 贺兰县| 南岸区| 临漳县| 台江县| 水城县| 海兴县| 黄陵县| 宝鸡市| 麟游县| 比如县| 本溪| 额济纳旗| 永城市| 登封市| 莱州市| 宾川县| 德兴市| 新疆|