Commit Graph

427 Commits

Author SHA1 Message Date
Rossen Stoyanchev 18e98329db SPR-6909 Include URI template vars in data binding
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@4241 50f2f4bb-b051-0410-bef5-90022cba6387
2011-04-26 11:54:54 +00:00
Rossen Stoyanchev 99a4e3bc0e SPR-7543 Add @PathVariables to the model
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@4236 50f2f4bb-b051-0410-bef5-90022cba6387
2011-04-21 15:18:45 +00:00
Arjen Poutsma b8438b7396 Buffering RequestFactory that allows for multiple response body reads.
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@4235 50f2f4bb-b051-0410-bef5-90022cba6387
2011-04-21 15:09:44 +00:00
Rossen Stoyanchev ef6efa3f6f Remove consumes from @RequestMapping
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@4234 50f2f4bb-b051-0410-bef5-90022cba6387
2011-04-21 14:54:55 +00:00
Arjen Poutsma d4f714010e added toString to HttpEntity
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@4232 50f2f4bb-b051-0410-bef5-90022cba6387
2011-04-21 11:39:20 +00:00
Rossen Stoyanchev aae28ee298 SPR-8214 review unit tests
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@4227 50f2f4bb-b051-0410-bef5-90022cba6387
2011-04-15 18:42:58 +00:00
Rossen Stoyanchev 1660ec4b0e SPR-8214 Javadoc and polish
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@4224 50f2f4bb-b051-0410-bef5-90022cba6387
2011-04-13 23:15:19 +00:00
Sam Brannen fd2c472058 Added Apache Commons HTTP JARs to the Eclipse classpath.
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@4223 50f2f4bb-b051-0410-bef5-90022cba6387
2011-04-12 21:58:38 +00:00
Micha Kiener ab4a3568b1 SPR-6416, initial commit for the conversation management
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@4217 50f2f4bb-b051-0410-bef5-90022cba6387
2011-04-12 13:21:18 +00:00
Arjen Poutsma ce8a55209e SPR-6180 - Upgrade Apache HttpClient to version 4.0
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@4215 50f2f4bb-b051-0410-bef5-90022cba6387
2011-04-12 07:55:38 +00:00
Arjen Poutsma 87473307d1 SPR-6180 - Upgrade Apache HttpClient to version 4.0
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@4211 50f2f4bb-b051-0410-bef5-90022cba6387
2011-04-11 13:12:45 +00:00
Arjen Poutsma 16bae7e143 SPR-7354 - Added equivalent of JAX-RS @Consumes to Spring MVC
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@4194 50f2f4bb-b051-0410-bef5-90022cba6387
2011-04-08 09:26:17 +00:00
Rossen Stoyanchev c0692e2ddf ModelAndViewContainer related refinements
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@4192 50f2f4bb-b051-0410-bef5-90022cba6387
2011-04-07 18:09:28 +00:00
Rossen Stoyanchev 64fbd3740d SPR-8217 update MVC namespace to use HandlerMethod infrastructure
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@4189 50f2f4bb-b051-0410-bef5-90022cba6387
2011-04-06 20:28:47 +00:00
Rossen Stoyanchev 5338b4f012 Configurable arg resolvers and return value handlers
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@4188 50f2f4bb-b051-0410-bef5-90022cba6387
2011-04-06 16:55:21 +00:00
Rossen Stoyanchev bc794c1304 Replace ModelAndViewContainer parameter with Object
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@4187 50f2f4bb-b051-0410-bef5-90022cba6387
2011-04-06 15:30:19 +00:00
Rossen Stoyanchev cd93c27598 SPR-8215 Move HandlerMethod code into trunk
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@4184 50f2f4bb-b051-0410-bef5-90022cba6387
2011-04-06 11:30:59 +00:00
Arjen Poutsma ed38afc3dd Allow for customization of the media type for forms.
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@4180 50f2f4bb-b051-0410-bef5-90022cba6387
2011-04-05 09:48:09 +00:00
Sam Brannen 56fa618e12 [SPR-8090] Fixed broken tests in Log4jWebConfigurerTests.
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@4117 50f2f4bb-b051-0410-bef5-90022cba6387
2011-03-28 17:20:40 +00:00
Arjen Poutsma 0cbaea735c @MVC 2.0: AbstractAnnotationMAR -> AbstractNamedValueMAR
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@4037 50f2f4bb-b051-0410-bef5-90022cba6387
2011-02-25 11:05:14 +00:00
Juergen Hoeller e116123f3e polishing
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@3993 50f2f4bb-b051-0410-bef5-90022cba6387
2011-02-10 22:19:10 +00:00
Chris Beams adc9400905 Include license.txt and notice.txt in module JARs
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@3967 50f2f4bb-b051-0410-bef5-90022cba6387
2011-02-09 06:56:40 +00:00
Chris Beams dc22760978 Introduce FeatureSpecification support
Introduce FeatureSpecification interface and implementations

    FeatureSpecification objects decouple the configuration of
    spring container features from the concern of parsing XML
    namespaces, allowing for reuse in code-based configuration
    (see @Feature* annotations below).

    * ComponentScanSpec
    * TxAnnotationDriven
    * MvcAnnotationDriven
    * MvcDefaultServletHandler
    * MvcResources
    * MvcViewControllers

