1. 07 7月, 2012 2 次提交
  2. 06 7月, 2012 3 次提交
    • C
      Resolve nested placeholders via PropertyResolver · 2ec78341
      Chris Beams 提交于
      Prior to this change, PropertySourcesPropertyResolver (and therefore
      all AbstractEnvironment) implementations failed to resolve nested
      placeholders as in the following example:
      
          p1=v1
          p2=v2
          p3=${v1}:{$v2}
      
      Calls to PropertySource#getProperty for keys 'p1' and 'v1' would
      successfully return their respective values, but for 'p3' the return
      value would be the unresolved placeholders. This behavior is
      inconsistent with that of PropertyPlaceholderConfigurer.
      
      PropertySourcesPropertyResolver #getProperty variants now resolve any
      nested placeholders recursively, throwing IllegalArgumentException for
      any unresolvable placeholders (as is the default behavior for
      PropertyPlaceholderConfigurer). See SPR-9569 for an enhancement that
      will intoduce an 'ignoreUnresolvablePlaceholders' switch to make this
      behavior configurable.
      
      This commit also improves error output in
      PropertyPlaceholderHelper#parseStringValue by including the original
      string in which an unresolvable placeholder was found.
      
      Issue: SPR-9473, SPR-9569
      2ec78341
    • R
      Fix minor issue in HandlerMethod · b9786cca
      Rossen Stoyanchev 提交于
      Before this change HandlerMethod used ClassUtils.getUserClass(Class<?>)
      to get the real user class, and not one generated by CGlib. However it
      failed to that under all circumstances. This change fixes that.
      
      Issue: SPR-9490
      b9786cca
    • R
      Add defaultCharset field to StringHttpMessageConverter · a4240d28
      Rossen Stoyanchev 提交于
      Before this change the StringHttpMessageConverter used a fixed charset
      "ISO-8859-1" if the requested content type did not specify one. This
      change adds a defaultCharset field and a constructor to configure it in
      StringHttpMessageConverter.
      
      Issue: SPR-9487
      a4240d28
  3. 05 7月, 2012 7 次提交
  4. 03 7月, 2012 3 次提交
  5. 28 6月, 2012 2 次提交
  6. 27 6月, 2012 1 次提交
  7. 26 6月, 2012 5 次提交
    • R
      Polish PathVariableMapMethodArgumentResolver · 3f5fa44d
      Rossen Stoyanchev 提交于
      Return an empty map when there are no path variables, rather than
      raising an exception. This is consistent with similar resolvers for
      extracting headers and request parameters.
      
      Issue: SPR-9289
      3f5fa44d
    • R
      Enable smart suffix pattern match for request mapping · 4fd7645e
      Rossen Stoyanchev 提交于
      Following the introduction of ContentNegotiationManager that allows,
      among other things, to configure the file extensions to use for content
      negotiation, this change adds "smart" suffix pattern match that matches
      against the configured file extensions only rather than against any
      extension.
      
      Given the request mapping "/jobs/{jobName}" and one configured file
      extension ("json"), a request for "/jobs/my.job" will select the
      pattern "/jobs/{jobName}" while a request for "/jobs/my.job.json" will
      select the pattern "/jobs/{jobName}.json". Previously, both requests
      would have resulted in the pattern "/jobs/{jobName}.*".
      
      Issue: SPR-7632, SPR-8474
      4fd7645e
    • R
      Polish ContentNegotiationStrategy support · f94aed83
      Rossen Stoyanchev 提交于
      Issue: SPR-8410, SPR-8417, SPR-8418,SPR-8416, SPR-8419,SPR-7722
      f94aed83
    • R
      Polish client support for HTTP PATCH · 4623568b
      Rossen Stoyanchev 提交于
      Issue: SPR-7985
      4623568b
    • C
      Work around apparent bug in README markdown parsing · 8e568466
      Chris Beams 提交于
      The exact text above the "Staying in touch" section caused "Staying in
      touch" to lose it's formatting as a second-level heading.  Adding
      " for details" to the sentence above works around the problem.
      8e568466
  8. 25 6月, 2012 2 次提交
  9. 23 6月, 2012 1 次提交
    • R
      Add support for HTTP PATCH method · a0747458
      Rossen Stoyanchev 提交于
      The HTTP PATCH method is now supported whereever HTTP methods are used.
      Annotated controllers can be mapped to RequestMethod.PATCH.
      
      On the client side the RestTemplate execute(..) and exchange(..)
      methods can be used with HttpMethod.PATCH. In terms of HTTP client
      libraries, Apache HttpComponents HttpClient version 4.2 or later is
      required (see HTTPCLIENT-1191). The JDK HttpURLConnection does not
      support the HTTP PATCH method.
      
      Issue: SPR-7985
      a0747458
  10. 22 6月, 2012 1 次提交
    • R
      Add abstractions for content negotiation · f05e2bc5
      Rossen Stoyanchev 提交于
      Introduced ContentNeogtiationStrategy for resolving the requested
      media types from an incoming request. The available implementations
      are based on path extension, request parameter, 'Accept' header,
      and a fixed default content type. The logic for these implementations
      is based on equivalent options, previously available only in the
      ContentNegotiatingViewResolver.
      
      Also in this commit is ContentNegotiationManager, the central class to
      use when configuring content negotiation options. It accepts one or
      more ContentNeogtiationStrategy instances and delegates to them.
      
      The ContentNeogiationManager can now be used to configure the
      following classes:
      
      - RequestMappingHandlerMappingm
      - RequestMappingHandlerAdapter
      - ExceptionHandlerExceptionResolver
      - ContentNegotiatingViewResolver
      
      Issue: SPR-8410, SPR-8417, SPR-8418,SPR-8416, SPR-8419,SPR-7722
      f05e2bc5
  11. 21 6月, 2012 1 次提交
    • C
      Refactor PropertyResolver impl for consistency · 35055fd8
      Chris Beams 提交于
      PropertySourcesPropertyResolver#containsProperty now
      calls #containsProperty on each underlying PropertySource instead of
      calling #getProperty and checking for null.
      
      Issue: SPR-9529
      35055fd8
  12. 20 6月, 2012 6 次提交
    • S
      Document default scripts for embedded databases · 027e49c5
      Sam Brannen 提交于
      The reference manual currently documents the wrong file name for the
      default data SQL script used by EmbeddedDatabaseBuilder. In addition,
      the testing chapter of the reference manual does not link to the testing
      section of the JDBC chapter.
      
       - Updated the "Testing data access logic with an embedded database"
         section of the reference manual appropriately.
       - Added a new paragraph to the "JDBC Testing Support" section of the
         testing chapter which cross references the "Testing data access logic
         with an embedded database" section.
      
      Issue: SPR-9467
      027e49c5
    • S
      Document SPR-9493 in the changelog · 5eae22ab
      Sam Brannen 提交于
      Issue: SPR-9493
      5eae22ab
    • S
      Fix Javadoc typo in ConfigurableWebEnvironment · e3d8ab20
      Sam Brannen 提交于
      e3d8ab20
    • C
      Fix line endings in new JacksonObjectMapper classes · 08498d57
      Chris Beams 提交于
      Commit aa415d7c introduced
      JacksonObjectMapperFactoryBean and associated tests, but with Windows
      (CRLF) line endings instead of the conventional Unix (LF) line endings.
      
      This commit converts these files to LF endings using the handy
      `dos2unix` utility.
      
      Issue: SPR-9125
      08498d57
    • S
      Merge pull request #97 from sbrannen/SPR-9493 · 64d66059
      Sam Brannen 提交于
      * SPR-9493:
        Infer return type of parametrized factory methods
      64d66059
    • S
      Infer return type of parametrized factory methods · c461455c
      Sam Brannen 提交于
      Currently, if a factory method is parameterized and the corresponding
      variable types are declared on the method itself instead of on the
      enclosing class or interface, Spring always predicts the return type to
      be Object, even if the return type can be explicitly inferred from the
      method signature and supplied arguments (which are available in the bean
      definition).
      
      This commit introduces a new resolveParameterizedReturnType() method in
      GenericTypeResolver that attempts to infer the concrete type for the
      generic return type of a given parameterized method, falling back to the
      standard return type if necessary. Furthermore,
      AbstractAutowireCapableBeanFactory now delegates to
      resolveParameterizedReturnType() when predicting the return type for
      factory methods.
      
      resolveParameterizedReturnType() is capable of inferring the concrete
      type for return type T for method signatures similar to the following.
      Such methods may potentially be static. Also, the formal argument list
      for such methods is not limited to a single argument.
      
       - public <T> T foo(Class<T> clazz)
       - public <T> T foo(Object obj, Class<T> clazz)
       - public <V, T> T foo(V obj, Class<T> clazz)
       - public <T> T foo(T obj)
      
      Issue: SPR-9493
      c461455c
  13. 19 6月, 2012 6 次提交
    • C
      Reformat and add links to README · 9fc05a80
      Chris Beams 提交于
      The readme is heavy on links and hard to read in source form when using
      typical inline Markdown links. The following changes have been made to
      increase readability.
      
       - Wrap lines at 80 characters
       - Use 'implicit link name' shortcut syntax as described at [1]
       - Add link to 'spring-mvc' Stack Overflow tag as well
       - Add link to new 'lifecycle of an issue' wiki doc
      
      [1]: http://daringfireball.net/projects/markdown/syntax
      9fc05a80
    • C
      Add Gradle task for building zip with dependencies · e5bbec7e
      Chris Beams 提交于
      Some Spring Framework users and teams cannot use transitive dependency
      management tools like Maven, Gradle and Ivy. For them, a `distZip` task
      has been added to allow for creating a Spring Framework distribution
      from source that includes all optional and required runtime
      dependencies for all modules of the framework.
      
      This 'dist-with-deps' zip is not published to the SpringSource
      repository nor to the SpringSource community download page. It is
      strictly an optional task introduced as a convenience to the users
      mentioned above.
      
      Detailed instructions for building this zip locally have been added to
      the wiki and the README has been updated with a link to that new doc.
      
      Issue: SPR-6575
      e5bbec7e
    • S
      Fix outdated Javadoc in the TestContext framework · 726655af
      Sam Brannen 提交于
      Fixed outdated Javadoc regarding support for 'annotated classes' in
      the TestContext Framework.
      726655af
    • C
      Fix typo in MessageSource reference docs · de04d9c6
      Chris Beams 提交于
      Issue: SPR-5022
      de04d9c6
    • R
      Merge pull reqest #88 from dmak/SPR-9125 · 7dcca4bc
      Rossen Stoyanchev 提交于
      * SPR-9125:
        BeanFactory for configuring a Jackson ObjectMapper
      7dcca4bc
    • D
      BeanFactory for configuring a Jackson ObjectMapper · aa415d7c
      Dmitry Katsubo 提交于
      The BeanFactory makes it easier to configure a customized Jackson
      ObjectMapper (for example enable/disable certain features).
      This bean factory is usually used with
      MappingJacksonHttpMessageConverter or MappingJacksonJsonView.
      See JavaDoc for examples.
      
      Issue: SPR-9125
      aa415d7c