mirror of
https://github.com/JeffLi1993/springboot-learning-example.git
synced 2026-03-13 21:43:45 +08:00
WebFlux 快速入门实践
This commit is contained in:
@@ -8,34 +8,43 @@
|
|||||||
<version>0.0.1-SNAPSHOT</version>
|
<version>0.0.1-SNAPSHOT</version>
|
||||||
<name>springboot-webflux-1-quickstart :: Spring Boot WebFlux 快速入门</name>
|
<name>springboot-webflux-1-quickstart :: Spring Boot WebFlux 快速入门</name>
|
||||||
|
|
||||||
<!-- Spring Boot 启动父依赖 -->
|
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>org.springframework.boot</groupId>
|
<groupId>org.springframework.boot</groupId>
|
||||||
<artifactId>spring-boot-starter-parent</artifactId>
|
<artifactId>spring-boot-starter-parent</artifactId>
|
||||||
<version>2.0.1.RELEASE</version>
|
<version>2.0.1.RELEASE</version>
|
||||||
|
<relativePath/> <!-- lookup parent from repository -->
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<dependencies>
|
<properties>
|
||||||
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||||
|
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
|
||||||
|
<java.version>1.8</java.version>
|
||||||
|
</properties>
|
||||||
|
|
||||||
<!-- Spring Boot Web Flux 依赖 -->
|
<dependencies>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.springframework.boot</groupId>
|
<groupId>org.springframework.boot</groupId>
|
||||||
<artifactId>spring-boot-starter-webflux</artifactId>
|
<artifactId>spring-boot-starter-webflux</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<!-- Spring Boot Test 依赖 -->
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.springframework.boot</groupId>
|
<groupId>org.springframework.boot</groupId>
|
||||||
<artifactId>spring-boot-starter-test</artifactId>
|
<artifactId>spring-boot-starter-test</artifactId>
|
||||||
<scope>test</scope>
|
<scope>test</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<!-- Junit -->
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>junit</groupId>
|
<groupId>io.projectreactor</groupId>
|
||||||
<artifactId>junit</artifactId>
|
<artifactId>reactor-test</artifactId>
|
||||||
<version>4.12</version>
|
<scope>test</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
|
<build>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.springframework.boot</groupId>
|
||||||
|
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</build>
|
||||||
</project>
|
</project>
|
||||||
|
|||||||
@@ -1,61 +0,0 @@
|
|||||||
package org.spring.springboot.domain;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 城市实体类
|
|
||||||
*
|
|
||||||
* Created by bysocket on 09/29/2017.
|
|
||||||
*/
|
|
||||||
public class City {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 城市编号
|
|
||||||
*/
|
|
||||||
private Long id;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 省份编号
|
|
||||||
*/
|
|
||||||
private Long provinceId;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 城市名称
|
|
||||||
*/
|
|
||||||
private String cityName;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 描述
|
|
||||||
*/
|
|
||||||
private String description;
|
|
||||||
|
|
||||||
public Long getId() {
|
|
||||||
return id;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setId(Long id) {
|
|
||||||
this.id = id;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Long getProvinceId() {
|
|
||||||
return provinceId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setProvinceId(Long provinceId) {
|
|
||||||
this.provinceId = provinceId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getCityName() {
|
|
||||||
return cityName;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setCityName(String cityName) {
|
|
||||||
this.cityName = cityName;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getDescription() {
|
|
||||||
return description;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setDescription(String description) {
|
|
||||||
this.description = description;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user