Refactor associated BeanDefinitionParsers to delegate to new impls above

    The following BeanDefinitionParser implementations now deal only
    with the concern of XML parsing.  Validation is handled by their
    corresponding FeatureSpecification object.  Bean definition creation
    and registration is handled by their corresponding
    FeatureSpecificationExecutor type.

    * ComponentScanBeanDefinitionParser
    * AnnotationDrivenBeanDefinitionParser (tx)
    * AnnotationDrivenBeanDefinitionParser (mvc)
    * DefaultServletHandlerBeanDefinitionParser
    * ResourcesBeanDefinitionParser
    * ViewControllerBeanDefinitionParser

Update AopNamespaceUtils to decouple from XML (DOM API)

    Methods necessary for executing TxAnnotationDriven specification
    (and eventually, the AspectJAutoProxy specification) have been
    added that accept boolean arguments for whether to proxy
    target classes and whether to expose the proxy via threadlocal.

    Methods that accepted and introspected DOM Element objects still
    exist but have been deprecated.

Introduce @FeatureConfiguration classes and @Feature methods

    Allow for creation and configuration of FeatureSpecification objects
    at the user level.  A companion for @Configuration classes allowing
    for completely code-driven configuration of the Spring container.

    See changes in ConfigurationClassPostProcessor for implementation
    details.

    See Feature*Tests for usage examples.

    FeatureTestSuite in .integration-tests is a JUnit test suite designed
    to aggregate all BDP and Feature* related tests for a convenient way
    to confirm that Feature-related changes don't break anything.
    Uncomment this test and execute from Eclipse / IDEA. Due to classpath
    issues, this cannot be compiled by Ant/Ivy at the command line.

Introduce @FeatureAnnotation meta-annotation and @ComponentScan impl

    @FeatureAnnotation provides an alternate mechanism for creating
    and executing FeatureSpecification objects.  See @ComponentScan
    and its corresponding ComponentScanAnnotationParser implementation
    for details.  See ComponentScanAnnotationIntegrationTests for usage
    examples

Introduce Default[Formatting]ConversionService implementations

    Allows for convenient instantiation of ConversionService objects
    containing defaults appropriate for most environments.  Replaces
    similar support originally in ConversionServiceFactory (which is now
    deprecated). This change was justified by the need to avoid use
    of FactoryBeans in @Configuration classes (such as
    FormattingConversionServiceFactoryBean). It is strongly preferred
    that users simply instantiate and configure the objects that underlie
    our FactoryBeans. In the case of the ConversionService types, the
    easiest way to do this is to create Default* subtypes. This also
    follows convention with the rest of the framework.

Minor updates to util classes

    All in service of changes above. See diffs for self-explanatory
    details.

    * BeanUtils
    * ObjectUtils
    * ReflectionUtils

