All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.example.chaos.monkey.chaosdemo.component.HelloComponent Maven / Gradle / Ivy

There is a newer version: 2.5.1
Show newest version
package com.example.chaos.monkey.chaosdemo.component;

import org.springframework.http.MediaType;
import org.springframework.stereotype.Component;
import org.springframework.web.reactive.function.BodyInserters;
import org.springframework.web.reactive.function.server.ServerRequest;
import org.springframework.web.reactive.function.server.ServerResponse;
import reactor.core.publisher.Mono;

/** @author Benjamin Wilms */
@Component
public class HelloComponent {

  public Mono hello(ServerRequest request) {
    return ServerResponse.ok()
        .contentType(MediaType.TEXT_PLAIN)
        .body(BodyInserters.fromObject("Hello, from Component!"));
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy