Commit Graph

3805 Commits

Author SHA1 Message Date
Chris Beams 7daf7da08b Add Hamcrest 1.1 as test-time dependency for .context
Provides a richer set of Matcher implementations than JUnit's hamcrest
package.

git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@3807 50f2f4bb-b051-0410-bef5-90022cba6387
2010-12-07 06:56:55 +00:00
Chris Beams c2996bebcd Use dot notation rather than camel case for profile props (SPR-7508)
Before this change, the following properties could be used to manipulate
Spring profile behavior:

    -DspringProfiles=p1,p2
    -DdefaultSpringProfile=pD

These properties have been renamed to follow usual Java conventions for
property naming:

    -Dspring.profile.active=p1,p2
    -Dspring.profile.default=pD



git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@3806 50f2f4bb-b051-0410-bef5-90022cba6387
2010-12-05 20:14:26 +00:00
Chris Beams f455b1e89a Support default profile (SPR-7508, SPR-7778)
'default' is now a reserved profile name, indicating
that any beans defined within that profile will be registered
unless another profile or profiles have been activated.

Examples below are expressed in XML, but apply equally when
using the @Profile annotation.

EXAMPLE 1:

        <beans>
            <beans profile="default">
                <bean id="foo" class="com.acme.EmbeddedFooImpl"/>
            </beans>
            <beans profile="production">
                <bean id="foo" class="com.acme.ProdFooImpl"/>
            </beans>
        </beans>

    In the case above, the EmbeddedFooImpl 'foo' bean will be
    registered if:
        a) no profile is active
        b) the 'default' profile has explicitly been made active

    The ProdFooImpl 'foo' bean will be registered if the 'production'
    profile is active.

EXAMPLE 2:

        <beans profile="default,xyz">
            <bean id="foo" class="java.lang.String"/>
        </beans>

    Bean 'foo' will be registered if any of the following are true:
        a) no profile is active
        b) 'xyz' profile is active
        c) 'default' profile has explicitly been made active
        d) both (b) and (c) are true

Note that the default profile is not to be confused with specifying no
profile at all.  When the default profile is specified, beans are
registered only if no other profiles are active; whereas when no profile
is specified, bean definitions are always registered regardless of which
profiles are active.

The default profile may be configured programmatically:

    environmnent.setDefaultProfile("embedded");

or declaratively through any registered PropertySource, e.g. system properties:

    -DdefaultSpringProfile=embedded

Assuming either of the above, example 1 could be rewritten as follows:

        <beans>
            <beans profile="embedded">
                <bean id="foo" class="com.acme.EmbeddedFooImpl"/>
            </beans>
            <beans profile="production">
                <bean id="foo" class="com.acme.ProdFooImpl"/>
            </beans>
        </beans>

It is unlikely that use of the default profile will make sense in
conjunction with a statically specified 'springProfiles' property.
For example, if 'springProfiles' is specified as a web.xml context
param, that profile will always be active for that application,
negating the possibility of default profile bean definitions ever
being registered.

The default profile is most useful for ensuring that a valid set of
bean definitions will always be registered without forcing users
to explictly specify active profiles.  In the embedded vs. production
examples above, it is assumed that the application JVM will be started
with -DspringProfiles=production when the application is in fact in
a production environment.  Otherwise, the embedded/default profile bean
definitions will always be registered.


git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@3804 50f2f4bb-b051-0410-bef5-90022cba6387
2010-12-01 09:01:58 +00:00
Chris Beams 839cb85688 Rename EnvironmentBeansTests* -> ProfileXmlBeanDefinitionTests*
Earlier naming reflected initial conception of 'environment-specific
bean definitions'. This notion has evolved into bean definitions
specific to particular profiles, and the new naming more clearly
expresses it.

git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@3803 50f2f4bb-b051-0410-bef5-90022cba6387
2010-12-01 08:36:29 +00:00
Chris Beams e5fb701466 Remove obsolete ConfigurationClassPostProcessor.getOrder()
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@3802 50f2f4bb-b051-0410-bef5-90022cba6387
2010-12-01 08:36:12 +00:00
David Syer 1a4fac31d9 SPR-7705: re-order rules and befores
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@3801 50f2f4bb-b051-0410-bef5-90022cba6387
2010-11-17 17:27:03 +00:00
David Syer d92fc78366 Add hamcrest to beans pom in the right place to make tests compile
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@3800 50f2f4bb-b051-0410-bef5-90022cba6387
2010-11-16 17:12:32 +00:00
Chris Beams 258a40a209 Fix .integration-tests build path errors
Add .expression as a build path dependency to satisfy imports in
Spr7538Tests.java

