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