11package com .aardizio .resource ;
22
33import java .io .IOException ;
4- import java .util .Collection ;
54import java .util .List ;
65
7- import com .aardizio .client .RestClientErrorHandler ;
86import com .aardizio .client .RestClientExample ;
9- import com .aardizio .model .Hotels ;
7+ import com .aardizio .model .Hotel ;
108import com .aardizio .repository .ReactiveHotelRepository ;
119import com .datastax .driver .core .ConsistencyLevel ;
1210import com .datastax .driver .core .Statement ;
@@ -64,14 +62,14 @@ public class HotelController {
6462
6563@ GetMapping (value = "/clientExample" , produces = { MediaType .APPLICATION_JSON_VALUE }, consumes = {
6664MediaType .APPLICATION_JSON_VALUE })
67- public @ ResponseBody Flux <Hotels > clientExample () {
65+ public @ ResponseBody Flux <Hotel > clientExample () {
6866log .info ("Client example start" );
69- return hotelRestClient .send ();
67+ return hotelRestClient .getAllHotels ();
7068}
7169
7270@ DeleteMapping (value = "/hotels/{id}" , produces = { MediaType .APPLICATION_JSON_VALUE }, consumes = {
7371MediaType .APPLICATION_JSON_VALUE })
74- public Mono <Hotels > delete (@ PathVariable String id ) {
72+ public Mono <Hotel > delete (@ PathVariable String id ) {
7573
7674tracer .currentSpan ().tag ("hotelid" , id );
7775log .info ("deleting a journal" );
@@ -80,7 +78,7 @@ public Mono<Hotels> delete(@PathVariable String id) {
8078
8179@ PostMapping (value = "/hotels" , produces = { MediaType .APPLICATION_JSON_VALUE }, consumes = {
8280MediaType .APPLICATION_JSON_VALUE })
83- public @ ResponseBody Mono <Hotels > create (@ RequestBody Hotels hotel ) {
81+ public @ ResponseBody Mono <Hotel > create (@ RequestBody Hotel hotel ) {
8482tracer .currentSpan ().tag ("hotelid" , hotel .getId ());
8583log .info ("creating a journal 1" );
8684
@@ -98,7 +96,7 @@ public Mono<Hotels> delete(@PathVariable String id) {
9896
9997@ GetMapping (value = "/hotels/{uuid}" , produces = { MediaType .APPLICATION_JSON_VALUE }, consumes = {
10098MediaType .APPLICATION_JSON_VALUE })
101- public Mono <Hotels > search (@ PathVariable String uuid ) {
99+ public Mono <Hotel > search (@ PathVariable String uuid ) {
102100tracer .currentSpan ().tag ("hotelid" , uuid );
103101log .info ("Search gas" );
104102return hotelRepo .findByUuid (uuid );
@@ -109,12 +107,12 @@ public Mono<Hotels> search(@PathVariable String uuid) {
109107 */
110108@ GetMapping (value = "/hotels" , produces = { MediaType .APPLICATION_JSON_VALUE }, consumes = {
111109MediaType .APPLICATION_JSON_VALUE })
112- public Mono <List <Hotels >> getAllRetryProof () {
110+ public Mono <List <Hotel >> getAllRetryProof () {
113111Statement search = QueryBuilder .select ()
114- .from ("hotels " )
112+ .from ("hotel " )
115113 .setConsistencyLevel (ConsistencyLevel .THREE )
116114 .setRetryPolicy (DowngradingConsistencyRetryPolicy .INSTANCE );
117- return reactiveCassandraTemplate .select (search , Hotels .class ).collectList ();
115+ return reactiveCassandraTemplate .select (search , Hotel .class ).collectList ();
118116}
119117
120118@ ExceptionHandler
0 commit comments