Hi,
I am using the Custom Controller without securing it, as shown the example. But i am the response 200 OK. But the body is some HTML text as shown below.
My code is very simple:
@RestController
@RequestMapping("/orders")
public class OrderController {
private static final Logger log;
@GetMapping("/calculateTotalAmount")
public ResponseEntity<String> calculateTotalAmount(@RequestParam String orderId) {
String str = "Total: " + orderId;
return ResponseEntity
.status(HttpStatus.OK)
.header(HttpHeaders.CACHE_CONTROL, "max-age=31536000")
.body(str);
}
static {
log = LoggerFactory.getLogger((Class)OrderController.class);
}
}