git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@3954 50f2f4bb-b051-0410-bef5-90022cba6387
2011-02-08 14:42:33 +00:00
Arjen Poutsma 4c765a4f7e SPR-7494 - Introduce interceptors for RestTemplate
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@3930 50f2f4bb-b051-0410-bef5-90022cba6387
2011-01-28 14:24:52 +00:00
Arjen Poutsma 57f23ae761 SPR-7494 - Introduce interceptors for RestTemplate
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@3929 50f2f4bb-b051-0410-bef5-90022cba6387
2011-01-28 09:17:00 +00:00
Juergen Hoeller 9c127394a3 Servlet/PortletRequestDataBinder perform unwrapping for MultipartRequest as well (SPR-7795)
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@3923 50f2f4bb-b051-0410-bef5-90022cba6387
2011-01-26 20:09:42 +00:00
Arjen Poutsma 3d3ca23d5c Made abstract requests public again
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@3922 50f2f4bb-b051-0410-bef5-90022cba6387
2011-01-26 16:09:41 +00:00
Arjen Poutsma 4b1ac128b1 Small performance improvement
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@3921 50f2f4bb-b051-0410-bef5-90022cba6387
2011-01-26 14:43:34 +00:00
Arjen Poutsma 3145ebc0a2 SPR-7909 - Sending large payloads with RestTemplate results in an OutOfMemoryError
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@3919 50f2f4bb-b051-0410-bef5-90022cba6387
2011-01-25 16:18:47 +00:00
Arjen Poutsma 4ae9715362 SPR-7909 - Sending large payloads with RestTemplate results in an OutOfMemoryError
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@3918 50f2f4bb-b051-0410-bef5-90022cba6387
2011-01-25 16:08:15 +00:00
Arjen Poutsma 6f7f606b45 OutOfMemory Errors when posting large objects via RestTemplate
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@3917 50f2f4bb-b051-0410-bef5-90022cba6387
2011-01-25 09:48:19 +00:00
Arjen Poutsma 1c0263d1cc SPR-7729 - MediaType incorrectly calls the toString() method instead of name() method causing RestTemplate on Android to fail
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@3899 50f2f4bb-b051-0410-bef5-90022cba6387
2011-01-10 15:45:42 +00:00
Arjen Poutsma 746167be6f SPR-7869 - Accept-Charset header with '*' results in java.nio.charset.IllegalCharsetNameException
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@3897 50f2f4bb-b051-0410-bef5-90022cba6387
2011-01-10 11:24:48 +00:00
Chris Beams 5a7d2a91ba Introduce ApplicationContextInitializer interface
Designed primarily for use in conjunction with web applications
to provide a convenient mechanism for configuring the container
programmatically.

ApplicationContextInitializer implementations are specified through the
new "contextInitializerClasses" servlet context parameter, then detected
and invoked by ContextLoader in its customizeContext() method.

In any case, the semantics of ApplicationContextInitializer's
initialize(ConfigurableApplicationContext) method require that
invocation occur *prior* to refreshing the application context.

ACI implementations may also implement Ordered/PriorityOrdered and
ContextLoader will sort instances appropriately prior to invocation.

Specifically, this new support provides a straightforward way to
programmatically access the container's Environment for the purpose
of adding, removing or otherwise manipulating PropertySource objects.

See Javadoc for further details.

Also note that ApplicationContextInitializer semantics overlap to
some degree with Servlet 3.0's notion of ServletContainerInitializer
classes. As Spring 3.1 development progresses, we'll likely see
these two come together and further influence one another.

git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@3882 50f2f4bb-b051-0410-bef5-90022cba6387
2011-01-07 09:57:57 +00:00
Chris Beams 1f8637d944 Introduce and integrate JndiPropertySource
DefaultWebEnvironment automatically adds a JndiPropertySource if
a "jndiPropertySourceEnabled" property is detected in any of the
other other default property sources.

git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@3869 50f2f4bb-b051-0410-bef5-90022cba6387
2011-01-06 07:43:29 +00:00
Chris Beams 0821b2c6c2 Polish (Mutable)PropertySources
* PropertySources is now an Iterable<PropertySource> in favor of
  exposing an asList() method
* Otherwise reduced the set of methods exposed by PropertySources to the
  absolute minimum
