Commit Graph

192 Commits

Author SHA1 Message Date
Chris Beams 87a021d5c9 Add <license> section to 3.1.x Maven poms
Issue: SPR-8927
2012-01-31 15:18:05 +01:00
Chris Beams 41c405998e Convert CRLF=>LF on files missed earlier
Complete pass with `dos2unix` found additional files missed on earlier
related commit.

Issue: SPR-5608
2011-12-22 14:06:44 +01:00
Chris Beams 88913f2b23 Convert CRLF (dos) to LF (unix)
Prior to this change, roughly 5% (~300 out of 6000+) of files under the
source tree had CRLF line endings as opposed to the majority which have
LF endings.

This change normalizes these files to LF for consistency going forward.

Command used:

$ git ls-files | xargs file | grep CRLF | cut -d":" -f1 | xargs dos2unix

Issue: SPR-5608
2011-12-21 14:52:47 +01:00
Chris Beams e158f61e93 Increment version to 3.1.1.BUILD-SNAPSHOT 2011-12-16 11:59:06 +01:00
Chris Beams ac107d0c2a Release Spring Framework 3.1.0.RELEASE 2011-12-13 16:35:49 +00:00
Chris Beams 22e37aac44 Polish .aop copy of SpringConfiguredBDP
Add 'infrastructure' bean role to follow suit with original .context SCPDP

Encountered while working on SPR-7888 (@EnableSpringConfigured)
2011-11-28 06:57:04 +00:00
Chris Beams 739775ca19 Introduce @EnableAspectJAutoProxy
Issue: SPR-8138
2011-10-11 18:51:41 +00:00
Chris Beams 1819bee35f Revert deprecation of AbstractSingletonPFB and co
Removed formal deprecation warnings for AbstractSingletonFactoryBean and
its TransactionProxyFactoryBean and CacheProxyFactoryBean subclasses.

This is principally because TPFB is still used by Grails and could
conceivably be used to good effect by any third-party framework in a
similar fashion. CPFB is new with 3.1, but similar use is predictable.

Deprecations have been replaced by strong recommendations that users
avoid these types in modern Spring applications and favor the use of
namespaces and annotatinos, such as tx: and @Transactional (around
since Spring 2.x) and cache: and @Cacheable.

Issue: SPR-8680, SPR-8686
2011-10-09 07:54:54 +00:00
Sam Brannen 1de71c6e37 [SPR-8222] Upgraded to JUnit 4.9. 2011-08-30 13:16:12 +00:00
Sam Brannen 87dad65ff0 [SPR-8622] Upgraded to JUnit 4.8.2 2011-08-18 16:06:31 +00:00
Chris Beams b85440f2b6 Deprecate AbstractSingletonProxyFactoryBean 2011-07-26 22:29:14 +00:00
Chris Beams 2b371a7c9a Deprecate TransactionProxyFactoryBean 2011-07-26 22:29:04 +00:00
Juergen Hoeller 57cb1f2777 improved ExposeInvocationInterceptor error message with respect to advice ordering (SPR-8544) 2011-07-21 07:38:08 +00:00
Juergen Hoeller 7861eff298 prototype-based TargetSource is only deserializable through a SingletonTargetSource 2011-07-11 13:37:49 +00:00
Chris Beams 7c25c84ee2 Deprecate/move CGLIB methods AopUtils=>ClassUtils
isCglibProxy* methods in AopUtils are useful in lower-level modules,
i.e. those that cannot depend on .aop.  Therefore copied these methods
to ClassUtils; deprecated the existing ones in AopUtils and now
delegating to the new location; switched all usage of
AopUtils#isCglibProxy* within the framework to use
ClassUtils#isCglibProxy* instead.
2011-07-06 09:15:27 +00:00
David Syer bd0f68d095 SPR-5749: Add defensive matching using target class loader
* Changes to ASpectJExpressionPointcut plus some tests in Spring AOP
* plus some tests in groovy support
2011-06-24 17:23:43 +00:00
Sam Brannen c0131fe108 Polishing Eclipse classpath settings 2011-06-11 19:56:48 +00:00
Juergen Hoeller c60511bf04 shortened build properties "org.junit.version" to "junit.version" and "org.testng.version" to "testng.version"; reverted SLF4J version back to 1.5.3 (for Hibernate 3.3.1 compatibility) 2011-06-09 09:58:15 +00:00
Juergen Hoeller fc11102e34 updated dependencies 2011-06-08 22:51:21 +00:00
Chris Beams 01e5120a26 Introduce @EnableTransactionManagement 2011-05-06 19:10:25 +00:00
Chris Beams 7b999c676f Introduce ReflectionUtils#getUniqueDeclaredMethods
This change is in support of certain polymorphism cases in
@Configuration class inheritance hierarchies.  Consider the following
scenario:

