Commit Graph

93 Commits

Author SHA1 Message Date
Chris Beams 2f7c2230f0 Include license.txt and notice.txt in module JARs 2011-02-09 06:56:40 +00:00
Juergen Hoeller b3f039ae5f Servlet/PortletRequestDataBinder perform unwrapping for MultipartRequest as well (SPR-7795) 2011-01-26 20:09:42 +00:00
Chris Beams 2b99cf6d29 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
2011-01-05 22:24:14 +00:00
Chris Beams 5e6912302a 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.
2011-01-03 10:13:57 +00:00
Chris Beams b3ff9be78f 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.
2011-01-03 09:04:34 +00:00
Costin Leau 01e79cfedd SPR-7703
- minor performance improvements to servlet and portlet handlers
2010-10-31 17:46:15 +00:00
Arjen Poutsma 7cc3f49910 SPR-7695 - Add ETag version of WebRequest.checkNotModified() 2010-10-29 10:28:47 +00:00
Chris Beams f480333d31 Merge 3.1.0 development branch into trunk
Branch in question is 'env' branch from git://git.springsource.org/sandbox/cbeams.git; merged into
git-svn repository with:

    git merge -s recursive -Xtheirs --no-commit env

No merge conflicts, but did need to

    git rm spring-build

prior to committing.

