Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
bluewinestar
spring-boot-examples
提交
3a45667f
S
spring-boot-examples
项目概览
bluewinestar
/
spring-boot-examples
与 Fork 源项目一致
从无法访问的项目Fork
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
S
spring-boot-examples
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
3a45667f
编写于
2月 13, 2019
作者:
微笑很纯洁
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
add spring-boot-webflux
上级
b7423ddb
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
117 addition
and
0 deletion
+117
-0
spring-boot-webflux/pom.xml
spring-boot-webflux/pom.xml
+54
-0
spring-boot-webflux/src/main/java/com/neo/WebFluxApplication.java
...oot-webflux/src/main/java/com/neo/WebFluxApplication.java
+12
-0
spring-boot-webflux/src/main/java/com/neo/web/HelloController.java
...ot-webflux/src/main/java/com/neo/web/HelloController.java
+14
-0
spring-boot-webflux/src/main/resources/application.properties
...ng-boot-webflux/src/main/resources/application.properties
+0
-0
spring-boot-webflux/src/test/java/com/neo/HelloTests.java
spring-boot-webflux/src/test/java/com/neo/HelloTests.java
+21
-0
spring-boot-webflux/src/test/java/com/neo/WebFluxApplicationTests.java
...ebflux/src/test/java/com/neo/WebFluxApplicationTests.java
+16
-0
未找到文件。
spring-boot-webflux/pom.xml
0 → 100644
浏览文件 @
3a45667f
<?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>
<groupId>
com.neo
</groupId>
<artifactId>
spring-boot-webfluxflux
</artifactId>
<version>
1.0.0-SNAPSHOT
</version>
<packaging>
jar
</packaging>
<name>
spring-boot-webfluxflux
</name>
<description>
Demo project for Spring Boot
</description>
<parent>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-parent
</artifactId>
<version>
2.1.2.RELEASE
</version>
<relativePath/>
<!-- lookup parent from repository -->
</parent>
<properties>
<project.build.sourceEncoding>
UTF-8
</project.build.sourceEncoding>
<project.reporting.outputEncoding>
UTF-8
</project.reporting.outputEncoding>
<java.version>
1.8
</java.version>
</properties>
<dependencies>
<dependency>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-webflux
</artifactId>
</dependency>
<dependency>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-devtools
</artifactId>
<scope>
runtime
</scope>
</dependency>
<dependency>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-test
</artifactId>
<scope>
test
</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-maven-plugin
</artifactId>
</plugin>
</plugins>
</build>
</project>
spring-boot-webflux/src/main/java/com/neo/WebFluxApplication.java
0 → 100644
浏览文件 @
3a45667f
package
com.neo
;
import
org.springframework.boot.SpringApplication
;
import
org.springframework.boot.autoconfigure.SpringBootApplication
;
@SpringBootApplication
public
class
WebFluxApplication
{
public
static
void
main
(
String
[]
args
)
{
SpringApplication
.
run
(
WebFluxApplication
.
class
,
args
);
}
}
spring-boot-webflux/src/main/java/com/neo/web/HelloController.java
0 → 100644
浏览文件 @
3a45667f
package
com.neo.web
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
reactor.core.publisher.Mono
;
@RestController
public
class
HelloController
{
@GetMapping
(
"/hello"
)
public
Mono
<
String
>
hello
()
{
return
Mono
.
just
(
"Welcome to reactive world ~"
);
}
}
spring-boot-webflux/src/main/resources/application.properties
0 → 100644
浏览文件 @
3a45667f
spring-boot-webflux/src/test/java/com/neo/HelloTests.java
0 → 100644
浏览文件 @
3a45667f
package
com.neo
;
import
com.neo.web.HelloController
;
import
org.junit.Test
;
import
org.junit.runner.RunWith
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.boot.test.autoconfigure.web.reactive.WebFluxTest
;
import
org.springframework.test.context.junit4.SpringRunner
;
import
org.springframework.test.web.reactive.server.WebTestClient
;
@RunWith
(
SpringRunner
.
class
)
@WebFluxTest
(
controllers
=
HelloController
.
class
)
public
class
HelloTests
{
@Autowired
WebTestClient
client
;
@Test
public
void
getHello
()
{
client
.
get
().
uri
(
"/hello"
).
exchange
().
expectStatus
().
isOk
();
}
}
spring-boot-webflux/src/test/java/com/neo/WebFluxApplicationTests.java
0 → 100644
浏览文件 @
3a45667f
package
com.neo
;
import
org.junit.Test
;
import
org.junit.runner.RunWith
;
import
org.springframework.boot.test.context.SpringBootTest
;
import
org.springframework.test.context.junit4.SpringRunner
;
@RunWith
(
SpringRunner
.
class
)
@SpringBootTest
public
class
WebFluxApplicationTests
{
@Test
public
void
contextLoads
()
{
}
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录