There is a way to generate HTML from a REST API Call

If a Service class and when I call a function from a browser I want to display a HTML page. exemple :

...
@Override
public String test2() {
   return "<b><i>OK</i></b>";
}
...

when I open the link below
http://localhost:8080/app/rest/v2/services/svcProtectService/test2

I see all the tags. How can I do to display html?

I resolved the issue by using a @RestController and injecting the service used