Commit Graph

526 Commits

Author SHA1 Message Date
Juergen Hoeller
a833889c2a Polishing 2014-09-17 21:55:46 +02:00
Juergen Hoeller
15320db414 Polishing 2014-09-17 02:35:41 +02:00
Juergen Hoeller
f394c8aa2a Polishing
Issue: SPR-12196
2014-09-16 15:03:21 +02:00
Juergen Hoeller
26a93b6a33 Client request implementations enforce RFC 6265 (cookies in a single header)
Issue: SPR-12196
2014-09-16 15:02:21 +02:00
Juergen Hoeller
70412a9d0a Accept empty Content-Type header
Issue: SPR-12173
2014-09-12 16:44:56 +02:00
Juergen Hoeller
1e7bfd91a7 Polishing 2014-09-10 01:28:54 +02:00
Juergen Hoeller
5790fc904a Consistent support for java.util.Optional for all applicable handler method arguments
Issue: SPR-12171
2014-09-10 01:27:46 +02:00
Juergen Hoeller
c8bbd0bae4 Polishing 2014-09-07 22:51:21 +02:00
Juergen Hoeller
a5a56d5052 Polishing 2014-09-04 11:20:11 +02:00
Juergen Hoeller
81ba3b33f6 Dropped RequestEntity's template variable methods in order to remove dependencies on org.springframework.web
Instead, as outlined in the revised javadoc, let's recommend manual UriTemplate usage for RequestEntity URI input.

Issue: SPR-11752
2014-09-04 11:19:59 +02:00
Juergen Hoeller
d75f128752 Polishing 2014-09-04 03:03:12 +02:00
Juergen Hoeller
86b7118da8 Polishing 2014-09-04 02:30:25 +02:00
Juergen Hoeller
20c2ba35dc Polishing 2014-09-04 00:55:38 +02:00
Juergen Hoeller
f4f7f40f18 Test for actual HttpInvokerProxyFactoryBean usage with plain FactoryBean return type
Issue: SPR-12141
2014-09-04 00:33:36 +02:00
Sebastien Deleuze
36542549fa Add HTTP status to ServletRequestHandledEvent
Issue: SPR-12119
2014-08-29 21:47:03 -04:00
Rossen Stoyanchev
a0b231d36d Update port related code in UriComponentsBuilder
Use null to indicate no port has been provided.
Raise exception when port has not been expanded.

Issue: SPR-12123
2014-08-29 09:21:15 -04:00
Sebastien Deleuze
8fbd310b07 Support port URI template variables
This commit makes it possible to specify port with an URI template variable.

For example :
RestTemplate restTemplate = new RestTemplate();
restTemplate.getForObject("http://localhost:{port}/resource", String.class, 8080);

Issue: SPR-12123
2014-08-29 08:59:11 -04:00
Juergen Hoeller
b93dd95475 Polishing 2014-08-22 22:55:57 +02:00
Juergen Hoeller
439ce4a1a5 Polishing
Issue: SPR-12112
2014-08-22 14:00:28 +02:00
Arjen Poutsma
dbe337f932 ResponseEntity provides static "badRequest()" convenience method as well
Issue: SPR-12112
2014-08-22 13:36:45 +02:00
Juergen Hoeller
b73c531527 PropertySource implementations perform conversion to String arrays via StringUtils (getting rid of EMPTY_NAMES_ARRAY) 2014-08-21 22:46:33 +02:00
Juergen Hoeller
0c32d66cbd ShallowEtagHeaderFilter supports Servlet 3.1's setContentLengthLong as well
Issue: SPR-12097
2014-08-19 20:17:42 +02:00
Juergen Hoeller
2ef3d66c89 Polishing 2014-08-18 19:27:08 +02:00
Sebastien Deleuze
ebc726a915 Allow null ObjectMapper in Jackson2ObjectMapperFactoryBean.getObjectType()
Issue: SPR-11785
2014-08-14 13:40:47 +02:00
Sebastien Deleuze
6665634675 Support Jackson based XML serialization/deserialization
This commit adds support for XML serialization/deserialization based on
the jackson-dataformat-xml extension. When using @EnableWebMvc or
<mvc:annotation-driven/>, Jackson will be used  by default instead of JAXB2
if jackson-dataformat-xml classes are found in the classpath.

This commit introduces MappingJackson2XmlHttpMessageConverter and
MappingJackson2XmlView classes, and common parts between JSON
and XML processing have been moved to AbstractJackson2HttpMessageConverter
and AbstractJackson2View classes.

MappingJackson2XmlView supports serialization of a single object. If the model
contains multiple entries, MappingJackson2XmlView.setModelKey() should be
used to specify the entry to serialize.

Pretty print works in XML, but tests are not included since a Woodstox dependency
is needed, and it is better to continue testing spring-web and spring-webmvc
against JAXB2.

Issue: SPR-11785
2014-08-13 16:22:58 +02:00
Juergen Hoeller
92bd240474 Polishing
Issue: SPR-12079
2014-08-13 15:04:58 +02:00
Roy Clarkson
d6fd40d6dc Upgrade to Gson 2.3
This release contains the following new features:

- The new @JsonAdapter annotation to specify a Json TypeAdapter for a
  class field
- JsonPath support: JsonParser.getPath() method returns the JsonPath
  expression
