标签:media 编程 ima auto gap ref run framework turn
#java#spring#webflux#入门#编程#
Spring WebFlux web的基本应用
视频讲解: https://www.bilibili.com/video/av82028626/
WebfluxApplication.java
package com.example.webflux; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.http.MediaType; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RestController; import reactor.core.publisher.Flux; @SpringBootApplication public class WebfluxApplication extends BaseApplication{ public static void main(String[] args) { SpringApplication.run(WebfluxApplication.class, args); } @RestController class EmployeeController{ @GetMapping(value = "greeting",produces = MediaType.TEXT_EVENT_STREAM_VALUE) public Flux<String> greeting() { return Flux.just("Hello World"); } } }
公众号,坚持每天3分钟视频学习
标签:media 编程 ima auto gap ref run framework turn
原文地址:https://www.cnblogs.com/JavaWeiBianCheng/p/12151609.html