Spring boot error page redirect

Hi,

I would like to ask you how to redirect to a Vaadin custom error page when spring security catches and unauthorized request or throws 404 page not found ?

example:

18531090.png