Custom Controller not working for REST API

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.

image

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);
    }
}

Hello,

By default, authorization is required to send a request. You need to make your endpoint anonymous.

For example: application.properties

jmix.rest.anonymous-url-patterns=/orders/**

Docs: REST Properties :: Jmix Documentation

Regards,
Nikita