Created
March 26, 2020 21:36
-
-
Save ksurendra/40793feac5888b57368957df63e37d47 to your computer and use it in GitHub Desktop.
Sample controller to print API values in browser
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.engg.java.reactive; | |
import org.springframework.web.bind.annotation.RestController; | |
import org.springframework.web.bind.annotation.GetMapping; | |
@RestController | |
public class TestController { | |
@GetMapping | |
public String sample() { | |
ReqResWebClient webClient = new ReqResWebClient(); | |
return "<html><body><h1>Java Spring Webclient Example</h1><br><br>" + | |
webClient.getResult() + "<br>" + | |
webClient.getUser1() + "<br>" + | |
webClient.getUser2() + | |
"</body></html>"; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment