Commit Graph

5013 Commits

Author SHA1 Message Date
Juergen Hoeller 098342918c reworked JsonMessageConverter contribution into MappingJacksonMessageConverter, aligned with MappingJacksonHttpMessageConverter and MappingJacksonJsonView 2011-12-11 22:09:20 +00:00
Juergen Hoeller 8f69e81197 polishing 2011-12-11 22:07:37 +00:00
Juergen Hoeller d8e640d708 polishing 2011-12-11 22:07:12 +00:00
Juergen Hoeller 0f75cebdff @Transactional qualifiers match against transaction manager definitions in parent contexts as well (SPR-7679) 2011-12-11 13:26:36 +00:00
Chris Beams d4123d0637 Support use of @Scheduled against JDK proxies
Prior to this change, ScheduledAnnotationBeanPostProcessor found any
@Scheduled methods against the ultimate targetClass for a given bean
and then attempted to invoke that method against the bean instance. In
cases where the bean instance was in fact a JDK proxy, this attempt
would fail because the proxy is not an instance of the target class.

Now SABPP still attempts to find @Scheduled methods against the target
class, but subsequently checks to see if the bean is a JDK proxy, and if
so attempts to find the corresponding method on the proxy itself. If it
cannot be found (e.g. the @Scheduled method was declared only at the
concrete class level), an appropriate exception is thrown, explaining to
the users their options: (a) use proxyTargetClass=true and go with
subclass proxies which won't have this problem, or (b) pull the
@Scheduled method up into an interface.

Issue: SPR-8651
2011-12-11 13:00:30 +00:00
Juergen Hoeller 439b7750d4 fixed "hibernateManagedSession" mode to actually work against Hibernate 4.0 (SPR-8776) 2011-12-11 12:51:57 +00:00
Chris Beams 48836e2ebb Allow parameters in FactoryBean-returning @Bean methods
Prior to this change, an assumption was made in
AbstractAutowireCapableBeanFactory that any factory-method would have
zero parameters.  This may not be the case in @Bean methods.

We now look for the factory-method by name in a more flexible fashion
that accomodates the possibility of method parameters.

There remains at least one edge cases here where things could still fail,
for example a @Configuration class could have two FactoryBean-returning
methods of the same name, but each with different generic FactoryBean
types and different parameter lists. In this case, the implementation
may infer and return the wrong object type, as it currently returns
the first match for the given factory-method name.  The complexity cost
of ensuring that this never happens is not likely worth the trouble
given the very low likelihood of such an arrangement.

Issue: SPR-8762
2011-12-10 19:32:02 +00:00
Chris Beams 866999764d Polish whitespace in ConfigurationClassEnhancer 2011-12-10 19:31:18 +00:00
Chris Beams 06d06d4aa9 Mention SystemEnvironmentPropertySource in related Javadoc
Issue: SPR-8869
2011-12-10 19:30:57 +00:00
Chris Beams 0449f6cb84 Polish @Scope Javadoc 2011-12-10 19:30:32 +00:00
Chris Beams 34798a47ab Fix warnings, polish Javadoc for @Validated et al. 2011-12-10 15:45:17 +00:00
Juergen Hoeller e648245eb3 added MethodValidationInterceptor/PostProcessor for Hibernate Validator 4.2 based method validation; renamed Spring's variant of @Valid to @Validated 2011-12-09 18:09:14 +00:00
Juergen Hoeller 2dba480d9d used specific SLF4J versions for running the test suites of individual modules (fixing the Hibernate Validator 4.2 upgrade) 2011-12-09 17:53:29 +00:00
Juergen Hoeller 9d93b5429f fixed assertion message 2011-12-09 16:01:06 +00:00
Chris Beams ede8482f81 Revert .web.servlet to Hibernate Validator 4.1.0.GA
In order to determine why classloading errors occur after
upgrading to 4.2.0.Final.

To demonstrate this error, uncomment the 4.2.0.Final dependency in
ivy.xml and run `ant test` within the .web.servlet module.
2011-12-09 13:09:38 +00:00
Chris Beams 615bb29f92 Revert .context to Hibernate Validator 4.1.0.GA
In order to determine why Ehcache classloading errors occur after
upgrading to 4.2.0.Final.

