After springBoot sets context-path, how to enter localhost to jump directly to the home page

server:
  port: 9999
  context-path: /api

this is my springBoot configuration. How to enter localhost:9999 to jump directly to index.html. Now you have to type localhost:9999/api to jump to the home page

Mar.20,2021

write a controller, class and method using @ RequestMapping ("/").
you can access this method by using localhost:9999, and jump directly to index.html

Menu