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 ...
随机推荐
- 【原创】大叔经验分享(1)在yarn上查看hive完整执行sql
hive执行sql提交到yarn上的任务名字是被处理过的,通常只能显示sql的前边一段和最后几个字符,这样就会带来一些问题: 1)相近时间提交了几个相近的sql,相互之间无法区分: 2)一个任务有问题 ...
- flume taidir to kafkasink
flume的数据源采用taiDir,sink类型选择kafka类型 测试目标:flume监控某一个目录的日志文件,并将文件存储到kafka中,在kafka的消费端可以实现数据的消费 dip005.di ...
- numpy中的meshgrid
经常遇到meshgrid,一段时间不用就忘记了,记录之 meshgrid用于生成网格点的坐标矩阵(参考https://blog.csdn.net/lllxxq141592654/article/det ...
- 基于netty的socket服务端触发了channelInactive方法,但实际连接没有断开的问题
背景: 一个中小型H5游戏,后端使用基于 netty 的socket服务 服务端 分为 分发服务器 & 业务服务器,业务服务器可负载 用户客户端与分发服务器连接 分发服务器再作为客户端与每台业 ...
- SQL反模式学习笔记9 元数据分裂
目标:支持可扩展性.优化数据库的结构来提升查询的性能以及支持表的平滑扩展. 反模式:克隆表与克隆列 1.将一张很长的表拆分成多张较小的表,使用表中某一个特定的数据字段来给这些拆分出来的表命名. 2.将 ...
- js要怎么接收后端传的excel文件流?
方法1: 无需js,直接用a标签去接你的输出流 <a href="<你的返回流的Action路径>" >下载</a> 方法2:使用js,前提是你 ...
- Azure Database for MySQL 报 Please specify SSL options and retry.
Exception has been thrown by the aspect of an invocation. ---> Authentication to host 'xxx.mysql. ...
- 查看Linux系统软硬件信息
查看Linux系统软硬件信息 查看计算机CPU信息 cat /proc/cpuinfo 查看文件系统信息 cat /proc/filesystems 查看主机中断信息 cat /proc/interr ...
- vue cli搭建项目
1.首先电脑要在安装node环境下才能运行 2.全局安装webpack:npm install webpack -g 3.安装vue脚手架: npm install vue-cli -g 4.新建文件 ...
- shell grep
grep "str" file > /dev/null if [ $? -eq 1]; then echo "no str" else echo &quo ...