Commit Graph

170 Commits

Author SHA1 Message Date
Chris Beams 3fbe9d5a55 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.

git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@3980 50f2f4bb-b051-0410-bef5-90022cba6387
2011-02-09 16:44:26 +00:00
Chris Beams adc9400905 Include license.txt and notice.txt in module JARs
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@3967 50f2f4bb-b051-0410-bef5-90022cba6387
2011-02-09 06:56:40 +00:00
Chris Beams dc22760978 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

git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@3954 50f2f4bb-b051-0410-bef5-90022cba6387
2011-02-08 14:42:33 +00:00
Juergen Hoeller 0b82100930 ProxyCreationContext uses "ThreadLocal.remove()" over "ThreadLocal.set(null)" as well
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@3856 50f2f4bb-b051-0410-bef5-90022cba6387
2011-01-05 19:32:02 +00:00
Sam Brannen 924b8e11ea [SPR-7850][SPR-7851] Upgraded to JUnit 4.8.1 and TestNG 5.12.1; added changelog entries for 3.1.0.M1.
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@3838 50f2f4bb-b051-0410-bef5-90022cba6387
2010-12-30 08:00:58 +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
Chris Beams 45e5b46fc2 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.

git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@3782 50f2f4bb-b051-0410-bef5-90022cba6387
2010-10-25 19:48:20 +00:00
Juergen Hoeller 0406836c2d AspectJExpressionPointcut uses bean ClassLoader for initializing the AspectJ pointcut parser (SPR-7570)
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@3698 50f2f4bb-b051-0410-bef5-90022cba6387
2010-09-29 14:31:23 +00:00
Juergen Hoeller da758771fa consistent use of JDK 1.5's ThreadLocal.remove() over ThreadLocal.set(null), preventing leaks (SPR-7441)
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@3627 50f2f4bb-b051-0410-bef5-90022cba6387
2010-09-01 17:17:25 +00:00
Ben Hale 82e5f5f5d6 Publishing license and notice files
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@3612 50f2f4bb-b051-0410-bef5-90022cba6387
2010-08-23 13:17:31 +00:00
Arjen Poutsma 750dc01862 Prepping for 3.0.5
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@3611 50f2f4bb-b051-0410-bef5-90022cba6387
2010-08-19 11:04:04 +00:00
Juergen Hoeller 0f9a15c613 polishing
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@3570 50f2f4bb-b051-0410-bef5-90022cba6387
2010-08-12 18:49:13 +00:00
Juergen Hoeller f9c20e30b5 ultimateTargetClass falls back to raw class instead of returning null
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@3515 50f2f4bb-b051-0410-bef5-90022cba6387
2010-07-30 15:13:38 +00:00
Arjen Poutsma 7f54fe732f Upgrading version to 3.0.4
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@3428 50f2f4bb-b051-0410-bef5-90022cba6387
2010-06-15 14:18:29 +00:00
Juergen Hoeller 9ec3a3798c added "expose-proxy" attribute to aop namespace (enforcing AopContext proxy exposure with CGLIB; SPR-7261)
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@3389 50f2f4bb-b051-0410-bef5-90022cba6387
2010-06-07 21:19:32 +00:00
Luke Taylor ed0eecff4b Added DomUtils.getChildElements() method. Also refactored ConfigBeanDefinitionParser.parse() to use it.
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@3334 50f2f4bb-b051-0410-bef5-90022cba6387
2010-05-14 16:07:39 +00:00
Juergen Hoeller 39f38c1a4e polishing
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@3292 50f2f4bb-b051-0410-bef5-90022cba6387
2010-04-22 21:37:35 +00:00
Juergen Hoeller 0f234936cf introduced AopProxyUtils.ultimateTargetClass (SPR-7074)
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@3291 50f2f4bb-b051-0410-bef5-90022cba6387
2010-04-22 21:36:53 +00:00
David Syer faa0f29f0f Update version in POMs to 3.0.3
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@3246 50f2f4bb-b051-0410-bef5-90022cba6387
2010-04-15 10:26:14 +00:00
Juergen Hoeller fc233fe13f revised AspectJAnnotation for consistent use of final fields (SPR-7068)
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@3229 50f2f4bb-b051-0410-bef5-90022cba6387
2010-04-06 11:54:50 +00:00
Juergen Hoeller 05843816ab AbstractInterceptorDrivenBeanDefinitionDecorator preserves lazy-init flag as well
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@3207 50f2f4bb-b051-0410-bef5-90022cba6387
2010-03-31 15:25:35 +00:00
Juergen Hoeller 99e8f66b28 adapted to common naming convention for internal attributes
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@3193 50f2f4bb-b051-0410-bef5-90022cba6387
2010-03-30 15:44:11 +00:00
Juergen Hoeller ab15578566 AbstractInterceptorDrivenBeanDefinitionDecorator exposes decorated BeanDefinition for early type checking in AbstractBeanFactory (SPR-7006)
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@3192 50f2f4bb-b051-0410-bef5-90022cba6387
2010-03-30 15:40:47 +00:00
Juergen Hoeller ad724f34b1 avoid NPE if runtimeTest is null (SPR-7032)
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@3170 50f2f4bb-b051-0410-bef5-90022cba6387
2010-03-25 10:22:16 +00:00
Juergen Hoeller 92bfb2d037 updated for JDK 1.5+
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@3159 50f2f4bb-b051-0410-bef5-90022cba6387
2010-03-24 13:58:45 +00:00
Juergen Hoeller 9d21350678 ignore failing serialization test for the time being
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@3158 50f2f4bb-b051-0410-bef5-90022cba6387
2010-03-24 10:52:20 +00:00
Juergen Hoeller 639f4581e8 polishing
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@3155 50f2f4bb-b051-0410-bef5-90022cba6387
2010-03-24 10:35:50 +00:00
Juergen Hoeller 35fc6771ab polishing
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@3137 50f2f4bb-b051-0410-bef5-90022cba6387
2010-03-22 18:31:41 +00:00
Juergen Hoeller d609376c10 AopUtils.getTargetClass(...) never returns null (SPR-7011)
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@3136 50f2f4bb-b051-0410-bef5-90022cba6387
2010-03-22 18:31:13 +00:00
Juergen Hoeller bfa0e1e944 AbstractInterceptorDrivenBeanDefinitionDecorator copies autowire settings just like ScopedProxyUtils does (SPR-6974)
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@3096 50f2f4bb-b051-0410-bef5-90022cba6387
2010-03-12 19:18:39 +00:00
Juergen Hoeller 5b7217b704 fixed @Configurable issue with null bean name (SPR-6947)
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@3057 50f2f4bb-b051-0410-bef5-90022cba6387
2010-03-04 22:33:59 +00:00
David Syer 25ef81476d Update Central POMs to 3.0.2
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@3022 50f2f4bb-b051-0410-bef5-90022cba6387
2010-02-21 15:32:18 +00:00
Costin Leau 4be6044db9 + make use or property placeholders inside template.mf
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@3014 50f2f4bb-b051-0410-bef5-90022cba6387
2010-02-19 09:43:22 +00:00
Juergen Hoeller cddadd2fd5 polishing
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@2993 50f2f4bb-b051-0410-bef5-90022cba6387
2010-02-16 18:21:25 +00:00
Juergen Hoeller d0269c0756 fixed isProxyFactoryBeanDefinition check (SPR-6842)
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@2981 50f2f4bb-b051-0410-bef5-90022cba6387
2010-02-15 17:04:13 +00:00
Chris Beams f86e3bcfd2 Updated Eclipse .classpath to aspectj 1.6.8
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@2920 50f2f4bb-b051-0410-bef5-90022cba6387
2010-02-04 13:45:14 +00:00
Costin Leau 5e677feda0 + upgrade to AspectJ 1.6.8
+ externalize some of the jar versions
+ align the versions of some dependencies between pom.xml and ivy.xml

git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@2918 50f2f4bb-b051-0410-bef5-90022cba6387
2010-02-04 11:46:21 +00:00
Juergen Hoeller 0bdaa0732b proxies with AspectJ pointcuts are fully serializable within a BeanFactory now (SPR-6681)
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@2888 50f2f4bb-b051-0410-bef5-90022cba6387
2010-02-01 14:43:35 +00:00
Juergen Hoeller 6a41d6b2a0 BeanNameAutoProxyCreator detects alias matches for specified bean names as well (SPR-6774)
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@2880 50f2f4bb-b051-0410-bef5-90022cba6387
2010-01-31 14:12:48 +00:00
David Syer e6d2f9428c SPR-6678: fix poms for 3.0.1
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@2809 50f2f4bb-b051-0410-bef5-90022cba6387
2010-01-13 11:07:08 +00:00
David Syer 2bad74c238 SPR-5327: tweak the ivy.xml so that commons-logging is a separate configuration. It already comes out as optional in the generated poms (including core), which isn't great, but I can't see what is causing that
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@2579 50f2f4bb-b051-0410-bef5-90022cba6387
2009-12-04 18:25:31 +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
Juergen Hoeller 6218b0a869 extended CGLIB version range (SPR-6400)
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@2486 50f2f4bb-b051-0410-bef5-90022cba6387
2009-11-21 00:30:50 +00:00
Costin Leau 04da2f250f SPR-6401
+ increase cglib range in OSGi manifest

git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@2479 50f2f4bb-b051-0410-bef5-90022cba6387
2009-11-20 20:23:21 +00:00
Juergen Hoeller 39bf8dc02e added chaining-capable "add" method to MutablePropertyValues
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@2462 50f2f4bb-b051-0410-bef5-90022cba6387
2009-11-19 22:30:35 +00:00
Chris Beams aaeac93d74 fixed typo in javadoc: s/poitncut/pointcut/
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@2326 50f2f4bb-b051-0410-bef5-90022cba6387
2009-11-11 01:38:26 +00:00
Juergen Hoeller b128e3be2e polishing
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@2288 50f2f4bb-b051-0410-bef5-90022cba6387
2009-11-07 01:30:50 +00:00
Sam Brannen 1deb4cb448 Suppressing unchecked and serial warnings.
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@2112 50f2f4bb-b051-0410-bef5-90022cba6387
2009-10-14 14:03:11 +00:00
Andy Clement f28a24ba30 SPR-5307: Committing test but can't be uncommented until Spring depends on AspectJ 1.6.7
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@2062 50f2f4bb-b051-0410-bef5-90022cba6387
2009-10-07 02:54:44 +00:00
Juergen Hoeller 599910699a fixed overview files
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@2005 50f2f4bb-b051-0410-bef5-90022cba6387
2009-09-25 08:47:18 +00:00