Commit Graph

66 Commits

Author SHA1 Message Date
Juergen Hoeller cd584afe93 removed ConversionService/TypeConverter convenience methods in order to restore 3.0's SPI (for backwards compatibility with implementers) 2011-02-10 01:24:08 +00:00
Chris Beams 9cc125531b Fix STS compatibility issues; other improvements
Revert changes to ParserContext, ReaderContext, and XmlReaderContext

    These changes cause cross-version incompatibilities at tooling time
    -- for instance, an STS version that ships with Spring 3.0.5
    classloads the ParserContext defined in that version, whereas it
    classloads NamespaceHandlers and BeanDefinitionParsers (by default)
    from the user application classpath, which may be building against
    3.1.0. If so, the changes introduced to these types in 3.1.0 are
    incompatible with expectations in the 3.0.5 world and cause all
    manner of problems.  In this case, it was NoSuchMethodError due to
    the newly-added XmlReaderContext.getProblemReporter() method; also
    IncompatibleClassChangeError due to the introduction of the
    ComponentRegistrar interface on ParserContext.

    Each of these problems have been mitigated, though the solutions
    are not ideal. The method mentioned has been removed, and instead
    the problemReporter field is now accessed reflectively.
    ParserContext now no longer implements ComponentRegistrar, and
    rather a ComponentRegistrarAdapter class has been introduced that
    passes method calls through to a ParserContext delegate.

Introduce AbstractSpecificationBeanDefinitionParser

    AbstractSpecificationBeanDefinitionParser has been introduced in
    order to improve the programming model for BeanDefinitionParsers
    that have been refactored to the new FeatureSpecification model.
    This new base class and it's template method implementation of
    parse/doParse ensure that common concerns like (1) adapting a
    ParserContext into a SpecificationContext, (2) setting source and
    source name on the specification, and (3) actually executing the
    specification are all managed by the base class.  The subclass
    implementation of doParse need only actually parse XML, populate
    and return the FeatureSpecification object.  This change removed
    the many duplicate 'createSpecificationContext' methods that had
    been lingering.

Minor improvement to BeanDefinitionReaderUtils API

    Introduced new BeanDefinitionReaderUtils#registerWithGeneratedName
    variant that accepts BeanDefinition as opposed to
    AbstractBeanDefinition, as BeanDefinition is all that is actually
    necessary to satisfy the needs of the method implementation. The
    latter variant accepting AbstractBeanDefinition has been deprecated
    but remains intact and delegates to the new variant in order to
    maintain binary compatibility.
