Commit Graph

3656 Commits

Author SHA1 Message Date
Chris Beams
e693d9fa58 Polish JavaDoc 2010-12-08 07:58:47 +00:00
Chris Beams
b50abc67de Add Hamcrest 1.1 as test-time dependency for .context
Provides a richer set of Matcher implementations than JUnit's hamcrest
package.
2010-12-07 06:56:55 +00:00
Chris Beams
e0c5ced695 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
2010-12-05 20:14:26 +00:00
Chris Beams
5062dc31af 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.
2010-12-01 09:01:58 +00:00
Chris Beams
b33da670e5 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.
2010-12-01 08:36:29 +00:00
Chris Beams
c8b4915891 Remove obsolete ConfigurationClassPostProcessor.getOrder() 2010-12-01 08:36:12 +00:00
David Syer
b109a07fd9 SPR-7705: re-order rules and befores 2010-11-17 17:27:03 +00:00
David Syer
c52915bde6 Add hamcrest to beans pom in the right place to make tests compile 2010-11-16 17:12:32 +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
David Syer
36ec06a917 Add missing JPA dependency 2010-11-15 16:54:12 +00:00
David Syer
cfe1fdb5e5 Add missing Hamcrest dependency 2010-11-15 16:50:59 +00:00
David Syer
a3df1c4e41 Re-order deps to allow Hamcrest to come before JUnit 2010-11-15 16:50:01 +00:00
David Syer
b73224427f Add missing ROME dep 2010-11-15 16:49:17 +00:00
Arjen Poutsma
01120eb2f0 Using random port for HTTP integration tests 2010-11-09 10:40:51 +00:00
Arjen Poutsma
8762ec956c SPR-7707 - Unexpected behavior with class-level @RequestMappings 2010-11-08 14:56:35 +00:00
Costin Leau
01e79cfedd SPR-7703
- minor performance improvements to servlet and portlet handlers
2010-10-31 17:46:15 +00:00
Costin Leau
caf1a0875a SPR-7308
+ add updated IDE classpath
+ add updated OSGi manifest
2010-10-29 17:17:38 +00:00
Costin Leau
4f8105ccaa SPR-7308
+ add updated IDE classpath
+ add updated OSGi manifest
2010-10-29 17:17:10 +00:00
Costin Leau
85c02981b5 SPR-7308
+ initial commit of caching abstraction
+ main API
+ Spring AOP and AspectJ support
+ annotation driven, declarative support
+ initial namespace draft
2010-10-29 17:00:08 +00:00
Arjen Poutsma
416777022d SPR-6614 - Add human-readable descriptions for statuc codes in HttpStatus 2010-10-29 10:56:43 +00:00
Arjen Poutsma
7cc3f49910 SPR-7695 - Add ETag version of WebRequest.checkNotModified() 2010-10-29 10:28:47 +00:00
Costin Leau
095a36e853 SPR-7470
+ add missing test class
2010-10-28 17:54:07 +00:00
Costin Leau
6ef987bced SPR-7470
+ add test for XML config with errors
2010-10-28 17:49:49 +00:00
Costin Leau
c13905ad16 SPR-7470
+ add c: namespace
2010-10-28 17:49:01 +00:00
Chris Beams
4214bc0735 Minor post-merge cleanup 2010-10-25 19:54:01 +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
b0ea2b13d2 polishing 2010-10-20 21:15:22 +00:00
Arjen Poutsma
a37a9e8a38 SPR-7667 2010-10-20 13:59:37 +00:00
Juergen Hoeller
577755d580 polishing 2010-10-20 05:51:51 +00:00
Juergen Hoeller
610812949f prepared for 3.0.5 release 2010-10-20 05:48:25 +00:00
Juergen Hoeller
82ec515e59 declared JPA API as optional (SPR-6819) 2010-10-20 05:37:25 +00:00
Juergen Hoeller
d418eed56f AbstractJasperReportsView only sets locale model attributes if not present already 2010-10-20 05:22:43 +00:00
Juergen Hoeller
244c96151e added consistent license header 2010-10-20 05:19:17 +00:00
Ramnivas Laddad
92298469bf Fixed configuration of AnnotationAsyncExecutionAspect (was incorrectly under the same name as that for transaction management aspect) 2010-10-17 22:33:30 +00:00
Juergen Hoeller
bfd54f4f35 AnnotationAsyncExecutionAspect etc 2010-10-15 21:04:48 +00:00
Juergen Hoeller
c5e53ee432 polishing 2010-10-15 20:50:51 +00:00
Juergen Hoeller
8c9b64c948 added mode="proxy"/"aspectj" and proxy-target-class options to task namespace; switched to concise names for async aspects 2010-10-15 20:50:23 +00:00
Thomas Risberg
171f1ee097 added additional parameter name matching using lowercase with Locale.ENGLISH (SPR-7658) 2010-10-15 15:56:59 +00:00
Juergen Hoeller
be21358db7 reintroduced getHandler(request, cache) in deprecated form (after removing it in 3.0.4) 2010-10-15 14:05:22 +00:00
Juergen Hoeller
5da5fc6499 polishing 2010-10-15 08:44:03 +00:00
Chris Beams
c7aaa85ef6 Add proper default values for 'merge' attributes in collection elements (SPR-7656) 2010-10-15 07:56:02 +00:00
Juergen Hoeller
a25e4d794e Hibernate 3.6, etc 2010-10-14 23:10:08 +00:00
Juergen Hoeller
3c067e5db6 optimized AnnotationUtils findAnnotation performance for repeated search on same interfaces (SPR-7630) 2010-10-14 23:06:45 +00:00
Juergen Hoeller
0f924820e8 revised OracleTableMetaDataProvider for reliable Oracle Connection detection; autodetect JdbcTemplate's NativeJdbcExtractor (SPR-7611) 2010-10-14 21:25:14 +00:00
Juergen Hoeller
1f1577e33e fixed @Value injection to correctly cache temporary null results for non-singleton beans (SPR-7614) 2010-10-14 19:49:29 +00:00
Juergen Hoeller
e1dbb66798 StringToArray/CollectionConverter trims element values before trying to convert them (SPR-7657) 2010-10-14 19:44:26 +00:00
Juergen Hoeller
1933b648c3 fixed @Value injection to correctly cache temporary null results for non-singleton beans (SPR-7614) 2010-10-14 19:40:36 +00:00
Juergen Hoeller
5cb06f5da2 consistent caching of @Autowired arguments in field and method case (SPR-7635) 2010-10-14 09:34:31 +00:00
Juergen Hoeller
ffa4ed093f BeanWrapper etc 2010-10-14 00:30:38 +00:00
Juergen Hoeller
4c73a29f99 polishing 2010-10-14 00:30:07 +00:00