楔子

通过meavn install 打包部署,springmvc 上传文件,临时目录不能被创建
ServletContext resource [/fileUpload/temp]] could not be created

	<!-- 文件上传 -->
	<!-- 配置MultipartResolver 用于文件上传 使用spring的CommosMultipartResolver -->
	<bean id="multipartResolver" class="org.springframework.web.multipart.commons.CommonsMultipartResolver">
		<property name="defaultEncoding" value="UTF-8" /><!-- 请求的编码格式 -->
		<property name="maxUploadSize">
			<value>#{200*1024*1024}</value>
		</property> <!-- 上传文件大小限制为31M,31*1024*1024 -->
		<property name="maxInMemorySize" value="4096" /><!-- 配置缓存 -->
		<!-- 上传文件的临时路径 -->
		<property name="uploadTempDir" value="fileUpload/temp"></property>
	</bean>
Error setting property values; nested exception is org.springframework.beans.PropertyBatchUpdateException; nested PropertyAccessExceptions (1) are:
PropertyAccessException 1: org.springframework.beans.MethodInvocationException: Property 'uploadTempDir' threw exception; nested exception is java.lang.IllegalArgumentException: Given uploadTempDir [ServletContext resource [/fileUpload/temp]] could not be created

ServletContext resource [/fileUpload/temp]] could not be created

在临时目录放置一个文件

以免通过 meavn install 丢弃临时文件目录


ServletContext resource [/fileUpload/temp]] could not be created

相关文章:

  • 2021-08-16
  • 2021-08-14
  • 2021-06-03
  • 2021-08-26
  • 2021-06-18
  • 2021-07-14
  • 2021-08-31
猜你喜欢
  • 2022-12-23
  • 2021-11-03
  • 2022-01-19
  • 2022-02-23
  • 2021-11-28
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案