Commit Graph

8255 Commits

Author SHA1 Message Date
Sam Brannen 474142a862 Update link to Pro Git in CONTRIBUTING page 2014-02-28 17:43:18 +01:00
Sam Brannen 3a758a8c60 Update link to Pro Git in CONTRIBUTING page 2014-02-28 17:31:18 +01:00
Brian Clozel b22ae598ca update org name in links
SpringSource github org name changed to spring-projects.
2014-02-28 17:21:54 +01:00
Sam Brannen 5637890661 Link to @SpringCentral in README 2014-02-28 17:18:38 +01:00
Sam Brannen 57ecb9f307 Polish formatting and update links in README 2014-02-28 16:05:49 +01:00
Rossen Stoyanchev 035bac025a Use unique names when auto-registering Filters
AbstractDispatcherServletInitializer now adds a unique suffix to a
filter name if it fails to register it.

Issue: SPR-11493
2014-02-28 09:56:46 -05:00
Rossen Stoyanchev 8b24f99487 Update CONTRIBUTING.md 2014-02-28 09:50:31 -05:00
Brian Clozel fc05df0f14 Expose path matching settings in MVC Java config
Prior to this commit, one had to provide her own
RequestMappingHandlerMapping instance (i.e extend
WebMvcConfigurationSupport and override the requestMappingHandlerMapping
method) in order to customize path matching properties on that bean.

Since SPR-10163, XML config users can do that using the
<mvc:path-matching/> XML tag. This commit adds the same feature to MVC
Java config with a PathMatchConfigurer.

Issue: SPR-11486
2014-02-28 15:50:01 +01:00
Rossen Stoyanchev 1c90bf5e4f Update CONTRIBUTING.md 2014-02-28 09:49:17 -05:00
Sam Brannen d108db8a79 Polish CONTRIBUTING page 2014-02-28 15:40:13 +01:00
Sam Brannen 2edff2135f Polish Javadoc for DefaultContentTypeResolver 2014-02-28 15:19:35 +01:00
Juergen Hoeller ac61b13a7c AnnotatedElementUtils wraps unexpected exceptions with descriptive IllegalStateException
Issue: SPR-10441
2014-02-28 14:17:37 +01:00
Juergen Hoeller 1763bfbad0 Fixed content length check in XmlValidationModeDetector
Issue: SPR-11477
2014-02-28 14:00:32 +01:00
Juergen Hoeller bc5af2c6b6 Upgraded to Hibernate 4.2.9 2014-02-28 14:00:00 +01:00
Rossen Stoyanchev 6016536055 Remove ContentTypeResolver from composite converter
Before this change CompositeMessageConverter had a ContentTypeResolver
field that was in turn set on all contained converters.

After this change that field is removed and effectively
CompositeMessageConverter is a simple container of other converters.
Each converter in turn must have been configured with a
ContentTypeResolver.

Doing so means it is less likely to have unexpected consequences when
configuring converters, the ContentTypeResolver set in the composite
converter overriding the one configured in a contained converter.

Also commit 676ce6 added default ContentTypeResolver initialization
to AbstractMessageConverter, which ensures that converters are still
straight forward to configure.

Issue: SPR-11462
2014-02-27 21:41:35 -05:00
Rossen Stoyanchev 0da1eefd74 Add default ContentTypeResolver initialization
Previously AbstractMessageConverter did not have a ContentTypeResolver
configured by default. However the Java config and XML namespace in
spring-messaging and spring-websocket always configured one.

This change ensures every AbstractMessageConverter is configured with an
instance of DefaultContentTypeResolver by default. This makes sense since
all the resolver does is make an attempt to find a content type to use
for matching. If it can't it returns null and it's up to the converter
to decide whether it can convert or not.

Issue: SPR-11462
2014-02-27 21:40:53 -05:00
Rossen Stoyanchev 801237aec1 Add getMatchingPatterns method to Patterns condition
Issue: SPR-11484
2014-02-27 16:27:40 -05:00
Rossen Stoyanchev 56476cdd5f Add strictContentTypeMatching converter option
AbstractMessageConverter now supports a strictContentTypeMatching mode
in which the content type of a message must be resolved to a (non-null)
value that matches one of the configured supported MIME types in order
for the converter to be used.

Issue: SPR-11463
2014-02-27 15:43:54 -05:00
Sebastien Deleuze 2b69c1f15b Support String contentType headers in spring-messaging
After this change DefaultContentTypeResolver supports String-based
"contentType" header values in addition to MimeType-based.

Issue: SPR-11461
2014-02-27 12:00:50 -05:00
Brian Clozel 11c41993f1 Update documentation with coding guidelines
This commit:
* adds a reference to the Spring Code Style wiki page in the main
CONTRIBUTING document
* updates the link to the Spring team in README
* adds a note regarding Intellij IDEA 13 issues
2014-02-27 11:16:47 +01:00
Sam Brannen 0637864b39 Ensure AnnotationUtils is compatible with Java 6
The previous commit introduced a dependency on
Class.getDeclaredAnnotation() which is a Java 8 API.