With this change, Spring 3.1.0 development is now happening on SVN
trunk. Further commits to the 3.0.x line will happen in an as-yet
uncreated SVN branch.  3.1.0 snapshots will be available
per the usual nightly CI build from trunk.
2010-10-25 19:48:20 +00:00
Juergen Hoeller 40fa8afce4 DispatcherPortlet's default resource serving explicitly prevents access to WEB-INF and META-INF (SPR-7540) 2010-10-02 00:03:09 +00:00
Juergen Hoeller 668207d59d fixed Portlet UnavailableException tests (SPR-7542) 2010-09-29 13:45:50 +00:00
Juergen Hoeller 803b336354 fixed Portlet UnavailableException tests (SPR-7542) 2010-09-29 13:31:53 +00:00
Juergen Hoeller bf90a2ddb6 DispatcherPortlet throws custom NoHandlerFoundException instead of misleading UnavailableException (SPR-7542) 2010-09-14 06:43:53 +00:00
Juergen Hoeller 88e0dcfa06 added MockMultipartFile to web-portlet module 2010-09-06 23:22:03 +00:00
Juergen Hoeller bd05b046d0 reverted shortening of action exception parameter value; fixed multipart test (SPR-7495) 2010-09-06 23:11:11 +00:00
Juergen Hoeller 7e5215b5d4 fixed typo 2010-09-06 22:56:18 +00:00
Juergen Hoeller ba946c08dd copy event parameters to render parameters in case of an action exception as well (SPR-7495) 2010-09-06 22:56:05 +00:00
Juergen Hoeller 3eda5144ae DispatcherPortlet copies all action parameters to render parameters in case of an action exception (SPR-7495); shortened Portlet MVC's action exception render parameter value to "true" 2010-09-06 22:45:31 +00:00
Juergen Hoeller e68f2f0a5f removed unused HandlerExecutionChain caching 2010-09-06 21:44:06 +00:00
Juergen Hoeller 45d9b0cb2d allow for writing the response directly in a Portlet @ExceptionHandler method (like in the Servlet equivalent) 2010-09-06 21:43:26 +00:00
Juergen Hoeller 66b4499973 polishing 2010-09-06 21:20:03 +00:00
Juergen Hoeller e035477e6a extended synchronization for methodResolverCache (SPR-7525) 2010-09-06 20:41:50 +00:00
Juergen Hoeller d1afb29074 Servlet/PortletContextResource inherit isReadable, contentLength and lastModified from AbstractFileResolvingResource 2010-08-15 22:57:37 +00:00
Juergen Hoeller b2b1ff60dd CommonsMultipartResolver cleans up all multipart files in case of multiple files for same name as well (SPR-2784) 2010-08-15 22:52:54 +00:00
Juergen Hoeller 255d1ad434 WebDataBinder and @MVC request param binding detect and introspect MultipartFile arrays as well (SPR-2784) 2010-08-15 22:51:02 +00:00
Juergen Hoeller 1841b14b21 consistent mocks between modules 2010-08-15 22:02:40 +00:00
Juergen Hoeller fd159246ed polishing 2010-08-15 21:26:43 +00:00
Juergen Hoeller 35971f9f90 revised handler method resolution, in particular with respect to generic interfaces (SPR-7355) 2010-08-15 21:12:54 +00:00
Juergen Hoeller 4af36454ba PortletWrappingController supports Portlet 2.0 resource and event requests as well (SPR-7430) 2010-08-07 11:47:32 +00:00
Juergen Hoeller 753cda3d81 Portlet AbstractController consistently uses session mutex if "synchronizeOnSession" is active 2010-08-07 11:46:15 +00:00
Juergen Hoeller 7e9e8401f7 @ExceptionHandler works for inherited method and CGLIB proxies on Portlet controllers as well (SPR-7337) 2010-07-08 11:45:35 +00:00
Juergen Hoeller 5d6937bab1 Portlet @MVC's implicit render model will be updated at the end of the event phase 2010-06-23 17:24:28 +00:00
Juergen Hoeller 037c277351 @MVC handler methods reliably resolve MultipartRequest arguments with HiddenHttpMethodFilter (SPR-7296) 2010-06-20 18:45:42 +00:00
Juergen Hoeller 2f4453a99c revised Portlet SessionStatus.setComplete() to avoid re-exposure of attributes in render phase (SPR-6126); shortened implicit model render parameter name to "implicitModel" (SPR-7149) 2010-06-09 20:09:53 +00:00
Juergen Hoeller 33252495cf fixed @ExceptionHandler resolution in case of multiple matches at different inheritance levels (SPR-7085) 2010-04-18 18:48:24 +00:00
Juergen Hoeller 65e88449aa DispatcherPortlet passes handler instance into HandlerExceptionResolver for action exception; DispatcherPortlet applies preHandleRender callbacks in case of action exception as well (SPR-6959) 2010-03-30 21:17:31 +00:00
Juergen Hoeller 20de98362a use simple type name in "missing parameter" exception text 2010-03-30 21:13:12 +00:00
Juergen Hoeller ea7ff5241d polishing 2010-03-30 21:12:40 +00:00
Juergen Hoeller 2c9753ad25 NativeWebRequest detects native MultipartRequest even when decorated (SPR-6594) 2010-03-30 10:24:39 +00:00
Juergen Hoeller 0a6f2348b8 WebRequest is a resolvable dependency in Servlet/Portlet web application contexts (SPR-6727) 2010-01-20 22:09:13 +00:00
Juergen Hoeller b5b1962530 removed MultipartRequest mixin interface again (avoiding a package dependency cycle) 2009-12-15 00:51:32 +00:00
Juergen Hoeller 1e1964a060 reintroduced createBinder template method in Servlet/Portlet AnnotationMethodHandlerAdapter (SPR-6534) 2009-12-09 22:29:43 +00:00
Juergen Hoeller f72769a621 added order property to AnnotationMethodHandlerAdapter (SPR-6516) 2009-12-07 09:42:44 +00:00
Arjen Poutsma 541aae12ef SPR-5802 - NullPointerException when using @CookieValue annotation 2009-11-30 10:16:14 +00:00
Juergen Hoeller 46cd083976 added chaining-capable "add" method to MutablePropertyValues 2009-11-19 22:30:35 +00:00
Chris Beams 20ec13ded5 SPR-5529: removed package.html files 2009-11-06 23:15:35 +00:00
Chris Beams ca0b590bb9 SPR-5523: converted a few additional package.html artifacts to package-info.java 2009-11-06 23:13:15 +00:00
Arjen Poutsma 8de34c6fa7 SPR-6301 - Support @RequestHeader on HttpHeaders parameters 2009-11-05 15:42:24 +00:00
Juergen Hoeller 8a09c8e7da reworked ConfigurationClass(Web)ApplicationContext into AnnotationConfig(Web)ApplicationContext; revised BeansException signatures 2009-10-23 17:46:16 +00:00
Juergen Hoeller ee8ed4e410 fixed getBean signature ambiguity in tests 2009-10-20 20:14:49 +00:00
Juergen Hoeller a429e230b6 revised version checks and exception signatures 2009-10-20 16:53:24 +00:00