To demonstrate this error, uncomment the 4.2.0.Final dependency in
ivy.xml and run `ant test` within the .context module.
2011-12-09 13:09:25 +00:00
Chris Beams 1c58dd9d89 Upgrade to Hibernate Validator 4.2.0.Final
4.1/4.2 use is optional; users may compile and run against validator
versions back to 4.0.
2011-12-09 13:09:11 +00:00
Chris Beams 481c8455fd Upgrade to Hibernate Core 4.0.0.CR7
From earlier dependence on 4.0.0.CR4.

Spring 3.1.x will upgrade to Hibernate 4.0.0.Final as soon as possible
after its release.

Pom files have also been updated to 'recommend' use of Hibernate
3.6.0.Final or better (earlier value was 3.3.1.GA).
2011-12-09 13:08:54 +00:00
Chris Beams a962bd0677 Revert accidental changes in Eclipse/pom metadata 2011-12-09 13:08:37 +00:00
Juergen Hoeller 0f1affe931 JmsInvokerClientInterceptor/FactoryBean always uses createConnection/createSession when on JMS 1.1 2011-12-09 12:06:50 +00:00
David Syer 1adf82503b SPR-7404: Fixed metadata 2011-12-09 11:36:54 +00:00
David Syer 4242b32624 Update spring-context dependencies in pom 2011-12-09 11:36:35 +00:00
David Syer 7ec9292e54 SPR-7404: Added JsonMessageConverter, borrowing from Spring AMQP 2011-12-09 11:03:40 +00:00
Arjen Poutsma 3beef9a92e SPR-8883 - RestTemplate.headForHeaders throws "IllegalArgumentException: No InputStream specified" on server resource which status code are 4xx 2011-12-08 19:17:48 +00:00
Chris Beams b94040f329 Remove unnecessary mentions of aspectjrt/aspectjweaver
aspectjrt is a subset of aspectjweaver. Eliminate mentions of aspectjrt
where aspectjweaver is already necessary (e.g. LTW), and do not mention
aspectjweaver where only aspectrt is required (e.g. @Aspect proxying)

Also bump required version of aspect* libs from 1.5 to 1.6.8, reflecting
OSGi and pom metadata.

