版权声明:转载请注明出处 https://blog.csdn.net/qq_33223299 https://blog.csdn.net/qq_33223299/article/details/90641302
一 前言
springboot访问静态资源有以下两种方式:
- SpringBoot 从 classpath/static下访问,注意目录名称必须是static
- ServletContext 的根目录下
二 static目录下访问
简单的启动springApplication后,访问资源
三 ServletContext 根目录下访问
启动springApplication后,访问资源