Commit Graph

453 Commits

Author SHA1 Message Date
Chris Beams c3675b44b4 Polish WebApplicationInitializer Javadoc 2011-05-31 06:42:36 +00:00
Chris Beams 847b54f3b1 Sort WebApplicationInitializers properly
Issue: SPR-7672
2011-05-31 01:12:34 +00:00
Chris Beams 948aa4f589 Introduce DelegatingFilterProxy constructors
Issue: SPR-7672
2011-05-30 12:57:19 +00:00
Chris Beams 1e1a05e9f8 Polish DelegatingFilterProxy Javadoc 2011-05-30 12:56:32 +00:00
Chris Beams e36b5e9b7e Introduce ContextLoader(Listener) constructors
Constructors have been added to both ContextLoader and
ContextLoaderListener to support instance-based programmatic
registration of listeners within ServletContainerInitializer
implementations in Servlet 3.0+ environments, and more particularly
when using Spring 3.1's WebApplicationInitializer SPI.

Issue: SPR-7672
2011-05-30 12:56:01 +00:00
Chris Beams 2b4328023e Improve ApplicationContextInitializer sorting
ContextLoader and FrameworkServlet now use
AnnotationAwareOrderComparator to support @Order usage; previously
supported only implementation of the Ordered interface.
2011-05-30 12:55:33 +00:00
Chris Beams fb9fb00c04 Update GenericWAC to implement ConfigurableWAC
GenericWebApplicationContext now implements
ConfigurableWebApplicationContext in order to be compatible with
Framework/DispatcherServlet and ContextLoader/Listener, especially with
regard to changes in SPR-7672 that allow for programmatic use of these
types within Servlet 3.0+ environments.  For the first time, it's now
reasonable to imagine injecting a GWAC into DispatcherServlet; the most
robust way to accommodate this possibility is for GWAC to implement
CWAC.

The implementation is in name only, allowing for interchangable use of
GWAC anywhere, for example, an XWAC could otherwise go.  Methods such
as setConfigLocation will throw UnsupportedOperationException if the
configLocation value actually contains text.  Other methods are
implemented as no-ops or to throw UOE as appropriate.

Issue: SPR-7672
2011-05-30 12:53:57 +00:00
Chris Beams c9e67b2ef2 Introduce Servlet 3.0 WebApplicationInitializer
WebApplicationInitializer provides a programmatic alternative to the
traditional WEB-INF/web.xml servlet container deployment descriptor
for Servlet API 3.0+ environments.

This is done by building atop the new ServletContainerInitializer
support in Servlet 3.0. See SpringServletContainerInitializer for
complete details. And see WebApplicationInitializer Javadoc for
typical usage examples.

Issue: SPR-7672
2011-05-30 12:53:32 +00:00
Juergen Hoeller c303b22e30 updated IntelliJ dependency descriptors 2011-05-29 20:43:52 +00:00
Juergen Hoeller af8aff3e49 added StandardServletMultipartResolver for Servlet 3.0 2011-05-29 20:38:23 +00:00
Chris Beams 367a0c2933 Upgrade javax.servlet dependency to 3.0 for .web
In support of SPR-7672 which will support code-based configuration
alternatives to web.xml using new features in the Servlet 3.0 API.

This upgrade does *not* force Spring users to upgrade to Servlet 3.0
capable containers.  Compatibility with and support for
javax.servlet >= 2.4 remains.

Issue: SPR-7672
2011-05-26 13:34:21 +00:00
Chris Beams 0756a6abfe Polish PropertySource and Environment Javadoc 2011-05-25 10:52:03 +00:00
Chris Beams c696e195fa Introduce AnnotationConfigCapableApplicationContext
AnnotationConfigApplicationContext and
AnnotationConfigWebApplicationContext both expose #register and #scan
methods as of the completion of SPR-8320. This change introduces a new
interface that declares each of these methods and refactors ACAC and
ACWAC to implement it.

Beyond information value, this is useful for implementors of the
ApplicationContextInitializer interface, in that users may create an ACI
that works consistently across ACAC and ACWAC for standalone (e.g.
testing, batch) or web (e.g. production) use.

Issue: SPR-8365,SPR-8320
2011-05-23 10:03:23 +00:00
Chris Beams e128ee2464 Introduce AnnotationConfigWAC #scan and #register
Primarily for use in conjunction with ApplicationContextInitializer,
these new #scan and #register methods mirror those in
AnnotationConfigApplicationContext. #setConfigLocation
and #setConfigLocations methods remain for compatibility with
ContextLoader-style initialization, but have been locally overridden
and documented clearly.

AnnotationConfigWebApplicationContext#loadBeanDefinitions Javadoc has
also been updated to explain the processing logic for each of these
potential inputs.