git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@3799 50f2f4bb-b051-0410-bef5-90022cba6387
2010-11-15 19:15:29 +00:00
David Syer 65d303feaa Add missing JPA dependency
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@3798 50f2f4bb-b051-0410-bef5-90022cba6387
2010-11-15 16:54:12 +00:00
David Syer eaccafcf30 Add missing Hamcrest dependency
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@3797 50f2f4bb-b051-0410-bef5-90022cba6387
2010-11-15 16:50:59 +00:00
David Syer 8b0abd5b72 Re-order deps to allow Hamcrest to come before JUnit
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@3796 50f2f4bb-b051-0410-bef5-90022cba6387
2010-11-15 16:50:01 +00:00
David Syer 22f501457e Add missing ROME dep
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@3795 50f2f4bb-b051-0410-bef5-90022cba6387
2010-11-15 16:49:17 +00:00
Arjen Poutsma 3e2aaec911 Using random port for HTTP integration tests
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@3794 50f2f4bb-b051-0410-bef5-90022cba6387
2010-11-09 10:40:51 +00:00
Arjen Poutsma bcad0df063 SPR-7707 - Unexpected behavior with class-level @RequestMappings
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@3793 50f2f4bb-b051-0410-bef5-90022cba6387
2010-11-08 14:56:35 +00:00
Costin Leau 810bb4a441 SPR-7703
- minor performance improvements to servlet and portlet handlers


git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@3792 50f2f4bb-b051-0410-bef5-90022cba6387
2010-10-31 17:46:15 +00:00
Costin Leau 1237c3ab36 SPR-7308
+ add updated IDE classpath
+ add updated OSGi manifest

git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@3791 50f2f4bb-b051-0410-bef5-90022cba6387
2010-10-29 17:17:38 +00:00
Costin Leau f2ce1f0a22 SPR-7308
+ add updated IDE classpath
+ add updated OSGi manifest

git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@3790 50f2f4bb-b051-0410-bef5-90022cba6387
2010-10-29 17:17:10 +00:00
Costin Leau 5c534c3757 SPR-7308
+ initial commit of caching abstraction
+ main API
+ Spring AOP and AspectJ support
+ annotation driven, declarative support
+ initial namespace draft

git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@3789 50f2f4bb-b051-0410-bef5-90022cba6387
2010-10-29 17:00:08 +00:00
Arjen Poutsma 334e4eb1e7 SPR-6614 - Add human-readable descriptions for statuc codes in HttpStatus
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@3788 50f2f4bb-b051-0410-bef5-90022cba6387
2010-10-29 10:56:43 +00:00
Arjen Poutsma 3f2b200e64 SPR-7695 - Add ETag version of WebRequest.checkNotModified()
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@3787 50f2f4bb-b051-0410-bef5-90022cba6387
2010-10-29 10:28:47 +00:00
Costin Leau d82280d258 SPR-7470
+ add missing test class

git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@3786 50f2f4bb-b051-0410-bef5-90022cba6387
2010-10-28 17:54:07 +00:00
Costin Leau b43727f3b2 SPR-7470
+ add test for XML config with errors

git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@3785 50f2f4bb-b051-0410-bef5-90022cba6387
2010-10-28 17:49:49 +00:00
Costin Leau f578693015 SPR-7470
+ add c: namespace

