@@ -0,0 +1,1945 @@
+/*%0A * THE SOFTWARE IS PROVIDED %22AS IS%22, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR%0A * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS%0A * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR%0A * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER%0A * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN%0A * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.%0A */%0A%0Apackage com.mpalourdio.springboottemplate.controllers;%0A%0Aimport com.mpalourdio.springboottemplate.properties.MarvelProperties;%0Aimport org.apache.commons.codec.digest.DigestUtils;%0Aimport org.springframework.boot.context.properties.EnableConfigurationProperties;%0Aimport org.springframework.http.MediaType;%0Aimport org.springframework.web.bind.annotation.GetMapping;%0Aimport org.springframework.web.bind.annotation.RestController;%0Aimport org.springframework.web.reactive.function.client.WebClient;%0Aimport reactor.core.publisher.Mono;%0A%0A%0A@RestController%0A@EnableConfigurationProperties(MarvelProperties.class)%0Apublic class ReactiveController %7B%0A%0A    private final MarvelProperties marvelProperties;%0A%0A    public ReactiveController(MarvelProperties marvelProperties) %7B%0A        this.marvelProperties = marvelProperties;%0A    %7D%0A%0A    @GetMapping(value = %22/reactive%22, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)%0A    public Mono%3CString%3E get() %7B%0A        String timestamp = String.valueOf(System.currentTimeMillis() / 1000);%0A        String hash = DigestUtils.md5Hex(timestamp + marvelProperties.getPrivatekey() + marvelProperties.getPublickey());%0A        String uri = %22http://gateway.marvel.com/v1/public/characters/1009220?apikey=%22 + marvelProperties.getPublickey() + %22&ts=%22 + timestamp + %22&hash=%22 + hash;%0A%0A        WebClient webClient = WebClient.create(uri);%0A%0A        return webClient.get()%0A                .retrieve()%0A                .bodyToMono(String.class);%0A    %7D%0A%7D%0A

Test reactive controller