This commit refactors AnnotationUtils.findAnnotation(Class, Class, Set)
to use Class.getAnnotation() in conjunction with
isAnnotationDeclaredLocally() in order to achieve the same desired
behavior.

Issue: SPR-11475
2014-02-26 17:51:26 +01:00
Sam Brannen 0f5a27c354 Merge changes from sbrannen/SPR-11475
* SPR-11475:
  Favor 'local' annotations over inherited ones
2014-02-26 16:09:29 +01:00
Sam Brannen 1d30bf83a0 Favor 'local' annotations over inherited ones
Prior to this commit, the implementations of findAnnotation() in
AnnotationUtils and getAnnotationAttributes() in AnnotatedElementUtils
favored inherited annotations and inherited composed annotations over
composed annotations that are declared closer to the starting class
passed to these methods.

This commit addresses this issue as follows:

- Refactored AnnotationUtils to use getDeclaredAnnotation() and
  getDeclaredAnnotations() instead of getAnnotation() and
  getAnnotations() where appropriate.

- AnnotatedElementUtils.doProcess() supports a traverseClassHierarchy
  flag to control whether the class hierarchy should be traversed,
  using getDeclaredAnnotations() instead of getAnnotations() if the
  flag is true.

- Overhauled Javadoc in AnnotatedElementUtils.

Issue: SPR-11475
2014-02-26 16:06:42 +01:00
Juergen Hoeller 0616cbccd6 Upgraded JSP build dependency to 2.2 2014-02-26 15:44:50 +01:00
Sam Brannen fbdebc1bd6 Clean up warnings that show up in Gradle build 2014-02-26 14:05:26 +01:00
Sam Brannen 019d29c991 Delete work-around for Ant 1.8 in Gradle build
Ant 1.9.2 is packaged with Gradle since release 1.10. Since the Spring
Framework build now uses Gradle 1.11, there is no longer a need for the
"javac1.7" build compiler work-around for the spring-oxm module.
2014-02-26 13:58:04 +01:00
Sam Brannen 1ac08e4a1b Polish Javadoc for ConfigurationClassParser 2014-02-26 02:22:32 +01:00
Sam Brannen 979c483384 Do not inspect meta-annotations on Java annotations
This commit introduces a new isInJavaLangAnnotationPackage(Annotation)
method in AnnotationUtils. This method is now used in AnnotationUtils,
AnnotatedElementUtils, and MetaAnnotationUtils to ensure that search
algorithms do no search for meta-annotations on annotations in the
"java.lang.annotation" package.

The following are some empirical results from this change:

- The number of times that the findAnnotation(Class,Class,Set) method in
  AnnotationUtils is recursively invoked while executing
  AnnotationUtilsTests drops from 51 to 29.

- The number of times that the process(AnnotatedElement) method in
  AnnotationUtils.AnnotationCollector is recursively invoked while
  executing AnnotationUtilsTests.getRepeatableFromMethod() drops
  from 16 to 2.

- The number of times that the doProcess() method in
  AnnotatedElementUtils is recursively invoked while executing the
  "getAnnotationAttributes() On MetaCycleAnnotatedClass with missing
  target meta-annotation" test in AnnotatedElementUtilsTests drops
  from 23 to 5.

- The number of times that the findAnnotationDescriptor(Class,Set,Class)
  method in MetaAnnotationUtils is recursively invoked while executing
  the "findAnnotationDescriptor() on MetaCycleAnnotatedClass with
  missing target meta-annotation" test in MetaAnnotationUtilsTests drops
  from 16 to 8.

Issue: SPR-11483
2014-02-25 21:57:35 +01:00
Rossen Stoyanchev 651e0a44fb Update documentation
Clarify ability to use @MessageMapping methods on both @Controller as
well as @RestController.

Add section on configuring connections (including credentials) to the
message broker and clarify the use of the login/passcode headerers of
the STOMP CONNECT frame.

Add note on when to add the reactor-tcp dependency.

Issue: SPR-11464, SPR-11436, SPR-11449
2014-02-25 11:31:13 -05:00
Sam Brannen ce0d916492 Fix 'method' typo in @PropertySources 2014-02-25 15:56:39 +01:00
Sam Brannen 39eb7442fc Merge changes from sbrannen/SPR-11455
* SPR-11455:
  Always supply test class to ContextLoaders in TCF
2014-02-25 15:36:17 +01:00
Sam Brannen 78b69f5d77 Always supply test class to ContextLoaders in TCF
Prior to this commit, the following methods in ContextLoaderUtils
treated a composed @ContextConfiguration annotation (i.e., a custom
annotation that is meta-annotated with @ContextConfiguration) as the
"declaring class" instead of the actual test class.

