springboot(八):springboot文件上传、静态资源映射

1.静态资源 2.测试 启动程序后访问:http://localhost:8080/test/img/timg.jpg 3.直接访问 如果直接访问:可以得到图片http://localhost:8080/img/timg.jpg ,但是这样做无疑暴露了真实的地址。 4.定义拦截器拦截/img/* 拦截器代码: package com.qianliu.springboot_test.intercep
相关文章
相关标签/搜索