git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@3784 50f2f4bb-b051-0410-bef5-90022cba6387
2010-10-28 17:49:01 +00:00
Chris Beams 6e9e1f0946 Minor post-merge cleanup
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@3783 50f2f4bb-b051-0410-bef5-90022cba6387
2010-10-25 19:54:01 +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 e91ae9573e polishing
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@3780 50f2f4bb-b051-0410-bef5-90022cba6387
2010-10-20 21:15:22 +00:00
Arjen Poutsma 19224cac2b SPR-7667
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@3779 50f2f4bb-b051-0410-bef5-90022cba6387
2010-10-20 13:59:37 +00:00
Juergen Hoeller 747c192d5c polishing
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@3778 50f2f4bb-b051-0410-bef5-90022cba6387
2010-10-20 05:51:51 +00:00
Juergen Hoeller 6a6fcf1fa5 prepared for 3.0.5 release
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@3777 50f2f4bb-b051-0410-bef5-90022cba6387
2010-10-20 05:48:25 +00:00
Juergen Hoeller e7e39577ed declared JPA API as optional (SPR-6819)
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@3776 50f2f4bb-b051-0410-bef5-90022cba6387
2010-10-20 05:37:25 +00:00
Juergen Hoeller 6ea12936c8 AbstractJasperReportsView only sets locale model attributes if not present already
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@3775 50f2f4bb-b051-0410-bef5-90022cba6387
2010-10-20 05:22:43 +00:00
Juergen Hoeller 43f9c8e3c9 added consistent license header
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@3774 50f2f4bb-b051-0410-bef5-90022cba6387
2010-10-20 05:19:17 +00:00
Ramnivas Laddad 0856315864 Fixed configuration of AnnotationAsyncExecutionAspect (was incorrectly under the same name as that for transaction management aspect)
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@3773 50f2f4bb-b051-0410-bef5-90022cba6387
2010-10-17 22:33:30 +00:00
Juergen Hoeller 417d74abd2 AnnotationAsyncExecutionAspect etc
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@3772 50f2f4bb-b051-0410-bef5-90022cba6387
2010-10-15 21:04:48 +00:00
Juergen Hoeller a3d4fb65b5 polishing
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@3771 50f2f4bb-b051-0410-bef5-90022cba6387
2010-10-15 20:50:51 +00:00
Juergen Hoeller 708f816053 added mode="proxy"/"aspectj" and proxy-target-class options to task namespace; switched to concise names for async aspects
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@3770 50f2f4bb-b051-0410-bef5-90022cba6387
2010-10-15 20:50:23 +00:00
Thomas Risberg c6ca32a5d1 added additional parameter name matching using lowercase with Locale.ENGLISH (SPR-7658)
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@3769 50f2f4bb-b051-0410-bef5-90022cba6387
2010-10-15 15:56:59 +00:00
Juergen Hoeller 92a3c025e8 reintroduced getHandler(request, cache) in deprecated form (after removing it in 3.0.4)
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@3768 50f2f4bb-b051-0410-bef5-90022cba6387
2010-10-15 14:05:22 +00:00
Juergen Hoeller ebdb4a19fc polishing
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@3767 50f2f4bb-b051-0410-bef5-90022cba6387
2010-10-15 08:44:03 +00:00
Chris Beams cb0e8dba2c Add proper default values for 'merge' attributes in collection elements (SPR-7656)
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@3766 50f2f4bb-b051-0410-bef5-90022cba6387
2010-10-15 07:56:02 +00:00
Juergen Hoeller 0d66d61117 Hibernate 3.6, etc
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@3765 50f2f4bb-b051-0410-bef5-90022cba6387
2010-10-14 23:10:08 +00:00
Juergen Hoeller bbb728568e optimized AnnotationUtils findAnnotation performance for repeated search on same interfaces (SPR-7630)
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@3764 50f2f4bb-b051-0410-bef5-90022cba6387
2010-10-14 23:06:45 +00:00
Juergen Hoeller 43e06bfe41 revised OracleTableMetaDataProvider for reliable Oracle Connection detection; autodetect JdbcTemplate's NativeJdbcExtractor (SPR-7611)
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@3763 50f2f4bb-b051-0410-bef5-90022cba6387
2010-10-14 21:25:14 +00:00
Juergen Hoeller d0846425f5 fixed @Value injection to correctly cache temporary null results for non-singleton beans (SPR-7614)
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@3762 50f2f4bb-b051-0410-bef5-90022cba6387
2010-10-14 19:49:29 +00:00
Juergen Hoeller 5d4b7ee227 StringToArray/CollectionConverter trims element values before trying to convert them (SPR-7657)
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@3761 50f2f4bb-b051-0410-bef5-90022cba6387
2010-10-14 19:44:26 +00:00
Juergen Hoeller a52450e21a fixed @Value injection to correctly cache temporary null results for non-singleton beans (SPR-7614)
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@3760 50f2f4bb-b051-0410-bef5-90022cba6387
2010-10-14 19:40:36 +00:00
Juergen Hoeller 22ba9942f5 consistent caching of @Autowired arguments in field and method case (SPR-7635)
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@3759 50f2f4bb-b051-0410-bef5-90022cba6387
2010-10-14 09:34:31 +00:00
Juergen Hoeller b5bb1ac952 BeanWrapper etc
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@3758 50f2f4bb-b051-0410-bef5-90022cba6387
2010-10-14 00:30:38 +00:00
Juergen Hoeller 2e9fe246e7 polishing
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@3757 50f2f4bb-b051-0410-bef5-90022cba6387
2010-10-14 00:30:07 +00:00
Juergen Hoeller c025d123c9 BeanWrapper does not attempt to populate Map values on access (just auto-grows Map itself)
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@3756 50f2f4bb-b051-0410-bef5-90022cba6387
2010-10-14 00:14:50 +00:00