- 13 2月, 2012 1 次提交
-
-
由 Rossen Stoyanchev 提交于
Issues: SPR-9111
-
- 12 2月, 2012 9 次提交
-
-
由 jhoeller 提交于
SQL exception translation enhancements
-
由 jhoeller 提交于
Fixes for SimpleJdbcInsert [SPR-9006]
-
由 Juergen Hoeller 提交于
-
由 Juergen Hoeller 提交于
-
由 Juergen Hoeller 提交于
-
由 Juergen Hoeller 提交于
-
由 Juergen Hoeller 提交于
-
由 Juergen Hoeller 提交于
clarified Resource's "getFilename" method to consistently return null if resource type does not have a filename (SPR-9043)
-
由 Juergen Hoeller 提交于
-
- 11 2月, 2012 1 次提交
-
-
由 Rossen Stoyanchev 提交于
-
- 10 2月, 2012 8 次提交
-
-
由 Chris Beams 提交于
Recent changes in ExtendedBeanInfo involve invoking ClassUtils#getMostSpecificMethod when determining JavaBeans get/set pairs; if Java security settings control disallow reflective access, this results in an AccessControlException. This change defends against this (comparatively rare) scenario by catching the exception and falling back to returning the method originally supplied by the user. This change was a result of noticing CallbacksSecurityTests failing following the ExtendedBeanInfo modifications mentioned above Issue: SPR-8949
-
由 Thomas Risberg 提交于
The username is usually not null, but it could be for some embedded databases. Always setting generatedKeysColumnNameArraySupported to false when getGeneratedKeysSupported is false, since it can't be supported without having generated keys supported. This change only affects logging messages. Issue: SPR-9006
-
由 Thomas Risberg 提交于
Adding a static CustomSQLExceptionTranslatorRegistry and a CustomSQLExceptionTranslatorRegistrar that can be used to register custom SQLExceptionTranslator implementations for specific databases from any application context. This can be used in application contexts like this: <bean class="org.springframework.jdbc.support.CustomSQLExceptionTranslatorRegistrar"> <property name="sqlExceptionTranslators"> <map> <entry key="H2"> <bean class="com.yourcompany.data.CustomSqlExceptionTranslator"/> </entry> </map> </property> </bean> Issue: SPR-7675
-
由 Thomas Risberg 提交于
-
由 Rossen Stoyanchev 提交于
-
由 Chris Beams 提交于
Prior to this commit, and due to idiosyncracies of java.beans.Introspector, overridden boolean getter methods were not detected by Spring's ExtendedBeanInfo, which relied on too-strict Method equality checks when selecting read and write methods. Now ExtendedBeanInfo uses Spring's ClassUtils#getMostSpecificMethod against the methods returned from java.beans.Introspector in order to ensure that subsequent equality checks are reasonable to make. Issue: SPR-8949
-
由 Chris Beams 提交于
Clean up ignored test, consolidate and document tests cornering covariant return type edge cases. Issue: SPR-8079, SPR-8806
-
由 Arjen Poutsma 提交于
ServletServerHttpRequest now falls back on the contentType and the the characterEncoding of the ServletRequest, if the headers of the incoming request don't specify one. Similary ServletServerHttpResponse sets the contentType and the characterEncoding of the ServletResponse if not already set. This allows using the CharacterEncodingFilter to set a character encoding where the request doesn't specify one and have it be used in HttpMessageConverter's. SPR-9096
-
- 09 2月, 2012 8 次提交
-
-
由 Chris Beams 提交于
spring-orm now successfully builds against Hibernate 4.1.0.Final Issue: SPR-9082
-
由 Juergen Hoeller 提交于
-
由 Juergen Hoeller 提交于
-
由 Juergen Hoeller 提交于
-
由 Juergen Hoeller 提交于
-
由 Juergen Hoeller 提交于
-
由 Juergen Hoeller 提交于
write method parameter type preferred over read method parameter type for property conversion (fixing regression; SPR-8964)
-
由 Juergen Hoeller 提交于
-
- 08 2月, 2012 11 次提交
-
-
由 Juergen Hoeller 提交于
-
由 Juergen Hoeller 提交于
-
由 Juergen Hoeller 提交于
fixed SpringValidatorAdapter regression to return correct error codes for class-level constraints (SPR-8958)
-
由 Juergen Hoeller 提交于
-
由 Juergen Hoeller 提交于
-
由 jhoeller 提交于
Check original beanClass in #isFactoryBean calls
-
由 Rossen Stoyanchev 提交于
Although the reference documentation listed the new @mvc support classes and their benefits, it did not explicitly mention a few use cases that are no longer supported. There is now a specific section on the new support classes listing exactly what is not supported. Similary the @RequestMapping annotation never refered explicitly to the existence of old and new support and never made it clear exactly what the differences are. Both have not been corrected. SPR-9063, SPR-9042
-
由 Chris Beams 提交于
Uses of AnnotationMetadata#getAnnotationAttributes throughout the framework have been updated to use the new AnnotationAttributes API in order to take advantage of the more concise, expressive and type-safe methods there. All changes are binary compatible to the 3.1.0 public API, save the exception below. A minor binary compatibility issue has been introduced in AbstractCachingConfiguration, AbstractAsyncConfiguration and AbstractTransactionManagementConfiguration when updating their protected Map<String, Object> fields representing annotation attributes to use the new AnnotationAttributes API. This is a negligible breakage, however, as the likelilhood of users subclassing these types is very low, the classes have only been in existence for a short time (further reducing the likelihood), and it is a source-compatible change given that AnnotationAttributes is assignable to Map<String, Object>.
-
由 Chris Beams 提交于
Background Spring 3.1 introduced the @ComponentScan annotation, which can accept an optional array of include and/or exclude @Filter annotations, e.g. @ComponentScan( basePackages = "com.acme.app", includeFilters = { @Filter(MyStereotype.class), ... } ) @Configuration public class AppConfig { ... } @ComponentScan and other annotations related to @Configuration class processing such as @Import, @ImportResource and the @Enable* annotations are parsed using reflection in certain code paths, e.g. when registered directly against AnnotationConfigApplicationContext, and via ASM in other code paths, e.g. when a @Configuration class is discovered via an XML bean definition or when included via the @Import annotation. The ASM-based approach is designed to avoid premature classloading of user types and is instrumental in providing tooling support (STS, etc). Prior to this commit, the ASM-based routines for reading annotation attributes were unable to recurse into nested annotations, such as in the @Filter example above. Prior to Spring 3.1 this was not a problem, because prior to @ComponentScan, there were no cases of nested annotations in the framework. This limitation manifested itself in cases where users encounter the ASM-based annotation parsing code paths AND declare @ComponentScan annotations with explicit nested @Filter annotations. In these cases, the 'includeFilters' and 'excludeFilters' attributes are simply empty where they should be populated, causing the framework to ignore the filter directives and provide incorrect results from component scanning. The purpose of this change then, is to introduce the capability on the ASM side to recurse into nested annotations and annotation arrays. The challenge in doing so is that the nested annotations themselves cannot be realized as annotation instances, so must be represented as a nested Map (or, as described below, the new AnnotationAttributes type). Furthermore, the reflection-based annotation parsing must also be updated to treat nested annotations in a similar fashion; even though the reflection-based approach has no problem accessing nested annotations (it just works out of the box), for substitutability against the AnnotationMetadata SPI, both ASM- and reflection-based implementations should return the same results in any case. Therefore, the reflection-based StandardAnnotationMetadata has also been updated with an optional 'nestedAnnotationsAsMap' constructor argument that is false by default to preserve compatibility in the rare case that StandardAnnotationMetadata is being used outside the core framework. Within the framework, all uses of StandardAnnotationMetadata have been updated to set this new flag to true, meaning that nested annotation results will be consistent regardless the parsing approach used. Spr9031Tests corners this bug and demonstrates that nested @Filter annotations can be parsed and read in both the ASM- and reflection-based paths. Major changes - AnnotationAttributes has been introduced as a concrete LinkedHashMap<String, Object> to be used anywhere annotation attributes are accessed, providing error reporting on attribute lookup and convenient type-safe access to common annotation types such as String, String[], boolean, int, and nested annotation and annotation arrays, with the latter two also returned as AnnotationAttributes instances. - AnnotationUtils#getAnnotationAttributes methods now return AnnotationAttributes instances, even though for binary compatibility the signatures of these methods have been preserved as returning Map<String, Object>. - AnnotationAttributes#forMap provides a convenient mechanism for adapting any Map<String, Object> into an AnnotationAttributes instance. In the case that the Map is already actually of type AnnotationAttributes, it is simply casted and returned. Otherwise, the map is supplied to the AnnotationAttributes(Map) constructor and wrapped in common collections style. - The protected MetadataUtils#attributesFor(Metadata, Class) provides further convenience in the many locations throughout the .context.annotation packagage that depend on annotation attribute introspection. - ASM-based core.type.classreading package reworked Specifically, AnnotationAttributesReadingVisitor has been enhanced to support recursive reading of annotations and annotation arrays, for example in @ComponentScan's nested array of @Filter annotations, ensuring that nested AnnotationAttributes objects are populated as described above. AnnotationAttributesReadingVisitor has also been refactored for clarity, being broken up into several additional ASM AnnotationVisitor implementations. Given that all types are package-private here, these changes represent no risk to binary compatibility. - Reflection-based StandardAnnotationMetadata updated As described above, the 'nestedAnnotationsAsMap' constructor argument has been added, and all framework-internal uses of this class have been updated to set this flag to true. Issue: SPR-7979, SPR-8719, SPR-9031
-
由 Juergen Hoeller 提交于
-
由 Juergen Hoeller 提交于
LocalContainerEntityManagerFactoryBean's "persistenceUnitName" applies to "packagesToScan" as well; DefaultPersistenceUnitManager uses containing jar as persistence unit root URL for default unit (SPR-8832)
-
- 07 2月, 2012 2 次提交
-
-
由 Juergen Hoeller 提交于
-
由 Juergen Hoeller 提交于
-