SPR-11145 claims that ServletContextAware beans declared in an
ApplicationContext loaded for an integration test by the TestContext
framework (TCF) do not have their setServletContext() methods invoked
if the tests are executed manually using JUnit 4.11.
This commit verifies that such ServletContextAware beans are processed
properly regardless of how the test was launched. Specifically:
- A ServletContextAwareBean has been introduced.
- BasicAnnotationConfigWacTests has been retrofitted with a
ServletContextAwareBean in its context.
- ServletContextAwareBeanWacTests has been introduced to execute
BasicAnnotationConfigWacTests manually via JUnitCore.
Issue: SPR-11145
- Fix Javadoc in HibernateTemplate so that it compiles in Eclipse.
- Suppress generics warnings in HibernateTemplateTests.
- Remove unnecessary deprecation warning suppression in constructor for
LocalSessionFactoryBuilder.
Prior to this commit, RestTemplate's constructors were all initializing
default HTTPMessageConverters. Its API provides a way to replace
those converters with custom ones, but default converters are already
defined and initialized at that point, which can be an issue in some
cases (performance, classpath...).
This commits adds a new constructor for RestTemplate with a list
of message converters as argument. With this new constructor,
default message converters are never initialized.
Issue: SPR-11351
Note that this variant of HibernateTemplate is stripped down in terms of Session management options and just provides a current-session style with a fallback to a temporary session-per-operation. Furthermore, in the latter fallback mode, only read operations are supported, just like with a JPA EntityManager.
Issue: SPR-11291
Prior to this commit, parts of a multipart HTTP request could be
injected in @RequestPart and @RequestParam annotated arguments, when
using types:
* MultipartFile, Collection<MultiPartFile>
* javax.servlet.Part, Collection<Part>
This commits updates @RequestParam and @RequestPart argument resolvers
and now allows the array versions of those types:
* Part[]
* MultiPartFile[]
Note that the MockHtpServletRequest backing tests for standard
Servlets implementations now uses a MultiValueMap to store parts
(versus a simple hashmap).
Issue: SPR-11353
Stereotype annotations should support a 'value' attribute for
specifying the name of the Spring-managed component; however,
@RestController currently does not provide such an attribute.
This commit introduces a 'value' attribute in @RestController so that
developers can provide custom names for components annotated with
@RestController.
Issue: SPR-11360
JOpt 4.6 redeclared its nonOptionArguments() method from List<String> to List<?>, requiring us to select String arguments only as we do for regular option values already.
Issue: SPR-11359
According to the JDK's documentation and changelog, the Introspector itself safely handles weak references as of JDK 6 update 21 (which is what we require for Spring 4.0).
Issue: SPR-11356