* Added Javadoc for both types and all methods

git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@3865 50f2f4bb-b051-0410-bef5-90022cba6387
2011-01-05 22:25:24 +00:00
Chris Beams 835a3f8d64 Refactor Environment and PropertySource
* Environment now extends PropertyResolver
* Environment no longer exposes resolver and sources
* PropertySource is String,Object instead of String,String
* PropertySource no longer assumes enumerability of property names
* Introduced EnumerablePropertySource for those that do have enumerable property names

git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@3862 50f2f4bb-b051-0410-bef5-90022cba6387
2011-01-05 22:24:14 +00:00
Arjen Poutsma dfb8b267ca SPR-7845 - FormHttpMessageConverter.read() always ignores post data when processing request (from Tomcat)
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@3845 50f2f4bb-b051-0410-bef5-90022cba6387
2011-01-04 11:25:30 +00:00
Arjen Poutsma 5f6c1145df SPR-7834 - HttpHeaders.getEtag() mangles the value
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@3843 50f2f4bb-b051-0410-bef5-90022cba6387
2011-01-03 15:51:23 +00:00
Arjen Poutsma cac2354a85 SPR-7845 - FormHttpMessageConverter.read() always ignores post data when processing request (from Tomcat)
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@3842 50f2f4bb-b051-0410-bef5-90022cba6387
2011-01-03 14:48:34 +00:00
Arjen Poutsma 241e8f12e0 SPR-7845 - FormHttpMessageConverter.read() always ignores post data when processing request (from Tomcat)
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@3841 50f2f4bb-b051-0410-bef5-90022cba6387
2011-01-03 14:38:28 +00:00
Chris Beams d00b49dca5 Introduce "Aware" superinterface
All existing *Aware interfaces have been refactored to extend this
new marker interface, serving two purposes:

    * Easy access to a type hierarchy that can answer the question
      "What *Aware interfaces are available?", without requiring
      text-based searches. Also clearly excludes false positives like
      TargetClassAware and ParamAware, which while similarly named,
      are not semantically similar to traditional *Aware interfaces
      in Spring.

    * Minor potential performance improvements in
      AbstractAutowireCapableBeanFactory and
      ApplicationContextAwareProcessor. Both have blocks of sequential
      instanceof checks in order to invoke any *Aware interface callback
      methods. For a bean that implements none of these interfaces,
      the whole sequence can be avoided by guarding first with
          if (bean instanceof Aware) {
              ...
          }

Implementors of custom *Aware-style interfaces (and presumably
the BeanPostProcessors that handle them), are encouraged to refactor to
extending this interface for consistency with the framework as well as
the points above.

git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@3840 50f2f4bb-b051-0410-bef5-90022cba6387
2011-01-03 10:13:57 +00:00
Chris Beams 1ac7b56caf M1 cut of environment, profiles and property work (SPR-7508)
Decomposed Environment interface into PropertySources, PropertyResolver
objects

    Environment interface and implementations are still present, but
    simpler.

    PropertySources container aggregates PropertySource objects;
    PropertyResolver provides search, conversion, placeholder
    replacement. Single implementation for now is
    PropertySourcesPlaceholderResolver

Renamed EnvironmentAwarePropertyPlaceholderConfigurer to
PropertySourcesPlaceholderConfigurer

    <context:property-placeholder/> now registers PSPC by default, else
    PPC if systemPropertiesMode* settings are involved

Refined configuration and behavior of default profiles

    See Environment interface Javadoc for details

Added Portlet implementations of relevant interfaces:

    * DefaultPortletEnvironment
    * PortletConfigPropertySource, PortletContextPropertySource
    * Integrated each appropriately throughout Portlet app contexts

Added protected 'createEnvironment()' method to AbstractApplicationContext

    Subclasses can override at will to supply a custom Environment
    implementation.  In practice throughout the framework, this is how
    Web- and Portlet-related ApplicationContexts override use of the
    DefaultEnvironment and swap in DefaultWebEnvironment or
    DefaultPortletEnvironment as appropriate.

