springboot 使用静态文件

一、添加一个jar包

compile group: 'org.springframework.boot', name: 'spring-boot-starter-thymeleaf', version: '2.0.0.RELEASE'

二、添加静态资源文件

springboot 使用静态文件

上边font-awesome文件夹下是我要加的静态资源,该文件夹要放到static文件夹下

三、访问路径

http://ip:端口/font-awesome/资源

举例 :http:// *.*.*.*:8080 /font-awesome/fontawesome-webfont.svg