server:
port: 9999
context-path: /api
这个是我springBoot 的配置。 如何 输入 localhost:9999 直接跳转至 index.html。 现在必须得输入 localhost:9999/api 才能跳转至首页
server:
port: 9999
context-path: /api
这个是我springBoot 的配置。 如何 输入 localhost:9999 直接跳转至 index.html。 现在必须得输入 localhost:9999/api 才能跳转至首页
8 回答6.5k 阅读
3 回答3.7k 阅读✓ 已解决
3 回答2.7k 阅读✓ 已解决
2 回答3.3k 阅读
3 回答1.8k 阅读✓ 已解决
1 回答2k 阅读✓ 已解决
2 回答1.9k 阅读
2 回答11.1k 阅读✓ 已解决
6.8k 阅读
2 回答7.8k 阅读
4 回答7.9k 阅读
1 回答5.7k 阅读✓ 已解决
写一个controller,类和方法上面都使用@RequestMapping("/")即可。
使用localhost:9999即可访问到这个方法,直接跳转至index.html