I am using Spring Boot Context Path as specified in the application.properties file, and it works great
server.port=5000
server.context-path=/services
Spring Boot 2.0 and above
server.port=5000
server.servlet.context-path=/services
But how can we achieve default redirect of root i.e. “/” to “/services”
http://localhost:5000/services - works great!
But I want http://localhost:5000/ to automatically redirect to -> http://localhost:5000/services so that an end user should be able to access the root of the domain and be automatically redirected to the context path
Currently accessing the root is throwing a 404 (which makes sense with the default configuration)
How can I achieve the automatic redirect of root i.e. “/” to the context path?