Go to file
Chris Beams d471266d44 @Feature methods accept @Value-annotated params
Previously errors were being raised when trying to inject @Value
annotated paramaters such as:

@Feature
public FeatureSpec feature(@Value("#{environment['foo']}") String foo) {
    return new FeatureSpec(foo);
}

This is not so much because dependency resolution of @Value-annotated
types was failing, but rather because the 'early bean reference'
proxying mechanism was throwing an exception if any final type was
detected as a parameter. This is of course because final types are
non-subclassable by CGLIB.  On review, however, it's obvious that
certain final types must be allowed for injection.  @Value injection
is an obvious one, but the rarer case of a Spring bean of type String
or int is another.

The explicit guard against final types as parameters to @Feature methods
has been removed. Final types are still checked for, however, and if
found, no proxing is attempted.  The dependency is immediately resolved
against the current BeanFactory and injected into the @Feature method.

This means that @Value injection, @Qualifier injection, etc all work
as expected, but does mean that premature bean instantiation may occur
if a user unwittingly injects non-String, non-primitive final bean types
as @Feature method parameters.

Issue: SPR-7974
2011-03-15 07:09:49 +00:00
build-spring-framework [SPR-8030] AbstractJUnit38SpringContextTests and AbstractTransactionalJUnit38SpringContextTests are now officially deprecated. 2011-03-09 11:47:53 +00:00
org.springframework.aop Fix STS compatibility issues; other improvements 2011-02-09 16:44:26 +00:00
org.springframework.asm Merge 3.1.0 development branch into trunk 2010-10-25 19:48:20 +00:00
org.springframework.aspects + revert back deleted resource 2011-03-06 18:19:19 +00:00
org.springframework.beans Allow other delimiters in profile XML attribute 2011-03-11 04:08:10 +00:00
org.springframework.context @Feature methods accept @Value-annotated params 2011-03-15 07:09:49 +00:00
org.springframework.context.support moved cache abstraction from context.support to context 2011-02-07 17:41:25 +00:00
org.springframework.core Polish imports 2011-03-13 19:12:10 +00:00
org.springframework.expression 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
org.springframework.instrument Include license.txt and notice.txt in module JARs 2011-02-09 06:56:40 +00:00
org.springframework.instrument.tomcat Include license.txt and notice.txt in module JARs 2011-02-09 06:56:40 +00:00
org.springframework.integration-tests 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
org.springframework.jdbc switched to create the PreparedStatementCreatorFactory using a list of SqlParameters to preserve type names (SPR-7699) 2011-02-09 13:58:30 +00:00
org.springframework.jms Include license.txt and notice.txt in module JARs 2011-02-09 06:56:40 +00:00
org.springframework.orm Include license.txt and notice.txt in module JARs 2011-02-09 06:56:40 +00:00
org.springframework.oxm Include license.txt and notice.txt in module JARs 2011-02-09 06:56:40 +00:00
org.springframework.spring-library Merge 3.1.0 development branch into trunk 2010-10-25 19:48:20 +00:00
org.springframework.spring-parent Add hamcrest to beans pom in the right place to make tests compile 2010-11-16 17:12:32 +00:00
org.springframework.test [SPR-8030] AbstractJUnit38SpringContextTests and AbstractTransactionalJUnit38SpringContextTests are now officially deprecated. 2011-03-09 11:45:43 +00:00
org.springframework.transaction turned to package visibility 2011-02-10 01:58:21 +00:00
org.springframework.web @MVC 2.0: AbstractAnnotationMAR -> AbstractNamedValueMAR 2011-02-25 11:05:14 +00:00
org.springframework.web.portlet Include license.txt and notice.txt in module JARs 2011-02-09 06:56:40 +00:00
org.springframework.web.servlet Polishing 2011-03-10 14:08:58 +00:00
org.springframework.web.struts [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
spring-framework-reference Docs reflect bean id change from xsd:ID->xsd:string 2011-03-14 11:10:12 +00:00
src/test/java/org/springframework/core/env Merge 3.1.0 development branch into trunk 2010-10-25 19:48:20 +00:00
.gitignore M1 cut of environment, profiles and property work (SPR-7508) 2011-01-03 09:04:34 +00:00
build.properties Merge 3.1.0 development branch into trunk 2010-10-25 19:48:20 +00:00
build.versions [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
ci-build.properties adding properties file to simplify ant use in Bamboo CI build 2008-12-17 15:47:14 +00:00
eclipse-code-formatter.xml h2 embedded db support; updated formatting conventions not to auto-format javadoc; added hsqldb and h2 to jdbc maven pom as optional deps 2009-05-09 22:27:05 +00:00
spring-framework.ipr Merge 3.1.0 development branch into trunk 2010-10-25 19:48:20 +00:00
spring-framework.psf Renamed org.springframework.instrument.classloading module to org.springframework.instrument.tomcat 2009-09-25 12:51:58 +00:00