org.springframework.boot.web.server.WebServerException: Unable to create tempDir. java.io.tmpdir is set to C:\Users\ADMINI~1\AppData\Local\Temp\2\
问题原因:springboot创建临时文件找不到对应的目录
解决办法:1. 重新指定临时文件位置 java -Djava.io.tempdir=D:/tmpdir -jar -my_project.jar
2. 手动创建指定文件夹
3. 启动类中加入配置临时文件目录
@Bean
MultipartConfigElement multipartConfigElement() {
MultipartConfigFactory factory = new MultipartConfigFactory();
String location = System.getProperty("user.dir") + "/data/tmp";
File tmpFile = new File(location);
if (!tmpFile.exists()) {
tmpFile.mkdirs();
}
factory.setLocation(location);
return factory.createMultipartConfig();
}
org.springframework.boot.web.server.WebServerException: Unable to create tempDir. java.io.tmpdir is set to C:\Users\ADMINI~1\AppData\Local\Temp\2\的更多相关文章
- SpringCloud Caused by: org.springframework.boot.web.server.WebServerException: Unable to start embedded
出现此问题,有可能是spring cloud 与spring boot 版本不匹配引发的问题,此次用的版本是:Finchley.RC1 经过一番关键字查找,发现spring cloud 与spring ...
- SpringBoot项目 org.springframework.boot.context.embedded.EmbeddedServletContainerException: Unable to start embedded Jetty servlet container报错
SpringBoot项目启动报错 ERROR 2172 --- [ main] o.s.boot.SpringApplication : Application startup failed org. ...
- 被“org.springframework.boot.web.support.SpringBootServletInitializer;”耽搁的两天
org.springframework.boot.web.support.SpringBootServletInitializer 改为: org.springframework.boot.conte ...
- SpringBoot从1.5.1→2.2.4项目加包扫雷一:Error:(8, 44) java: 程序包org.springframework.boot.web.support不存在
更换成新包即可import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
- spring boot 开发 org.springframework.context.ApplicationContextException: Unable to start web server;
Error starting ApplicationContext. To display the conditions report re-run your application with 'de ...
- Unable to start web server; nested exception is org.springframework.context.ApplicationContextException: Unable to start ServletWebServerApplicationContext due to missing ServletWebServerFactory bean.
SpringBoot启动时的异常信息如下: "C:\Program Files\Java\jdk1.8.0_161\bin\java" ......... com.fangxing ...
- 【转载】springboot启动报错(Unable to start web server; nested exception is org.springframework.context.ApplicationContextException: Unable to start ServletWebServerApplicationContext due to missing ServletWe)
SpringBoot启动时的异常信息如下: 1 "C:\Program Files\Java\jdk1.8.0_161\bin\java" ......... com.fangxi ...
- org.springframework.context.ApplicationContextException: Unable to start web server; nested exception is org.springframework.context.ApplicationContextException: Unable to start ServletWebServerApplic
org.springframework.context.ApplicationContextException: Unable to start web server; nested exceptio ...
- SpringBoot从1.5.1→2.2.4项目加包扫雷二:打不到符号java: org.springframework.boot.autoconfigure.web.相关配置错误支持包
import org.springframework.boot.autoconfigure.web.DefaultErrorAttributes→org.springframework.boot.we ...
随机推荐
- vs查找功能不显示查找结果
今天打开vs,查找的时候发现查找结果窗口不出现了,导致看不到查找结果. 网上各种搜索,甚至看到不少说什么要重装vs的解决方案,我也是醉了...... 其实解决办法很简单啊 vs--窗口--重置窗口布局 ...
- 【batch】命令对比两个文件夹下的文件(增删改的对比)
1.分别打印两个目录的结构 TREE D:\SOURCE /A /F >D:\SOURCE.TXT TREE D:\DEST /A /F >D:\DEST.TXT 2.然后使用工具/命令进 ...
- linux磁盘阵列 逻辑卷管理器
Difficult doesn't mean impossible.It simply meansthat you have to work hard.困难并不代表不可能,它仅仅意味着你必须努力奋斗. ...
- C++运算符重载——输入/输出运算符
为了与IO标准库一致,重载输入输出运算符函数的第一个行参应该是流的引用,第二个行参是对象的引用. 如果重载为类的成员函数,第一个行参应该是对象的引用,第二个行参是流的引用. 使用方式是 ClassOb ...
- 利用MySQL游标进行计算排名
SELECT a.id, a.nick_name, a.member_account, a.integral, () AS tRank #计算行号 FROM tzqc_raw_data AS a, ( ...
- Mapjoin和Reducejoin案例
一.Mapjoin案例 1.需求:有两个文件,分别是订单表.商品表, 订单表有三个属性分别为订单时间.商品id.订单id(表示内容量大的表), 商品表有两个属性分别为商品id.商品名称(表示内容量小的 ...
- Hibernate使用sql语句实现多表关联查询
/** * <查找list> * * @return 返回页面需要显示的数据 */ @SuppressWarnings("unchecked") public List ...
- leetcode算法题整理
一.线性表,如数组,单链表,双向链表 线性表.数组 U1.有序数组去重,返回新数组长度 A = [1,1,2] -> [1,2] 返回2 分析:其实一般数组的问题都可以用两个指针解决,一个指 ...
- Scrapy 框架
1. 基本使用 1.1 定义及安装 为了爬取网站数据,提取结构性数据而编写的应用框架 scrapy组件工作流程 引擎首先会将爬虫文件中的起始url获取,并且提交到调度器中.如果需要从url中下载数据, ...
- Physics Experiment 弹性碰撞 [POJ3684]
题意 有一个竖直的管子内有n个小球,小球的半径为r,最下面的小球距离地面h高度,让小球每隔一秒自由下落一个,小球与地面,小球与小球之间可视为弹性碰撞,让求T时间后这些小球的分布 Input The f ...