@Configuration
public abstract class AbstractConfig {
    public abstract Object bean();
}

@Configuration
public class ConcreteConfig {
    @Override
    @Bean
    public BeanPostProcessor bean() { ... }
}

ConcreteConfig overrides AbstractConfig's #bean() method with a
covariant return type, in this case returning an object of type
BeanPostProcessor.  It is critically important that the container
is able to detect the return type of ConcreteConfig#bean() in order
to instantiate the BPP at the right point in the lifecycle.

Prior to this change, the container could not do this.
AbstractAutowireCapableBeanFactory#getTypeForFactoryMethod called
ReflectionUtils#getAllDeclaredMethods, which returned Method objects
for both the Object and BeanPostProcessor signatures of the #bean()
method.  This confused the implementation sufficiently as not to
choose a type for the factory method at all.  This means that the
BPP never gets detected as a BPP.

The new method being introduced here, #getUniqueDeclaredMethods, takes
covariant return types into account, and filters out duplicates,
favoring the most specific / narrow return type.

Additionally, it filters out any CGLIB 'rewritten' methods, which
is important in the case of @Configuration classes, which are
enhanced by CGLIB.  See the implementation for further details.
2011-05-06 19:07:25 +00:00
Chris Beams 111fb71fe1 Remove "Feature" support introduced in 3.1 M1
Feature-related support such as @Feature, @FeatureConfiguration,
and FeatureSpecification types will be replaced by framework-provided
@Configuration classes and convenience annotations such as
@ComponentScan (already exists), @EnableAsync, @EnableScheduling,
@EnableTransactionManagement and others.

Issue: SPR-8012,SPR-8034,SPR-8039,SPR-8188,SPR-8206,SPR-8223,
SPR-8225,SPR-8226,SPR-8227
2011-05-06 19:03:52 +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 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
Juergen Hoeller a780a4a401 ProxyCreationContext uses "ThreadLocal.remove()" over "ThreadLocal.set(null)" as well 2011-01-05 19:32:02 +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 f88f69e700 AspectJExpressionPointcut uses bean ClassLoader for initializing the AspectJ pointcut parser (SPR-7570) 2010-09-29 14:31:23 +00:00
Juergen Hoeller e56cfb8173 consistent use of JDK 1.5's ThreadLocal.remove() over ThreadLocal.set(null), preventing leaks (SPR-7441) 2010-09-01 17:17:25 +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 01b65cd201 polishing 2010-08-12 18:49:13 +00:00
Juergen Hoeller 061af2f25f ultimateTargetClass falls back to raw class instead of returning null 2010-07-30 15:13:38 +00:00
Arjen Poutsma b31c34ed7d Upgrading version to 3.0.4 2010-06-15 14:18:29 +00:00
Juergen Hoeller fe1e7f0d6c added "expose-proxy" attribute to aop namespace (enforcing AopContext proxy exposure with CGLIB; SPR-7261) 2010-06-07 21:19:32 +00:00
Luke Taylor 3f885d0302 Added DomUtils.getChildElements() method. Also refactored ConfigBeanDefinitionParser.parse() to use it. 2010-05-14 16:07:39 +00:00
Juergen Hoeller 07920fc3df polishing 2010-04-22 21:37:35 +00:00
Juergen Hoeller 87e327773e introduced AopProxyUtils.ultimateTargetClass (SPR-7074) 2010-04-22 21:36:53 +00:00
David Syer eb7f8309e2 Update version in POMs to 3.0.3 2010-04-15 10:26:14 +00:00
Juergen Hoeller ecda2aee4a revised AspectJAnnotation for consistent use of final fields (SPR-7068) 2010-04-06 11:54:50 +00:00
Juergen Hoeller 6b93f41f3a AbstractInterceptorDrivenBeanDefinitionDecorator preserves lazy-init flag as well 2010-03-31 15:25:35 +00:00
Juergen Hoeller 16305530f2 adapted to common naming convention for internal attributes 2010-03-30 15:44:11 +00:00
Juergen Hoeller 282de41f06 AbstractInterceptorDrivenBeanDefinitionDecorator exposes decorated BeanDefinition for early type checking in AbstractBeanFactory (SPR-7006) 2010-03-30 15:40:47 +00:00
Juergen Hoeller 10c358718e avoid NPE if runtimeTest is null (SPR-7032) 2010-03-25 10:22:16 +00:00
Juergen Hoeller bc2440ea16 updated for JDK 1.5+ 2010-03-24 13:58:45 +00:00
Juergen Hoeller 6fb49f1de7 ignore failing serialization test for the time being 2010-03-24 10:52:20 +00:00
Juergen Hoeller 2c2cf32b8a polishing 2010-03-24 10:35:50 +00:00
Juergen Hoeller 26470cc23a polishing 2010-03-22 18:31:41 +00:00