Commit Graph

273 Commits

Author SHA1 Message Date
Keith Donald 01c98c3bfb added initial support for handling unknown nested type values when converting collections; now favor factory method for constructing nested type descriptors for clarity (made constructor private); improved javadoc 2011-01-06 05:14:49 +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
Keith Donald 818bd841fe method naming improvements; applyIndexObject call for array indexing 2011-01-05 16:54:03 +00:00
Keith Donald 39e0c29d19 TypeDescriptor cleanup and general polishing; fixed a number of bugs related to TypeDescriptor usage in client code across beans and spel packages 2011-01-05 05:49:33 +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
Sam Brannen b130a36af7 [SPR-7850][SPR-7851] Upgraded to JUnit 4.8.1 and TestNG 5.12.1; added changelog entries for 3.1.0.M1. 2010-12-30 08:00:58 +00:00
Chris Beams 9f5fd3afcf 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.
2010-12-22 21:40:19 +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 a0fead1880 revised TypedValue toString representation (SPR-7569) 2010-10-10 21:29:18 +00:00
Juergen Hoeller 1cd77e2a15 polishing 2010-10-10 20:11:53 +00:00
Juergen Hoeller 5be9473136 initialize cache Maps early, turning them into final fields 2010-10-10 20:11:44 +00:00
Juergen Hoeller 7553b76f15 SpEL method invocations prefer method with fewest parameters (e.g. no-arg over vararg; SPR-7633) 2010-10-10 19:23:01 +00:00
Juergen Hoeller c33df5977a pass full TypeDescriptor context through to ConversionService calls (SPR-7519) 2010-09-08 17:26:02 +00:00
Juergen Hoeller 055c343ce0 SpEL supports projection on any kind of Collection (SPR-7493) 2010-09-01 21:55:39 +00:00
Ben Hale 7730e76c06 Publishing license and notice files 2010-08-23 13:17:31 +00:00
Arjen Poutsma dbfa049e1e Prepping for 3.0.5 2010-08-19 11:04:04 +00:00
Juergen Hoeller 61fcef1471 polishing 2010-08-12 18:42:13 +00:00
Juergen Hoeller 58b07f586d SpEL passes full collection type context to ConversionService (SPR-7410) 2010-08-07 17:54:23 +00:00
Juergen Hoeller 263fabb0fc JSP EvalTag resolves "@myBeanName" references in expressions against the WebApplicationContext (SPR-7312); for consistency, expressions in an ApplicationContext support the same syntax against the local BeanFactory 2010-07-12 19:36:26 +00:00
Andy Clement f5ced9be38 SPR-7335: support for expression inline lists and array construction 2010-07-06 21:00:54 +00:00
Andy Clement 88560fd910 SPR-7343: StandardEvaluationContext not threadsafe in its lazy initialization 2010-07-02 16:08:25 +00:00
Andy Clement 6de707d8e0 polish 2010-07-02 16:07:13 +00:00
Andy Clement 0c1424acb6 polish 2010-07-02 16:06:59 +00:00
Sam Brannen db7531be60 [SPR-7323] SpEL 'select last' operator now works consistently with maps. 2010-06-26 21:10:20 +00:00
Juergen Hoeller 9e4140e549 growCollection fails for element type Object as well; prefer use of getElementTypeDescriptor() 2010-06-23 21:00:28 +00:00
Andy Clement 569cb91573 javadoc fix 2010-06-21 22:13:49 +00:00
Arjen Poutsma b31c34ed7d Upgrading version to 3.0.4 2010-06-15 14:18:29 +00:00
Juergen Hoeller 7b189d1124 avoid ConverterNotFoundException if source object is assignable to target type 2010-06-15 09:35:39 +00:00
Juergen Hoeller 902938e95f smarter guessing of the element type (SPR-7283) 2010-06-14 22:58:18 +00:00
Andy Clement 5801af9ef5 SPR-7244: double indexing with a collection of different types of element 2010-05-28 20:31:16 +00:00
Andy Clement 101d8381ef SPR-7209: parsing poorly formed Elvis expressions 2010-05-18 18:44:40 +00:00
Andy Clement 2b0655b459 SPR-6941 2010-05-06 00:26:13 +00:00
Andy Clement f53621a86f SPR-7173, SPR-7100 2010-05-05 23:52:01 +00:00
Keith Donald 64d6a42dfd improved conversion system logging, collection converter simplification/polish, several optimizations, annotation-driven formatting caching 2010-04-17 04:43:28 +00:00
Andy Clement bf1a95c771 SPR-7100: '_' supported as first char of identifier 2010-04-16 21:10:23 +00:00
David Syer eb7f8309e2 Update version in POMs to 3.0.3 2010-04-15 10:26:14 +00:00
Juergen Hoeller 52179d8bfb fixed TemplateParserContext documentation (SPR-7059) 2010-04-01 10:59:58 +00:00
Juergen Hoeller 65b0a8fcb2 revised BeanTypeDescriptor into core PropertyTypeDescriptor; consider method annotations for return type (SPR-6979) 2010-03-24 16:27:33 +00:00
Andy Clement d932c043da SPR-6984: auto grow collections on write through indexer 2010-03-15 18:15:48 +00:00
Juergen Hoeller 0cb7e4dcb3 made getName() public; added isNullSafe() accessor (SPR-6980) 2010-03-14 22:19:56 +00:00
Andy Clement 81b10be1d0 SPR-6968: indexing via square brackets can now treat the index as an attempt at property access 2010-03-11 01:09:50 +00:00
Andy Clement 2dd1134303 SPR-6941: part (1) correct exception handling when null cachedExecutor 2010-03-09 17:33:36 +00:00
Andy Clement c31213e5cb SPR-6866: unhelpful NPE when expression badly formed 2010-03-09 00:55:03 +00:00
David Syer 1a351db6e0 Update Central POMs to 3.0.2 2010-02-21 15:32:18 +00:00
Costin Leau 8d0bb00188 + make use or property placeholders inside template.mf 2010-02-19 09:43:22 +00:00
Andy Clement 117b138233 SPR-6745: metadata (annotations) attached to property accessors allowing formatting of values during conversion 2010-02-12 01:50:52 +00:00
Costin Leau 0fd4a45070 + upgrade to AspectJ 1.6.8
+ externalize some of the jar versions
+ align the versions of some dependencies between pom.xml and ivy.xml
2010-02-04 11:46:21 +00:00
Andy Clement 5ca1f11ce2 SPR-6763: more methods on StandardEvaluationContext supporting add/remove from resolver/accessor strategies 2010-02-02 21:38:33 +00:00
Andy Clement 66f708392e SPR-6764: filtering strategy for SpEL method invocation 2010-02-02 19:38:44 +00:00
Andy Clement 644f3065b6 SPR-6610: don't wrap runtime exceptions thrown from methods invoked via an expression 2010-02-01 20:13:08 +00:00