需要添加依赖:

  <dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-thymeleaf</artifactId>
</dependency>

配置:

@Configuration
public class WebMvcConfigurer extends WebMvcConfigurerAdapter { @Override
public void addResourceHandlers(ResourceHandlerRegistry registry) {
//和页面有关的静态目录都放在项目的static目录下
registry.addResourceHandler("/static/**").addResourceLocations("classpath:/static/");
//上传的图片在D盘下的OTA目录下,访问路径如:http://localhost:8080/xxx.jpg
} }

浏览器正常访问:

最新文章

  1. .NET使用NPOI2.0导入导出Excel
  2. SQL触发器、事物
  3. 十日谈 (share)
  4. 传统三层结构和MVC之于贫血模式和充血模式以及领域建模
  5. (原)matlab中使用mex编译多个cpp文件
  6. MVVMLight Toolkit在Windows Phone中的使用扩展之一:在ViewModel中实现导航,并传递参数
  7. USACO Section 1.3 Combination Lock 解题报告
  8. 使用clone
  9. C#线程安全使用(二)
  10. 多线程学习笔记-深入理解ThreadPoolExecutor
  11. How to detect, enable and disable SMBv1, SMBv2, and SMBv3 in Windows and Windows Server
  12. QtQuick大坑笔记之Http的Get与Post操作(带cookie)
  13. Linux 命令整理-tailf
  14. 团队项目之UML图设计
  15. yocto-sumo源码解析(八): ProcessServer
  16. 20135316王剑桥 linux第六周课实验笔记
  17. java基础3 循环语句:While 循环语句、do while 循环语句、 for 循环语句 和 break、continue关键字
  18. js 操作对象的引用和操作实际对象的区分
  19. 用webpy实现12306余票查询
  20. PIP源使用国内镜像

热门文章

  1. Pycharm Debug 问题
  2. selenium2环境搭建----基于python语言
  3. gym102215题解
  4. 2018icpc宁夏邀请赛_L_Continuous Intervals
  5. ArcGis执行StartEditing(true)时,winform程序直接崩溃.
  6. sublime text 3 环境设置
  7. RateLimiter 源码分析(Guava 和 Sentinel 实现)
  8. 表格强制换行 table-layout:fixed
  9. Git 设置 用户名 和 邮箱
  10. 几个常用I/O函数用法(printf,fprintf等)