java.net.URISyntaxException:索引2处的不透明部分中的非法字符:C:\ sba \ input

时间:2017-04-26 10:41:29

标签: java spring-batch spring-batch-admin

我正在使用this project作为我的Spring Batch Admin项目。

此用户界面有一个文件标签,您可以在其中上传文件,但在使用Windows 8.1的PC上无效。

我得到例外 - java.net.URISyntaxException: Illegal character in opaque part at index 2: C:\sba\input

方法 - createFile(),第107行(!new URI(directory.getAbsolutePath())LocalFileService class

我已指定属性batch.files.upload-dir=/sba/input,如示例中所示。

进程创建目录 - C:\sba\input,因为我的Weblogic部署在Cvd中,部署在Weblogic上的管理项目中。

我是否需要以其他方式为Windows指定此属性,还是API中的错误?

在API中,bean定义如下,

<bean id="fileService" class="org.springframework.batch.admin.service.LocalFileService"
            xmlns="http://www.springframework.org/schema/beans">
        <property name="fileSender" ref="fileSender" />
        <property name="outputDir" value="${batch.files.upload-dir:#{systemProperties['java.io.tmpdir']}}"/>
    </bean>

如果未指定此属性并且系统尝试使用用户的临时目录,则会出现相同的异常。

0 个答案:

没有答案