- New public methods in JsonArray (similar to the java.util.List):
  contains(JsonElement), remove(JsonElement), remove(int index),
  set(int index, JsonElement element)
- Many other smaller bug fixes

See: https://groups.google.com/forum/#!topic/google-gson/MOqf5RGtIzk
2014-08-12 11:47:40 +03:00
Phillip Webb
ac8326d2df Polish mockito usage
Consistent use of BDDMockito rather than standard Mockito.
2014-08-11 16:23:11 -07:00
Juergen Hoeller
ad475ffadf Consistent vararg declarations for String array setters 2014-08-08 17:17:09 +02:00
Juergen Hoeller
5862ddc869 ResponseEntity provides static "notFound()" convenience method as well
Issue: SPR-12070
2014-08-07 22:28:35 +02:00
Sebastien Deleuze
3922f6fc53 Update references to RFC 2616
Replace references to the old RFC 2616 (HTTP 1.1) with references
to the new RFCs 7230 to 7235.

This commit also deprecates:
 - HttpStatus.USE_PROXY
 - HttpStatus.REQUEST_ENTITY_TOO_LARGE in favor of HttpStatus.PAYLOAD_TOO_LARGE
 - HttpStatus.REQUEST_URI_TOO_LONG in favor of HttpStatus.URI_TOO_LONG

Issue: SPR-12067
2014-08-07 14:50:45 +02:00
Sebastien Deleuze
ebc5fea77b Add more HttpHeaders constants for standard HTTP headers
Issue: SPR-12063
2014-08-05 11:11:09 +02:00
Stephane Nicoll
3da68cfe21 Remove unused imports 2014-08-04 14:13:40 +02:00
Rossen Stoyanchev
5859649af7 Update UriTemplate Javadoc
Issue: SPR-10497
2014-07-31 17:08:08 -04:00
Rossen Stoyanchev
c4d7976c37 Update RestTemplate Javadoc
Issue: SPR-10497
2014-07-31 17:02:30 -04:00
Rossen Stoyanchev
135a3ff3d8 Use raw status code in RestTemplate logResponseStatus
Issue: SPR-12022
2014-07-30 15:43:43 -04:00
Juergen Hoeller
8f484d382e Polishing 2014-07-29 11:42:37 +02:00
Juergen Hoeller
8cc0fa5ae1 Polishing 2014-07-28 22:05:40 +02:00
Rossen Stoyanchev
5be1ff281c Polish 2014-07-22 16:56:59 -04:00
Brian Clozel
b56703eadc Add Google Protobuf support with a MessageConverter
This change adds a new HttpMessageConverter supporting
Google protocol buffers (aka Protobuf).
This message converter supports the following media types:
* application/json
* application/xml
* text/plain
* text/html (output only)
* and by default application/x-protobuf

Note, in order to generate Proto Message classes, the protoc binary
must be available on your system.

Issue: SPR-5807/SPR-6259
2014-07-22 16:56:59 -04:00
Juergen Hoeller
f0bcb773f9 ResourceHttpMessageConverter does not call contentLength() on InputStreamResource
Issue: SPR-12017
2014-07-22 17:00:57 +02:00
Juergen Hoeller
9d6c38bd54 Consistent bracket alignment 2014-07-18 17:21:58 +02:00
Juergen Hoeller
188e58c46a Fixed javadoc links 2014-07-18 17:21:44 +02:00
Sebastien Deleuze
86e8bdab6b Make ListenableFuture compliant with Java 8 lambda
Make it possible to use a ListenableFuture with Java 8
lambda expressions, using a syntax like
listenableFuture.addCallback(() -> ..., () -> ...);

Issue: SPR-11820
2014-07-16 16:06:24 +02:00
Juergen Hoeller
777085bbfc MappingJackson2JsonView/MessageConverter calls non-deprecated Jackson 2.1+ createGenerator API
Also removing workaround for https://github.com/FasterXML/jackson-databind/issues/12 (fixed in 2.1+)

Issue: SPR-11262
2014-07-09 21:23:09 +02:00
Brian Clozel
a4484bb767 Fix UriComponentsBuilder.fromUriString parsing error
This commit fixes cases where part of the URI was mistaken for the
userinfo when:
* the URI did not contain any path
* the query string contained the "@"

Issue: SPR-11964
2014-07-09 16:58:11 +02:00
Juergen Hoeller
1222ca38fb RestTemplate accepts getMessageConverters() List on setMessageConverters again
Issue: SPR-11962
2014-07-07 14:33:48 +02:00
Juergen Hoeller
367b0394a2 Spring's ROME support requires ROME 1.5 (com.rometools.rome) now
Issue: SPR-11893
2014-07-02 15:04:41 +02:00
Rossen Stoyanchev
d3a87a13f7 Polish 2014-07-01 16:10:00 -04:00
Arjen Poutsma
f6fbdafb6a Introduce RequestEntity and builder
This commit introduces the RequestEntity, a class similar to
ResponseEntity, but meant for HTTP requests rather than responses. The
RequestEntity can be used both in RestTemplate as well as @MVC
scenarios.

The class also comes with a builder, similar to the one found in
ResponseEntity, which allows for building of a RequestEntity through a
fluent API.

Issue: SPR-11752
2014-07-01 16:10:00 -04:00