Issue: SPR-8896
2011-12-08 13:46:47 +00:00
Chris Beams 690d33e14f Update @PropertySource Javadoc re: ${...} placeholders
Issue: SPR-8539
2011-12-08 13:46:27 +00:00
Costin Leau 312b1aa3d6 + add cache aspectj aspect 2011-12-08 13:20:01 +00:00
Rossen Stoyanchev c472a163f1 SPR-8572 Support Void.class as response type in RestTemplate. 2011-12-08 03:59:28 +00:00
Rossen Stoyanchev 6f150e4f07 SPR-8898 Allow match by trailing slash in RequestMappingHandlerMapping. 2011-12-08 03:38:50 +00:00
Juergen Hoeller 569426dfdf restored DataBinder's ability to bind to an auto-growing List with unknown element type (SPR-8828) 2011-12-07 21:27:26 +00:00
Arjen Poutsma f9144ea1ea SPR-8367 - 3.1.0.M2 update of the RestTemplate for Apache HTTP Components will default to sending 2 requests on authentication and doesn't support HttpContext parameters without significant extention/rewrite 2011-12-07 01:22:07 +00:00
Arjen Poutsma 29e969039d SPR-8349 - Ability to specify ResourceResolver property for SchemaFactory in Jaxb2Marshaller 2011-12-07 00:56:03 +00:00
Juergen Hoeller 7428b57052 final refinements for 3.1 GA 2011-12-07 00:01:53 +00:00
Juergen Hoeller 83c83d4d15 fixed media type resolution algorithm 2011-12-06 23:53:22 +00:00
Juergen Hoeller 34a4fba335 ResourceHttpRequestHandler sends content without content-type header if no media type found (SPR-7713); ResourceHttpRequestHandler and ContentNegotiatingViewResolver use consistent mime type resolution 2011-12-06 22:54:47 +00:00
Juergen Hoeller 426863f790 avoid swallowing of IOException 2011-12-06 22:51:57 +00:00
Costin Leau f74789ffbe optimize AJ pointcut definition (SPR-8890) 2011-12-06 22:38:50 +00:00
Juergen Hoeller e0d922d352 ConversionService is able to work with "Collections.emptyList()" as target type (again; SPR-7293) 2011-12-06 21:17:25 +00:00
Juergen Hoeller 5ab2bf16a5 fixed pointcut for type-level annotation to only apply to public methods (SPR-8890) 2011-12-06 21:14:31 +00:00
Juergen Hoeller 3a62aa053e fixed pointcut for type-level annotation to only apply to public methods (SPR-8890) 2011-12-06 21:03:57 +00:00
Juergen Hoeller a347e4d3c2 optimized AnnotationTransactionAspect pointcut to avoid runtime checks (SPR-8890) 2011-12-06 20:48:49 +00:00
Juergen Hoeller d050a472a2 added "mappingResources" property to LocalContainerEntityManagerFactoryBean (pointing to orm.xml; SPR-8440) 2011-12-06 18:18:57 +00:00
Costin Leau 1a2a3dd02a + update AJ tests 2011-12-06 14:13:29 +00:00
Costin Leau cb3524ff30 + fix failing cache tests
+ renamed afterInvocation to beforeInvocation (and changed the docs and tests accordingly)
2011-12-06 14:05:33 +00:00
Costin Leau 735ba9dcde SPR-8082
+ support generic discovery of multiple annotations of the same type (such as stereotypes)
2011-12-06 13:32:25 +00:00
Chris Beams 5fe0804017 Remove references to -with-dependencies distribution
Issue: SPR-7788, SPR-6575
2011-12-06 13:19:35 +00:00
Chris Beams 28ff473091 Allow multiple @Filter 'value' args for concision
Prior to this change, to specify two or more annotation include/exclude
filters, one would declare @ComponentScan as follows:

    @ComponentScan(basePackages="example.scannable",
       useDefaultFilters=false,
       includeFilters={
           @Filter(MyStereotype.class),
           @Filter(MyComponent.class)
       })

This was because @Filter's 'value' attribute accepted exactly one
argument.

Now, any given @Filter may accept one or more value arguments, allowing
for more concise @ComponentScan declarations:

    @ComponentScan(basePackages="example.scannable",
       useDefaultFilters=false,
       includeFilters=@Filter({MyStereotype.class, MyComponent.class}))

Supplying multiple arguments in this way assumes that they are the same
type of filter, e.g. ANNOTATION, ASSIGNABLE_TYPE, or CUSTOM. To declare
multiple *different* types of filters, multiple @Filter annotations are
still required, e.g.:

    @ComponentScan(
        includeFilters={
            @Filter(type=ANNOTATION, value=MyStereotype.class),
            @Filter(type=ASSIGNABLE_TYPE, value={Foo.class, Bar.class})
        })

Note that specifying zero arguments, e.g. @Filter({}) is nonsensical; it
will have no effect on component scanning, but does not raise an error.

Issue: SPR-8881
2011-12-06 12:18:10 +00:00
Chris Beams df7bda5637 Constrain targets for @Filter declaration
For clarity, add @Target({}) to definition of @Filter, constraining it
to complex annotation composition only; i.e. it cannot be placed on
any element, only within annotations, e.g.

    @ComponentScan(includeFilters=@Filter(...))

is legal, while

    @Filter
    public class MyType { }

is not.

Also, widen @Retention from SOURCE to RUNTIME, even though it is not
technically necessary, as all parsing of @Filter annotations happens via
ASM, i.e. at the source level.  This change is made primarily for
consistency (@ComponentScan's Retention is RUNTIME) and in avoidance of
potential confusion or surprise on the part of those casually browsing
the code.
2011-12-06 12:17:54 +00:00
Chris Beams c2c224958d Polish WebApplicationInitializer Javadoc
Issue: SPR-8897
2011-12-06 12:17:42 +00:00
Juergen Hoeller aedccec67e restored SpringValidatorAdapter's ability to handle bean constraints with property paths (SPR-8895) 2011-12-05 22:37:55 +00:00