• pom.xml
      <dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-thymeleaf</artifactId>
</dependency>
  • application.yml
spring:
thymeleaf:
prefix: classpath:/templates/
  • web层
@Controller
public class FdfsController { @RequestMapping("file")
public String file(){
return "/fileUploade";
} }

  • html
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org"
xmlns:sec="http://www.thymeleaf.org/thymeleaf-extras-springsecurity3">
<head>
<meta charset="UTF-8" />
<title>Insert title here</title>
</head>
<body>
<h1 th:inlines="text">文件上传</h1>
<form action="upload" method="post" enctype="multipart/form-data">
<p>选择文件: <input type="file" name="fileName"/></p>
<p><input type="submit" value="提交"/></p>
</form>
</body>
</html>
  • 测试

最新文章

  1. Lenovo K29 笔记本经常没声音解决方案Hotkey[gevu18ww].exe
  2. mysql workbench连接不上远程数据库,xshell无法连接远程主机的问题
  3. How to setup vsftpd FTP file Server on Redhat 7 Linux
  4. 用css解决iframe的自适应问题(跨域下同样有用)
  5. git中通过实际操作来了解常用命令
  6. NGUI国际化 多语言
  7. maven使用.02.一些概念
  8. [Cocos2d-x]节点的生命周期
  9. linex下部署发布web项目
  10. java对mysql的增删改查
  11. JDBC 连接数据库的步骤
  12. 保护url时效性和安全性的一种解决方案
  13. 紧急整理了 20 道 Spring Boot 面试题,我经常拿来面试别人!
  14. Python 面向对象(创建类和对象,面向对象的三大特性是指:封装、继承和多态,多态性)
  15. wed开发基础--练习题
  16. 【转】谷歌三大核心技术(一)The Google File System中文版
  17. 使用 urllib 进行身份验证
  18. HDU 4864
  19. [日常] GO语言圣经-并发获取多个URL
  20. Crond定时任务

热门文章

  1. RocketMQ 创建和删除 topic,以及 broker 和 nameserver 之间的心跳
  2. 初窥AST
  3. Tesseract5.0训练字库,提高OCR特殊场景识别率,合并字库(二)
  4. repr_str方法
  5. 396. Coins in a Line III
  6. java_第一年_JavaWeb(10)
  7. python 导入json模块的用法
  8. 实体模型集合对象转换为VO对象集合
  9. Groovy基本语法
  10. python OpenCV视频的读取及保存