I would like to set the context path for the Spring Boot application, and the following property can achieve that.
server.contextPath=/apiHowever, I would like to redirect / to /api . Currently, I am getting a HTTP 404 Error. How can I achieve that in Spring Boot?