Introduced "stub-and-replace" behavior for Servlet- and Portlet-based
PropertySource implementations

    Allows for early registration and ordering of the stub, then
    replacement with actual backing object at refresh() time.

    Added AbstractApplicationContext.initPropertySources() method to
    support stub-and-replace behavior. Called from within existing
    prepareRefresh() method so as to avoid impact with
    ApplicationContext implementations that copy and modify AAC's
    refresh() method (e.g.: Spring DM).

    Added methods to WebApplicationContextUtils and
    PortletApplicationContextUtils to support stub-and-replace behavior

Added comprehensive Javadoc for all new or modified types and members

Added XSD documentation for all new or modified elements and attributes

    Including nested <beans>, <beans profile="..."/>, and changes for
    certain attributes type from xsd:IDREF to xsd:string

Improved fix for detecting non-file based Resources in
PropertiesLoaderSupport (SPR-7547, SPR-7552)

    Technically unrelated to environment work, but grouped in with
    this changeset for convenience.

Deprecated (removed) context:property-placeholder
'system-properties-mode' attribute from spring-context-3.1.xsd

    Functionality is preserved for those using schemas up to and including
    spring-context-3.0.  For 3.1, system-properties-mode is no longer
    supported as it conflicts with the idea of managing a set of property
    sources within the context's Environment object. See Javadoc in
    PropertyPlaceholderConfigurer, AbstractPropertyPlaceholderConfigurer
    and PropertySourcesPlaceholderConfigurer for details.

Introduced CollectionUtils.toArray(Enumeration<E>, A[])

Work items remaining for 3.1 M2:

    Consider repackaging PropertySource* types; eliminate internal use
    of SystemPropertyUtils and deprecate

    Further work on composition of Environment interface; consider
    repurposing existing PlaceholderResolver interface to obviate need
    for resolve[Required]Placeholder() methods currently in Environment.

    Ensure configurability of placeholder prefix, suffix, and value
    separator when working against an AbstractPropertyResolver

    Add JNDI-based Environment / PropertySource implementatinos

    Consider support for @Profile at the @Bean level

    Provide consistent logging for the entire property resolution
    lifecycle; consider issuing all such messages against a dedicated
    logger with a single category.

    Add reference documentation to cover the featureset.

git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@3839 50f2f4bb-b051-0410-bef5-90022cba6387
2011-01-03 09:04:34 +00:00
Sam Brannen 924b8e11ea [SPR-7850][SPR-7851] Upgraded to JUnit 4.8.1 and TestNG 5.12.1; added changelog entries for 3.1.0.M1.
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@3838 50f2f4bb-b051-0410-bef5-90022cba6387
2010-12-30 08:00:58 +00:00
Chris Beams 7ac69dff5f Normalize indentation of Apache license URL
In accordance with recommendations at
http://www.apache.org/licenses/LICENSE-2.0.html.

A number of classes had strayed from this format, now all
are the same.

git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@3831 50f2f4bb-b051-0410-bef5-90022cba6387
2010-12-22 21:40:19 +00:00
Arjen Poutsma a32894ca31 Removed JDK 1.6 usage
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@3830 50f2f4bb-b051-0410-bef5-90022cba6387
2010-12-22 10:23:34 +00:00
Arjen Poutsma a3583fd5c4 SPR-7789 - FormHttpMessageConverter does not honor the charset in the content type when writing a form and uses a wrong default charset
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@3826 50f2f4bb-b051-0410-bef5-90022cba6387
2010-12-20 16:56:14 +00:00
Arjen Poutsma bc235c5b03 SPR-7789 - FormHttpMessageConverter does not honor the charset in the content type when writing a form and uses a wrong default charset
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@3825 50f2f4bb-b051-0410-bef5-90022cba6387
2010-12-20 16:50:44 +00:00
Arjen Poutsma cbdec821c4 SPR-7706 - 304 responses should not have non-0 Content-Length
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@3824 50f2f4bb-b051-0410-bef5-90022cba6387
2010-12-20 16:32:58 +00:00
David Syer 22f501457e Add missing ROME dep
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@3795 50f2f4bb-b051-0410-bef5-90022cba6387
2010-11-15 16:49:17 +00:00