<p dir="auto"><strong><a href="https://jira.spring.io/secure/ViewProfile.jspa?name=dvb123" rel="nofollow">David Victor</a></strong> opened <strong><a href="https://jira.spring.io/browse/SPR-8016?redirect=false" rel="nofollow">SPR-8016</a></strong>* and commented</p>
<p dir="auto">I am working with an API which returns an empty response body on http status 200 (OK) &amp; a body which is populated on http status 400 (Bad Request).</p>
<p dir="auto">When using RestTemplate.getForEntity() this is fine for the case where the body is populated, however I get an exception for the 'null body' case.</p>
<p dir="auto">My understanding is one should provide a class implementing the ResponseBody interface &amp; make the call via the execute() method on the RestTemplate.</p>
<p dir="auto">This task is a request to consider that the use case here is common &amp; whether Spring should offer something out of the box for this situation.</p>
<p dir="auto">Also See: <a href="http://stackoverflow.com/questions/3322381/spring-resttemplate-behavior-when-handling-responses-with-a-status-of-no-content/3648447#3648447" rel="nofollow">http://stackoverflow.com/questions/3322381/spring-resttemplate-behavior-when-handling-responses-with-a-status-of-no-content/3648447#3648447</a></p>
<hr>
<p dir="auto"><strong>Affects:</strong> 3.1 M1</p>
<p dir="auto"><strong>Issue Links:</strong></p>
<ul dir="auto">
<li><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="398109841" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/12566" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/12566/hovercard" href="https://github.com/spring-projects/spring-framework/issues/12566">#12566</a> Better handling of 204 No Content in RestTemplate (<em><strong>"duplicates"</strong></em>)</li>
<li><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="398179152" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/17560" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/17560/hovercard" href="https://github.com/spring-projects/spring-framework/issues/17560">#17560</a> Resttemplate with HttpComponentsClientHttpRequestFactory will make HttpMessageConverterExtractor.extractData return null if the header contains content-encoding gzip, the connection is closed and the response isn't chunked (<em><strong>"is duplicated by"</strong></em>)</li>
<li><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="398176553" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/17309" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/17309/hovercard" href="https://github.com/spring-projects/spring-framework/issues/17309">#17309</a> RestTemplate cannot handle GZIP response since 4.1.3 (<em><strong>"is duplicated by"</strong></em>)</li>
</ul>
<p dir="auto">9 votes, 19 watchers</p>
<p dir="auto"><strong><a href="https://jira.spring.io/secure/ViewProfile.jspa?name=kdonald" rel="nofollow">Keith Donald</a></strong> opened <strong><a href="https://jira.spring.io/browse/SPR-6745?redirect=false" rel="nofollow">SPR-6745</a></strong> and commented</p>
<p dir="auto">This means annotation-driven type conversion does not work when binding to JavaBean properties with SpEL.  This can be worked around by defining annotations on the method parameter of a setter method, and the return value of a getter, but is not ideal.</p>
<p dir="auto">SpEL should be consistent with BeanWrapper with its TypeDescriptor configuration when getting and setting JavaBean properties.  This likely means use of a BeanTypeDescriptor in those cases.</p>
<p dir="auto">This was noticed when attempting to use a SpEL-based data mapper to map String fields in a Map to a JavaBean, where annotation-driven parsing rules were specified on JavaBean fields.  This works fine with a BeanWrapper since the BeanTypeDescriptor exposes annotations from the field, getter, and setter.  Unfortunately, SpEl just uses the default TypeDescriptor in these cases which only exposes parameter annotations.</p>
<hr>
<p dir="auto"><strong>Affects:</strong> 3.0 GA</p>
<p dir="auto"><strong>Issue Links:</strong></p>
<ul dir="auto">
<li><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="398102865" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/11493" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/11493/hovercard" href="https://github.com/spring-projects/spring-framework/issues/11493">#11493</a> Allow SpEl expressions to be evaluated from JSPs (<em><strong>"is depended on by"</strong></em>)</li>
<li><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="398097313" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/10748" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/10748/hovercard" href="https://github.com/spring-projects/spring-framework/issues/10748">#10748</a> Create a Unified EL implementation with Spring EL</li>
</ul>
<p dir="auto"><strong>Referenced from:</strong> commits <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/spring-projects/spring-framework/commit/117b1382333bd7e2ae26a85359b3cda89df9afef/hovercard" href="https://github.com/spring-projects/spring-framework/commit/117b1382333bd7e2ae26a85359b3cda89df9afef"><tt>117b138</tt></a></p>