Issue: SPR-8320
2011-05-23 10:02:50 +00:00
Chris Beams c481d2e9fb Rename {Default=>Standard}PortletEnvironment
Issue: SPR-8348
2011-05-20 03:57:35 +00:00
Chris Beams f893b62a9b Rename {DefaultWeb=>StandardServlet}Environment
Issue: SPR-8348
2011-05-20 03:55:56 +00:00
Chris Beams c06752ef72 Rename {Default=>Standard}Environment
Issue: SPR-8348
2011-05-20 03:53:37 +00:00
Chris Beams 7271ba8182 Introduce AbstractEnvironment#customizePropertySources
This new hook in the AbstractEnvironment lifecycle allows for more
explicit and predictable customization of property sources by
subclasses.  See Javadoc and existing implementations for detail.

Issue: SPR-8354
2011-05-20 03:50:14 +00:00
Arjen Poutsma 1eaca65720 @RequestMapping.consumes() and produces() now default to an empty array, instead of */* 2011-05-18 11:34:47 +00:00
Arjen Poutsma a618bcc8cd Exposing HttpServletRequest/Response in ServletServerHttpRequest/Response 2011-05-18 11:24:57 +00:00
Arjen Poutsma ad2e0d4587 SPR-7353 - @ResponseBody and returned HttpEntity now respect @RequestMapping.produces() 2011-05-17 09:45:57 +00:00
Arjen Poutsma bb2cc8457f SPR-7353 - Added equivalent of JAX-RS @Produces to Spring MVC 2011-05-13 09:43:45 +00:00
Arjen Poutsma 8190b4f70a Javadoc 2011-05-12 09:00:39 +00:00
Arjen Poutsma 71aae405d5 SPR-7354 - Added equivalent of JAX-RS @Consumes to Spring MVC 2011-05-10 09:23:00 +00:00
Arjen Poutsma b058d1e07a Made comparators public, as they are needed elsewhere. 2011-05-09 11:20:49 +00:00
Chris Beams 2092a31f9d Rename DataBinderFactory subtypes for concision 2011-05-06 19:12:14 +00:00
Rossen Stoyanchev 50117dce40 SPR-6909 Include URI template vars in data binding 2011-04-26 11:54:54 +00:00
Rossen Stoyanchev ed9d9a402b SPR-7543 Add @PathVariables to the model 2011-04-21 15:18:45 +00:00
Arjen Poutsma a4716c2a94 Buffering RequestFactory that allows for multiple response body reads. 2011-04-21 15:09:44 +00:00
Rossen Stoyanchev 945cf43e2d Remove consumes from @RequestMapping 2011-04-21 14:54:55 +00:00
Arjen Poutsma ab654a7a06 added toString to HttpEntity 2011-04-21 11:39:20 +00:00
Rossen Stoyanchev 9c65973b33 SPR-8214 review unit tests 2011-04-15 18:42:58 +00:00
Rossen Stoyanchev aa065e8310 SPR-8214 Javadoc and polish 2011-04-13 23:15:19 +00:00
Sam Brannen 62d40dc7aa Added Apache Commons HTTP JARs to the Eclipse classpath. 2011-04-12 21:58:38 +00:00
Micha Kiener f812cd748e SPR-6416, initial commit for the conversation management 2011-04-12 13:21:18 +00:00
Arjen Poutsma 3690002dce SPR-6180 - Upgrade Apache HttpClient to version 4.0 2011-04-12 07:55:38 +00:00
Arjen Poutsma 54bbcf3a42 SPR-6180 - Upgrade Apache HttpClient to version 4.0 2011-04-11 13:12:45 +00:00
Arjen Poutsma bf6693dbc5 SPR-7354 - Added equivalent of JAX-RS @Consumes to Spring MVC 2011-04-08 09:26:17 +00:00
Rossen Stoyanchev 6fe0ff9e7b ModelAndViewContainer related refinements 2011-04-07 18:09:28 +00:00
Rossen Stoyanchev 4c1f73ed83 SPR-8217 update MVC namespace to use HandlerMethod infrastructure 2011-04-06 20:28:47 +00:00
Rossen Stoyanchev ffec444434 Configurable arg resolvers and return value handlers 2011-04-06 16:55:21 +00:00
Rossen Stoyanchev ca9a3b4584 Replace ModelAndViewContainer parameter with Object 2011-04-06 15:30:19 +00:00
Rossen Stoyanchev acc75aa4b8 SPR-8215 Move HandlerMethod code into trunk 2011-04-06 11:30:59 +00:00
Arjen Poutsma 0f7d43ba90 Allow for customization of the media type for forms. 2011-04-05 09:48:09 +00:00
Sam Brannen d6be4c5a2a [SPR-8090] Fixed broken tests in Log4jWebConfigurerTests. 2011-03-28 17:20:40 +00:00
Arjen Poutsma bc342df08f @MVC 2.0: AbstractAnnotationMAR -> AbstractNamedValueMAR 2011-02-25 11:05:14 +00:00
Juergen Hoeller 03190950d1 polishing 2011-02-10 22:19:10 +00:00
Chris Beams 2f7c2230f0 Include license.txt and notice.txt in module JARs 2011-02-09 06:56:40 +00:00
Chris Beams b4fea47d5c 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
2011-02-08 14:42:33 +00:00
Arjen Poutsma c4a954a618 SPR-7494 - Introduce interceptors for RestTemplate 2011-01-28 14:24:52 +00:00