- resolveContextConfigurationAttributes()
- resolveContextHierarchyAttributes()

As a consequence, if @ContextConfiguration is used as a
meta-annotation, the meta-annotated class is stored as the
"declaringClass" in ContextConfigurationAttributes. Thus, when a
ContextLoader (or SmartContextLoader) attempts to detect default
resource locations or configuration classes, it does so for the
composed annotation class instead of for the declaring test class.

This commit ensures that ContextLoaders are supplied the declaring test
class instead of the composed annotation class in such use cases.

Issue: SPR-11455
2014-02-25 15:27:31 +01:00
Sam Brannen 76cc6db5fc Upgrade to TestNG 6.8.8
Issue: SPR-11482
2014-02-25 15:26:16 +01:00
Rossen Stoyanchev b727cdb120 Adjust ActiveMQ settings in integration tests
Before this change tests on the CI server showed the following message:

Store limit is 102400 mb, whilst the data directory:
/opt/.../KahaDB only has 74810 mb of usable space

This change turns off store persistence and also explicitly sets the
limit on memory usage.
2014-02-24 17:07:34 -05:00
Phillip Webb 2ec4c00068 Merge pull request #468 from wilkinsona/jasperreports
* jasperreports:
  Make version of JasperReports consistent
2014-02-24 10:56:59 -08:00
Andy Wilkinson 7c4fbec1cd Make version of JasperReports consistent
Ensure that context-support and webmvc depend upon the same version
of JasperReports
2014-02-24 10:56:14 -08:00
Phillip Webb cd6d234244 Merge pull request #469 from petrukhnov/patch-1
* patch-1:
  Removed repeated 'multiple' word in comment
2014-02-24 10:49:05 -08:00
Konstantin Petrukhnov ccb7737716 Removed repeated 'multiple' word in comment 2014-02-24 10:48:42 -08:00
Sam Brannen 90b938aa8f Verify status quo when searching for non-inherited composed annotations
Issue: SPR-11475
2014-02-24 00:13:47 +01:00
Sam Brannen f8950960f2 Support arbitrary meta-annotation levels in the TCF
Prior to this commit, the findAnnotationDescriptor() and
findAnnotationDescriptorForTypes() methods in MetaAnnotationUtils only
supported a single level of meta-annotations. In particular, this kept
the following annotations from being used as meta-annotations on
meta-annotations:

- @ContextConfiguration
- @ContextHierarchy
- @ActiveProfiles
- @TestExecutionListeners

This commit alters the search algorithms used in MetaAnnotationUtils so
that arbitrary levels of meta-annotations are now supported for the
aforementioned test-related annotations.

Issue: SPR-11470
2014-02-23 01:05:15 +01:00
Sam Brannen 2c8f25a14c Delete call to System.err in AbstractContextLoaderUtilsTests 2014-02-23 00:28:00 +01:00
Sam Brannen aa3e250ab6 @Ignore PrintingResultHandlerTests 2014-02-23 00:24:24 +01:00
Sam Brannen 3c511f00cc Simplify MetaAnnotationUtilsTests 2014-02-22 18:48:55 +01:00
Sam Brannen d9a2b3c2ba Deleted unused code in ContextLoaderUtilsActiveProfilesTests 2014-02-22 18:09:59 +01:00
Sam Brannen dc6eaad2e9 Update copyright date in ContextLoaderUtils 2014-02-22 18:06:37 +01:00
Sam Brannen 5f7d1758f8 Always pass test class to ActiveProfilesResolver
Prior to this commit, if @ActiveProfiles were used as a meta-annotation
on a composed annotation, then the composed annotation's class would be
passed to the ActiveProfilesResolver.resolve() method instead of the
test class, which breaks the contract for ActiveProfilesResolver.

This commit addresses this issue by ensuring that the actual test class
is always passed to ActiveProfilesResolver.resolve().

Issue: SPR-11467
2014-02-22 17:15:11 +01:00
Sam Brannen 34e90ba7f7 Simplify ContextLoaderUtilsActiveProfilesTests 2014-02-22 16:55:13 +01:00
Sam Brannen 7e38f479e0 Polishing 2014-02-21 22:56:23 +01:00
Sam Brannen 42a36349e9 Support nested meta-annotations in AnnotationUtils
Prior to this commit, AnnotationUtils.findAnnotation(Class, Class)
claimed to recursively search through annotations; however, only one
level of annotations was supported by the algorithm.

This commit alters the search algorithm so that nested meta-annotations
(i.e., meta-annotations on meta-annotations) are also supported.

Issue: SPR-11448
2014-02-19 18:27:44 +01:00
Sam Brannen 8f0849f328 Fix minor error in AnnotationUtilsTests
TransactionalAndOrderedClass now extends TransactionalClass.

The tests passed anyway, but they did not actually verify what was meant
to be verified.
2014-02-19 12:47:55 +01:00