2011-02-09 16:44:26 +00:00
Chris Beams 2f7c2230f0 Include license.txt and notice.txt in module JARs 2011-02-09 06:56:40 +00:00
Chris Beams 906b50ef51 Add FeatureMethodErrorTests
Capture common mistakes with @Feature method declarations and ensure
that useful error messages are produced.
2011-02-09 06:54:02 +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
Keith Donald 71e60f4551 Favor convertValue(Object, TypeDescriptor) where possible and TypedValue(Object); check with Andy on Selection and Projection TypedValue usage 2011-01-07 06:32:21 +00:00
Chris Beams bc41cb2f27 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
2011-01-05 22:25:24 +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 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 197a46d0ab Fix .integration-tests build path errors
Add .expression as a build path dependency to satisfy imports in
Spr7538Tests.java
2010-11-15 19:15:29 +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
Chris Beams 99f7142e3f Add @Ignored repro test for SPR-7538 2010-09-10 16:32:20 +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
Arjen Poutsma b31c34ed7d Upgrading version to 3.0.4 2010-06-15 14:18:29 +00:00
David Syer eb7f8309e2 Update version in POMs to 3.0.3 2010-04-15 10:26:14 +00:00
Costin Leau 688dd1a018 SPR-7071
+ fix some Eclipse classpath entries
2010-04-08 06:39:41 +00:00
Chris Beams c13e5f9f5b SPR-7009, SPR-6972: backed out unintentionally committed tests 2010-03-23 15:29:35 +00:00
Chris Beams 706a09c49e SPR-7009: TransactionInterceptor now extracts ultimate target class before evaluating @Transactional metadata to accommodate double-proxying cases 2010-03-23 12:06:30 +00:00
David Syer 1a351db6e0 Update Central POMs to 3.0.2 2010-02-21 15:32:18 +00:00
Costin Leau e8a4ddd3e0 + fix test by disabling autowiring 2010-02-15 13:23:47 +00:00
Chris Beams 0f7f749ada Updated Eclipse .classpath to aspectj 1.6.8 2010-02-04 13:45:14 +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
Costin Leau fab29dfee7 + add explicit dependency on commons-pool to prevent version 1.3 from being used (since it contains a memory leak) 2010-02-04 10:05:54 +00:00
Juergen Hoeller abdc35c893 component-scan's scoped-proxy attribute applies to scope-annotated singleton beans as well (SPR-6683) 2010-02-01 16:51:46 +00:00
Ben Hale f614150421 Fixed up POM bug 2010-01-23 12:01:54 +00:00
David Syer b077d5ba97 SPR-6678: fix poms for 3.0.1 2010-01-13 11:07:08 +00:00
Juergen Hoeller 0b577dd558 fixed dependencies 2009-12-03 13:15:33 +00:00
Juergen Hoeller 973fb6ce40 updated to Groovy 1.6.5 2009-11-27 01:37:43 +00:00
Sam Brannen c686035773 Updated Eclipse classpath regarding javax.inject and javax.validation. 2009-10-16 10:16:25 +00:00
Arjen Poutsma 523dba7285 SPR-6183 - integration-tests should not be included in the packaged distribution 2009-10-14 10:31:59 +00:00
Ramnivas Laddad 832db0abbc Updated Groovy version for Eclipse project to mathc ivy.xml 2009-09-28 20:56:13 +00:00
Mark Pollack 4f94f45ec4 pom maintenance 2009-09-21 07:37:30 +00:00
Juergen Hoeller ad1269622b @Scope annotations not sufficient for scanning anymore 2009-09-15 12:36:45 +00:00
Juergen Hoeller e1a3e44485 initial JSR-330 injection support 2009-09-15 12:00:55 +00:00
Juergen Hoeller 1045847cf7 updated to CGLIB 2.2 and EHCache 1.6.2 2009-09-07 18:04:27 +00:00
Keith Donald f323a5bb5d fixed broken classpaths for ehcache and junit 2009-09-02 16:29:43 +00:00
Juergen Hoeller 8754f0bc85 updated dependencies 2009-08-31 11:25:54 +00:00
Mark Pollack 97e3b5ca8c SPR-5976 - Upgrade POMS to JUnit 4.6 2009-08-05 17:48:53 +00:00
Mark Fisher 1bfb26e4b2 updated aspectj weaver version in .classpath files to match ivy.xml configuration 2009-07-24 20:09:01 +00:00
Chris Beams 9163d8043b updated .jms dependency on junit 4.6.0 from test->runtime to test->compile. touched all org.eclipse.jdt.core.prefs (during the process of importing the projects). only the date comments within each have changed. 2009-07-15 07:26:31 +00:00
Sam Brannen 620c9b1f96 [SPR-5895] Upgraded to EasyMock 2.5.1. 2009-07-03 09:32:15 +00:00
Sam Brannen 8bfb56c75b [SPR-5887] Upgraded to JUnit 4.6.0. 2009-07-02 18:07:55 +00:00
Sam Brannen 0c2fa5208d [SPR-5888] Upgrading to TestNG 5.9. 2009-07-02 16:03:31 +00:00
Sam Brannen 10829f8b20 Repairing Eclipse classpaths and Ivy config:
- org.apache.openjpa -> 1.1.0
 - com.sun.syndication -> 1.0.0
 - javax.el -> 1.0.0
2009-06-18 11:36:04 +00:00
Juergen Hoeller 266a65982d Servlet/Portlet ApplicationContexts use a specific id based on servlet/portlet name; DefaultListableBeanFactory references are serializable now when initialized with an id; scoped proxies are serializable now, for web scopes as well as for singleton beans; injected request/session references are serializable proxies for the current request now 2009-05-07 22:29:55 +00:00
Scott Andrews f6e869163f updating Eclipse .classpath settings for Freemarker 2.3.15 upgrade 2009-04-23 14:13:03 +00:00
Juergen Hoeller 4cf573ba98 updated to FreeMarker 2.3.15 (SPR-4962) 2009-04-19 22:22:56 +00:00
Juergen Hoeller 58a458986f polishing 2009-04-19 20:36:33 +00:00