springboot实战笔记(八)----访问静态资源的方式
一 前言
springboot访问静态资源有以下两种方式:
- SpringBoot 从 classpath/static下访问,注意目录名称必须是static
- ServletContext 的根目录下
二 static目录下访问
简单的启动springApplication后,访问资源
三 ServletContext 根目录下访问
启动springApplication后,访问资源
springboot访问静态资源有以下两种方式:
简单的启动springApplication后,访问资源
启动springApplication后,访问资源