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
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
Juergen Hoeller
37957aee1e
revised TypedValue toString representation (SPR-7569)
...
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@3733 50f2f4bb-b051-0410-bef5-90022cba6387
2010-10-10 21:29:18 +00:00
Juergen Hoeller
e531a28d3b
polishing
...
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@3728 50f2f4bb-b051-0410-bef5-90022cba6387
2010-10-10 20:11:53 +00:00
Juergen Hoeller
502d2b0779
initialize cache Maps early, turning them into final fields
...
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@3727 50f2f4bb-b051-0410-bef5-90022cba6387
2010-10-10 20:11:44 +00:00
Juergen Hoeller
8c9f96584e
SpEL method invocations prefer method with fewest parameters (e.g. no-arg over vararg; SPR-7633)
...
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@3726 50f2f4bb-b051-0410-bef5-90022cba6387
2010-10-10 19:23:01 +00:00
Juergen Hoeller
73480a5431
pass full TypeDescriptor context through to ConversionService calls (SPR-7519)
...
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@3661 50f2f4bb-b051-0410-bef5-90022cba6387
2010-09-08 17:26:02 +00:00
Juergen Hoeller
118b0b0b80
SpEL supports projection on any kind of Collection (SPR-7493)
...
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@3630 50f2f4bb-b051-0410-bef5-90022cba6387
2010-09-01 21:55:39 +00:00
Juergen Hoeller
892d44f8c0
polishing
...
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@3569 50f2f4bb-b051-0410-bef5-90022cba6387
2010-08-12 18:42:13 +00:00
Juergen Hoeller
425b471694
SpEL passes full collection type context to ConversionService (SPR-7410)
...
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@3542 50f2f4bb-b051-0410-bef5-90022cba6387
2010-08-07 17:54:23 +00:00
Juergen Hoeller
6b55137d3e
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
...
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@3479 50f2f4bb-b051-0410-bef5-90022cba6387
2010-07-12 19:36:26 +00:00
Andy Clement
3f09b6a313
SPR-7335: support for expression inline lists and array construction
...
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@3473 50f2f4bb-b051-0410-bef5-90022cba6387
2010-07-06 21:00:54 +00:00
Andy Clement
8d0e8fe165
SPR-7343: StandardEvaluationContext not threadsafe in its lazy initialization
...
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@3472 50f2f4bb-b051-0410-bef5-90022cba6387
2010-07-02 16:08:25 +00:00
Andy Clement
bef5616753
polish
...
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@3471 50f2f4bb-b051-0410-bef5-90022cba6387
2010-07-02 16:07:13 +00:00
Andy Clement
748b6a4ec9
polish
...
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@3470 50f2f4bb-b051-0410-bef5-90022cba6387
2010-07-02 16:06:59 +00:00
Sam Brannen
0a6eb139c4
[SPR-7323] SpEL 'select last' operator now works consistently with maps.
...
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@3461 50f2f4bb-b051-0410-bef5-90022cba6387
2010-06-26 21:10:20 +00:00
Juergen Hoeller
54a35be552
growCollection fails for element type Object as well; prefer use of getElementTypeDescriptor()
...
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@3454 50f2f4bb-b051-0410-bef5-90022cba6387
2010-06-23 21:00:28 +00:00
Andy Clement
e7319ba5e5
javadoc fix
...
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@3439 50f2f4bb-b051-0410-bef5-90022cba6387
2010-06-21 22:13:49 +00:00
Juergen Hoeller
463cd8e0b0
avoid ConverterNotFoundException if source object is assignable to target type
...
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@3426 50f2f4bb-b051-0410-bef5-90022cba6387
2010-06-15 09:35:39 +00:00
Juergen Hoeller
ca716a9697
smarter guessing of the element type (SPR-7283)
...
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@3418 50f2f4bb-b051-0410-bef5-90022cba6387
2010-06-14 22:58:18 +00:00
Andy Clement
d8c51fdf7f
SPR-7244: double indexing with a collection of different types of element
...
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@3377 50f2f4bb-b051-0410-bef5-90022cba6387
2010-05-28 20:31:16 +00:00
Andy Clement
a276e7c21a
SPR-7209: parsing poorly formed Elvis expressions
...
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@3349 50f2f4bb-b051-0410-bef5-90022cba6387
2010-05-18 18:44:40 +00:00
Andy Clement
4e32e896ab
SPR-6941
...
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@3314 50f2f4bb-b051-0410-bef5-90022cba6387
2010-05-06 00:26:13 +00:00
Andy Clement
dedf6489ac
SPR-7173, SPR-7100
...
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@3313 50f2f4bb-b051-0410-bef5-90022cba6387
2010-05-05 23:52:01 +00:00
Keith Donald
eca3e5d0b8
improved conversion system logging, collection converter simplification/polish, several optimizations, annotation-driven formatting caching
...
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@3255 50f2f4bb-b051-0410-bef5-90022cba6387
2010-04-17 04:43:28 +00:00
Andy Clement
efc8a513d1
SPR-7100: '_' supported as first char of identifier
...
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@3254 50f2f4bb-b051-0410-bef5-90022cba6387
2010-04-16 21:10:23 +00:00
Juergen Hoeller
5d87fe71fa
fixed TemplateParserContext documentation (SPR-7059)
...
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@3216 50f2f4bb-b051-0410-bef5-90022cba6387
2010-04-01 10:59:58 +00:00
Juergen Hoeller
74705a7aea
revised BeanTypeDescriptor into core PropertyTypeDescriptor; consider method annotations for return type (SPR-6979)
...
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@3162 50f2f4bb-b051-0410-bef5-90022cba6387
2010-03-24 16:27:33 +00:00
Andy Clement
3b8b27e391
SPR-6984: auto grow collections on write through indexer
...
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@3109 50f2f4bb-b051-0410-bef5-90022cba6387
2010-03-15 18:15:48 +00:00
Juergen Hoeller
b4c7a7cd31
made getName() public; added isNullSafe() accessor (SPR-6980)
...
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@3108 50f2f4bb-b051-0410-bef5-90022cba6387
2010-03-14 22:19:56 +00:00
Andy Clement
0d3e60e5b7
SPR-6968: indexing via square brackets can now treat the index as an attempt at property access
...
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@3080 50f2f4bb-b051-0410-bef5-90022cba6387
2010-03-11 01:09:50 +00:00
Andy Clement
e996bd83ff
SPR-6941: part (1) correct exception handling when null cachedExecutor
...
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@3071 50f2f4bb-b051-0410-bef5-90022cba6387
2010-03-09 17:33:36 +00:00
Andy Clement
43ea572fd5
SPR-6866: unhelpful NPE when expression badly formed
...
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@3064 50f2f4bb-b051-0410-bef5-90022cba6387
2010-03-09 00:55:03 +00:00
Andy Clement
878f937f23
SPR-6745: metadata (annotations) attached to property accessors allowing formatting of values during conversion
...
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@2964 50f2f4bb-b051-0410-bef5-90022cba6387
2010-02-12 01:50:52 +00:00
Andy Clement
5024290980
SPR-6763: more methods on StandardEvaluationContext supporting add/remove from resolver/accessor strategies
...
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@2902 50f2f4bb-b051-0410-bef5-90022cba6387
2010-02-02 21:38:33 +00:00
Andy Clement
21cb4a0bfc
SPR-6764: filtering strategy for SpEL method invocation
...
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@2901 50f2f4bb-b051-0410-bef5-90022cba6387
2010-02-02 19:38:44 +00:00
Andy Clement
55f8409ea0
SPR-6610: don't wrap runtime exceptions thrown from methods invoked via an expression
...
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@2899 50f2f4bb-b051-0410-bef5-90022cba6387
2010-02-01 20:13:08 +00:00
Andy Clement
a8ee8c4cda
SPR-6760: method called twice if exits via exception in a 'normal' case
...
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@2897 50f2f4bb-b051-0410-bef5-90022cba6387
2010-02-01 19:53:34 +00:00
Juergen Hoeller
4989bb6379
TypedValue.NULL_TYPED_VALUE -> TypedValue.NULL
...
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@2684 50f2f4bb-b051-0410-bef5-90022cba6387
2009-12-15 20:19:24 +00:00
Keith Donald
b34a2ab777
TypeDescriptor.valueOf usage in favor of constants; TypedValue usage simplification
...
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@2681 50f2f4bb-b051-0410-bef5-90022cba6387
2009-12-15 19:41:52 +00:00
Juergen Hoeller
18336e3732
introduced TypeDescriptor.OBJECT and TypeDescriptor.STRING
...
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@2668 50f2f4bb-b051-0410-bef5-90022cba6387
2009-12-15 10:21:16 +00:00
Juergen Hoeller
cb9770c11b
rearranged spel subpackages in order to avoid package dependency cycle; introduced SpelParserConfiguration object to replace bit flags
...
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@2664 50f2f4bb-b051-0410-bef5-90022cba6387
2009-12-15 02:03:16 +00:00
Andy Clement
1eb653a1b8
SPR-6525: avoid need to use #root for method parameter references
...
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@2585 50f2f4bb-b051-0410-bef5-90022cba6387
2009-12-06 23:21:07 +00:00
Juergen Hoeller
2f2444ff13
polishing
...
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@2519 50f2f4bb-b051-0410-bef5-90022cba6387
2009-11-27 01:34:56 +00:00
Keith Donald
9d1daf3232
found hotspot; added ConverisonServiceFactoryBean
...
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@2473 50f2f4bb-b051-0410-bef5-90022cba6387
2009-11-20 14:43:12 +00:00
Keith Donald
6137e740f2
default conversion service instance caching and tests
...
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@2451 50f2f4bb-b051-0410-bef5-90022cba6387
2009-11-19 15:22:44 +00:00
Keith Donald
12b6feacac
moved generic converter to spi; added entity converter; removed various service impls in favor of service factory
...
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@2447 50f2f4bb-b051-0410-bef5-90022cba6387
2009-11-19 09:10:51 +00:00
Keith Donald
3729751a01
SPR-6278
...
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@2418 50f2f4bb-b051-0410-bef5-90022cba6387
2009-11-12 21:18:17 +00:00
Andy Clement
3e5b5b8172
change PlaceOfBirth toString() so round tripping from String > new PlaceOfBirth(String) > String works ok
...
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@2417 50f2f4bb-b051-0410-bef5-90022cba6387
2009-11-12 20:56:21 +00:00
Keith Donald
e9b484b20e
fixed failing tests due to generic object to object converter fallback being over eager
...
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@2383 50f2f4bb-b051-0410-bef5-90022cba6387
2009-11-12 06:57:51 +00:00