Scenario: this error occurs when transferring parameters between springcloud and seat microservices. A service has the function of uploading files,
Service B needs to call the upload file interface of service A. there is a common parent class reference C between a and B.
The method defined in C is
@RequestMapping(“/file/upload”) public R uploadFile(MultipartFile file); td> |
The method defined in a is
@RequestMapping(“/file/upload”) public R uploadFile(MultipartFile file){ … } |
Call statements defined in B
b.uploadFile(file); td> |
After writing in this way, report an error, such as the title
Add the annotation @ requestparam before the request parameter file in methods a and C.
div>
Read More:
- com.fasterxml.jackson.databind.exc.InvalidDefinitionException: No serializer found for class
- Error in idea compilation: java.lang.OutOfMemoryError Java heap space and java.lang.StackOverflowError
- java.lang.NoSuchMethodError: org.json.JSONObject.put(Java/lang/String; Java/util/Collection;) “209151;”
- Java learning error information 3 — Java notes
- Failed to convert value of type ‘java.lang.String‘ to required type ‘java.util.Date‘;
- CMD input Java error could not create the Java virtual machine
- Java:java.lang.OutOfMemoryError : GC overhead limit exceeded solution
- [Solved] Flowable Start Error: ClassCastException: java.time.LocalDateTime cannot be cast to java.lang.String
- Java idea Compilation failed: internal java compiler error
- -bash: /usr/java/jdk1.8.0_101/bin/java: Permission denied
- Java: compilation failed: internal java compiler error and invalid source distribution resolution
- Eclipse startup error: a Java runtime environment (JRE) or Java Development Kit (JDK) must be available
- Cause: java.sql.SQLException: Error setting driver on UnpooledDataSource. Cause: java.lang.ClassNot
- Java:Error:Open registry key software \ JavaSoft \ Java Runtime Environment Problems
- [Solved] Tomcat9 Startup Error: Failed creating Java ‘XXXX\Java\jdk1.8\jre\bin\server\jvm.dll‘.
- Error: (44,73) lambda expression and XML are not supported in Java: – source 1.7 Error:java : Compilation failed
- Remember that Maven can’t recognize Java_ Home problem error: Java_ HOME is not defined correctly.
- IntelliJ idea error: Java: compilation failed: solution to internal java compiler error
- Solutions to error: Java: compilation failed: internal java compiler error
- Could not find appears when JDK is configured java.dll Could not find Java se runtime environment problems