Zuul: Uploading file through RestTemplate
<p>I try to create simple Spring Cloud model: Zuul, Eureka, MyService1, MyService2.</p>

<p>MyService1 &amp; Myservice2 register by Eureka.</p>

<p>MyService1 configured:</p>

<pre><code>@EnableAutoConfiguration
@ComponentScan
@EnableEurekaClient
@EnableJpaRepositories
@EnableFeignClients
public class ServiceOne {
    public static void main(String[] args){
        SpringApplication.run(ServiceOne.class, args);
    }
}
</code></pre>

<p>and has RestTemplate for uploading file into MyService2.</p>

<pre><code>@Autowired
private RestTemplate restTemplate;

LinkedMultiValueMap&lt;String, Object&gt; map = new LinkedMultiValueMap&lt;&gt;();
map.put("file", Arrays.asList(new Object[] {new ClassPathResource("testfile.txt")}));
HttpHeaders headers = new HttpHeaders();
headers.setContentType(MediaType.MULTIPART_FORM_DATA);
HttpEntity&lt;LinkedMultiValueMap&lt;String, Object&gt;&gt; requestEntity = new HttpEntity&lt;&gt;(map, headers);
restTemplate.postForObject("http://service2", requestEntity, String.class);
</code></pre>

<p>MyService2 configured:</p>

<pre><code>@SpringBootApplication
@Configuration
@ComponentScan
@EnableEurekaClient
public class ServiceTwo {
    public static void main(String[] args) {
        SpringApplication.run(ServiceTwo.class, args);
    }
}
</code></pre>

<p>and has RestController:</p>

<pre><code>@RestController
@RequestMapping(value = AppRestController.REST_URL)
public class RootController {
@RequestMapping(value = "/context}", method = RequestMethod.POST)
    public ResponseEntity&lt;String&gt; upload (MultipartFile file) {
        ...

    }
}
</code></pre>

<p>Request recieved by </p>

<blockquote>
  <p>RootController</p>
</blockquote>

<p>, but</p>

<blockquote>
  <p>file == null.</p>
</blockquote>

<p>I built <strong>working</strong> simple SpringBoot application containing RestTemplate:</p>

<pre><code>public class TestRestTemplate {
    public static void main(String[] args) {
        LinkedMultiValueMap&lt;String, Object&gt; map = new LinkedMultiValueMap&lt;&gt;();
        map.put("file", Arrays.asList(new Object[] {new ClassPathResource("testfile.txt")}));
        HttpHeaders headers = new HttpHeaders();
        headers.setContentType(MediaType.MULTIPART_FORM_DATA);
        HttpEntity&lt;LinkedMultiValueMap&lt;String, Object&gt;&gt; requestEntity = new HttpEntity&lt;&gt;(map, headers);
        RestTemplate restTemplate = new RestTemplate();
        //Zuul address
        restTemplate.postForObject("http://localhost:8761/service2", requestEntity, String.class);
    }
}
</code></pre>

<p>What do i wrong?</p>