0
votes

I am using Spring Boot 2.1.4.RELEASE with Angular 2. Currently I keep my Angular code in /static directory. This is deployed in an external (not embedded) tomcat 9.

Default Spring boot error controller returns WhiteLabel html error page response if the request comes from the browser and json error response if the request is a rest request.

How can I override default whitelabel error page with custom html error page if the request comes from a browser but still get the json error response if the request is a rest request ?

1
are you using angular js or Angular(>=2.0)?ArunKumar M N

1 Answers

0
votes

Just created public/error folder and put specific error pages in the folder. WhiteError page is replaced by the error pages