- 06 9月, 2012 7 次提交
-
-
由 Phillip Webb 提交于
Update the ReflectiveAspectJAdvisorFactory class to sort candidate AOP methods based on their annotation first and method name second. Prior to this the order of aspects created from annotated methods could differ depending on the underling JVM, as first noticed under JDK7 in SPR-9729. - ConvertingComparator and InstanceComparator have been introduced in support of this change, per SPR-9730. - A shared static INSTANCE field has been added to ComparableComparator to avoid unnecessary instantiation costs within ConvertingComparator as well as to prevent generics warnings during certain caller scenarios. Issue: SPR-9729, SPR-9730
-
由 Phillip Webb 提交于
-
由 Phillip Webb 提交于
- Refactor CompoundComparator constructor to use varargs - Refactor MediaType to consume new varargs constructor - Add notNull assertions where appropriate - Add generic typing where appropriate - Suppress generics warnings elsewhere - Fix whitespace errors
-
由 Arjen Poutsma 提交于
Before this commit, the Jaxb2Marshaller required all supported classes to be annotated with @XmlRootElement. This commit adds a property 'checkForXmlRootElement' (default is true) which allows for un-annotated classes. This is especially useful for JAXB2 implementations that can use external binding files, such as EclipseLink MOXy. Issue: SPR-9757
-
由 Chris Beams 提交于
This commit avoids eager creation of Environment instances, favoring delegation of already existing Environment objects where possible. For example, FrameworkServlet creates an ApplicationContext; both require a StandardServletEnvironment instance, and prior to this change, two instances were created where one would suffice - indeed these two instances may reasonably be expected to be the same. Now, the FrameworkServlet defers creation of its Environment, allowing users to supply a custom instance via its #setEnvironment method (e.g. within a WebApplicationInitializer); the FrameworkServlet then takes care to delegate that instance to the ApplicationContext created in #createWebApplicationContext. This behavior produces more consistent behavior with regard to delegation of the environment, saves unnecessary cycles by avoiding needless instantiation and calls to methods like StandardServletEnvironment#initPropertySources and leads to better logging output, as the user sees only one Environment created and initialized when working with the FrameworkServlet/DispatcherServlet. This commit also mirrors these changes across the corresponding Portlet* classes. Issue: SPR-9763
-
由 Chris Beams 提交于
This change fixes a minor bug with the implementation of ConfigurableEnvironment#merge, introduced in SPR-9444. During a merge of two environments A and B, where A has default profiles [prod] and B has default profiles [default] (the so-called 'reserved default profile'), B would complete the merge process having a collection of profiles reading [default, prod], which is incorrect. This commit explicitly ensure's that B's reserved default profile is removed if A has a set of default profiles greater than zero. If A consists only of [default], B will inherit it during the merge correctly; if A consists of [p1, p2], B will result in [p1, p2] as well; if B consists of [p1] and A of [p2, p3], B will result in [p1, p2, p3] post-merge. Issue: SPR-9761, SPR-9444
-
由 Chris Beams 提交于
Prior to this change, AbstractApplicationContext#prepareBeanFactory registered a bean named 'environment' once and only once within a given ApplicationContext hierarchy. This worked fine with the expectation that the Environment object is always delegated downward to children of that hierarchy. However, with SPR-9444 and the introduction of ConfigurableEnvironment#merge, this expectation was violated; each member of an application context hierarchy now maintains its own distinct Environment instance, which means that by extension that each application context's underlying BeanFactory should have its own 'environment' bean pointing to that context's environment instance. This problem could manifest in getting the wrong environment instance when calling #getBean(Environment) or when @Autowiring an Environment instance, for example into a @Configuration class. As reported in SPR-9756, this could result in false negative property lookups or incorrect results when checking whether a profile is active. This commit ensures that every bean factory in an application hierarchy has an 'environment' bean referring to the object returned from the enclosing ApplicationContext#getEnvironment method. Issue: SPR-9756, SPR-9444
-
- 05 9月, 2012 6 次提交
-
-
由 Rob Winch 提交于
This commit adds the ability to allow the MockFilterChain to invoke a List of Filter's and/or a Servlet. Issue: SPR-9745
-
由 Juergen Hoeller 提交于
Issue: SPR-9498
-
由 Juergen Hoeller 提交于
-
由 Juergen Hoeller 提交于
added Field context variant to TypeConverter interface in beans module; @Value injection works in combination with formatting rules such as @DateTimeFormat Issue: SPR-9637
-
由 Juergen Hoeller 提交于
-
由 Juergen Hoeller 提交于
-
- 04 9月, 2012 1 次提交
-
-
由 jhoeller 提交于
SPR-9498: relax logic detecting successful property editor after conversion exception
-
- 31 8月, 2012 4 次提交
-
-
由 Juergen Hoeller 提交于
Issue: SPR-9664
-
由 Juergen Hoeller 提交于
Issue: SPR-9181
-
由 Juergen Hoeller 提交于
Issue: SPR-9176 Issue: SPR-9627
-
由 Juergen Hoeller 提交于
Issue: SPR-9627
-
- 30 8月, 2012 7 次提交
-
-
由 Juergen Hoeller 提交于
Issue: SPR-9607
-
由 Juergen Hoeller 提交于
Issue: SPR-9303 Issue: SPR-9605
-
由 Juergen Hoeller 提交于
-
由 Juergen Hoeller 提交于
StaxEventContentHandler uses static inner class for Location adapter, in order to avoid leaks when caching events Issue: SPR-9305
-
由 Juergen Hoeller 提交于
Issue: SPR-9681
-
由 Juergen Hoeller 提交于
Issue: SPR-9547
-
由 Juergen Hoeller 提交于
Issue: SPR-9609
-
- 29 8月, 2012 4 次提交
-
-
由 Rossen Stoyanchev 提交于
The AbstractDispatcherServletInitializer now provides support for the registration of filters to be mapped to the DispatcherServlet. It also sets the asyncSupported flag by default on the DispatcherServlet and all registered filters. Issue: SPR-9696
-
由 Rossen Stoyanchev 提交于
Issue: SPR-9714
-
由 Rossen Stoyanchev 提交于
Issue: SPR-9603
-
由 Rossen Stoyanchev 提交于
A new @MatrixVariable annotation allows injecting matrix variables into @RequestMapping methods. The matrix variables may appear in any path segment and should be wrapped in a URI template for request mapping purposes to ensure request matching is not affected by the order or the presence/absence of such variables. The @MatrixVariable annotation has an optional "pathVar" attribute that can be used to refer to the URI template where a matrix variable is located. Previously, ";" (semicolon) delimited content was removed from the path used for request mapping purposes. To preserve backwards compatibility that continues to be the case (except for the MVC namespace and Java config) and may be changed by setting the "removeSemicolonContent" property of RequestMappingHandlerMapping to "false". Applications using the MVC namespace and Java config do not need to do anything further to extract and use matrix variables. Issue: SPR-5499, SPR-7818
-
- 28 8月, 2012 1 次提交
-
-
由 Rossen Stoyanchev 提交于
Rename ExceptionHandlerSupport to ResponseEntityExceptionHandler and emphasize the contrast to DefaultHandlerExceptionResovler -- i.e. one returns a ResponseEntity and relies on message converters while the other returns a ModelAndView and relies on view resolution. Issue: SPR-9290
-
- 27 8月, 2012 2 次提交
-
-
由 Arjen Poutsma 提交于
-
由 Arjen Poutsma 提交于
-
- 25 8月, 2012 1 次提交
-
-
由 Sam Brannen 提交于
-
- 24 8月, 2012 4 次提交
-
-
由 Arjen Poutsma 提交于
-
由 Chris Beams 提交于
* SPR-9677: Introduce strategy for BeanInfo creation
-
由 Arjen Poutsma 提交于
Before this commit, the CachedIntrospectionResults was hard-coded to create ExtendedBeanInfos for bean classes. The ExtendedBeanInfo support the JavaBeans property contract only. This commit introduces the BeanInfoFactory, a strategy for creating BeanInfos. Through this strategy, it is possible to support beans that do not necessarily implement the JavaBeans contract (i.e. have a different getter or setter style). BeanInfoFactories are are instantiated by the CachedIntrospectionResults, which looks for 'META-INF/spring.beanInfoFactories' files on the class path. These files contain one or more BeanInfoFactory class names. When a BeanInfo is to be created, the CachedIntrospectionResults will iterate through the factories, asking it to create a BeanInfo for the given bean class. If none of the factories support it, an ExtendedBeanInfo is created as a default. This commit also contains a change to Property, allowing BeanWrapperImpl to specify the property name at construction time (as opposed to using Property#resolveName(), which supports the JavaBeans contract only). Issue: SPR-9677
-
由 Rossen Stoyanchev 提交于
-
- 23 8月, 2012 3 次提交
-
-
由 Rossen Stoyanchev 提交于
This change makes it possible to declare an @RequestBody argument with a generic type (e.g. List<Foo>). If a GenericHttpMessageConverter implementation supports the method argument, then the request will be converted to the apropiate target type. The new GenericHttpMessageConverter is implemented by the MappingJacksonHttpMessageConverter and also by a new Jaxb2CollectionHttpMessageConverter that can read read a generic Collection where the generic type is a JAXB type annotated with @XmlRootElement or @XmlType. Issue: SPR-9570
-
由 Arjen Poutsma 提交于
This change makes it possible to use the RestTemplate to read an HTTP response into a target generic type object. The RestTemplate has three new exchange(...) methods that accept ParameterizedTypeReference -- a new class that enables capturing and passing generic type info. See the Javadoc of the three new methods in RestOperations for a short example. To support this feature, the HttpMessageConverter is now extended by GenericHttpMessageConverter, which adds a method for reading an HttpInputMessage to a specific generic type. The new interface is implemented by the MappingJacksonHttpMessageConverter and also by a new Jaxb2CollectionHttpMessageConverter that can read read a generic Collection where the generic type is a JAXB type annotated with @XmlRootElement or @XmlType. Issue: SPR-7023
-
由 Rossen Stoyanchev 提交于
-