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

Bootstrapping a Spring application

To implement our usecase, we are using the well-known Spring modules Spring Web and Spring Web MVC. Our application will not use the new features of Spring 5, so it will run similarly on Spring Framework 4.x. To simplify our development process and even more, we are leveraging Spring Boot, which is described in more detail later. To bootstrap our application, we may configure and download a Gradle project from the Spring Initializer website at start.spring.io. For now, we need to select the preferred Spring Boot version and dependency for the web (the actual dependency identifier in Gradle config will be org.springframework.boot:spring-boot-starter-web), as shown in the following screenshot:

Diagram 2.4 Web-based Spring Initializer simplifies the bootstrapping of a new Spring Boot application

Alternatively, we may generate a new Spring Boot project using cURL and the HTTP API of the Spring Boot Initializer site. The following command will effectively create and download the same empty project with all the desired dependencies:

curl https://start.spring.io/starter.zip \
-d dependencies=web,actuator \
-d type=gradle-project \
-d bootVersion=2.0.2.RELEASE \
-d groupId=com.example.rpws.chapters \
-d artifactId=SpringBootAwesome \
-o SpringBootAwesome.zip
主站蜘蛛池模板: 武安市| 五原县| 鄂托克旗| 南投县| 麻栗坡县| 舞钢市| 海兴县| 平顶山市| 商洛市| 克什克腾旗| 平利县| 双鸭山市| 渭源县| 密云县| 莱州市| 五指山市| 贵定县| 湘西| 读书| 封丘县| 阆中市| 安陆市| 永康市| 塔河县| 井陉县| 伊吾县| 馆陶县| 大英县| 龙游县| 渭南市| 厦门市| SHOW| 申扎县| 嘉善县| 铜鼓县| 环江| 潜江市| 克什克腾旗| 天水市| 枣庄市| 东乡|