java:springboot项目部署前端,怎么设置前端静态代码访问

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/weixin_38750084/article/details/86629248

1.

一开始target目录下没有出现index.html文件,但是src里面有,则去掉左边的配置。

2.但是index.html文件依然访问错误,报404。但是css文件能访问。

则把index.html文件放入static文件目录下即可。

访问:http://localhost:7772/index.html 即可 

猜你喜欢

转载自blog.csdn.net/weixin_38750084/article/details/86629248