如何使用react-native的fetch api将文件上传到服务器需要实现与此类似的功能 -
------WebKitFormBoundaryRAxza9ew2ADaYHn5
Content-Disposition: form-data; name="file"; filename="66154520.jpg"
Content-Type: image/jpeg
------WebKitFormBoundaryRAxza9ew2ADaYHn5--
Run Code Online (Sandbox Code Playgroud) 我在intellij中运行spring-boot应用程序,所有计划的任务都正常运行,但是我在@RestController和@RequestMapping注册的控制器未注册。当我使用eclipse时,当我尝试访问这些文件时我得到404。甚至我的ide控制台都显示rest控制器已注册:
RequestMappingHandlerMapping - Mapped "{[/api/{v1}/restaurant/{cloudSiteId}/staff/{staffId}],methods=[GET]}" onto private java.lang.Object com.limetray.inventory.controller.StaffLocationController.getStaffDetail
Run Code Online (Sandbox Code Playgroud)
无法猜测可能出了什么问题?
我想把它放在我的pom.xml-
<configuration>
<archive>
<manifest>
<mainClass>com.limetray.helper.App</mainClass>
</manifest>
</archive>
</configuration>
Run Code Online (Sandbox Code Playgroud)
但得到这个错误 -
Malformed POM /home/rakesh/Desktop/limetray/lt-utils/pom.xml: Unrecognised tag: 'configuration' (position: START_TAG seen ...<url>http://maven.apache.org</url>\n <configuration>... @10:18) @ /home/rakesh/Desktop/limetray/lt-utils/pom.xml, line 10, column 18 -> [Help 2]
Run Code Online (Sandbox Code Playgroud)
我的pom.xml-
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.limetray.helper</groupId>
<artifactId>maven-jar-plugin</artifactId>
<packaging>jar</packaging>
<version>1.0-SNAPSHOT</version>
<name>lt-utils</name>
<url>http://maven.apache.org</url>
<configuration>
<archive>
<manifest>
<mainClass>com.limetray.helper.App</mainClass>
</manifest>
</archive>
</configuration>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<scope>test</scope>
</dependency>
</dependencies>
</project>
Run Code Online (Sandbox Code Playgroud)