package com.launch.api.mysql.controller; import com.launch.api.elasticSearch.entity.Index1; import com.launch.api.elasticSearch.entity.Index2; import com.launch.api.elasticSearch.service.TweeTEsService; import com.launch.api.mysql.entity.test.Tweet; import com.launch.api.mysql.service.test.TweetService; import jakarta.annotation.Resource; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; @RestController @RequestMapping("tweet") public class TweetController { @Resource private TweeTEsService repository; @Resource private TweetService tweetService; @GetMapping("getAll") public Flux getAll(){ return tweetService.getAll(); } @GetMapping("saveEs") public Mono saveEs(){ Index1 index1 = new Index1(1l,"xiao"); return repository.mySave(index1); } @GetMapping("getEs") public Mono getEs(){ return repository.get(); } }