Commit Graph

581 Commits

Author SHA1 Message Date
Juergen Hoeller b9ab895743 Inferred generics for newSetFromMap arrangements
Issue: SPR-13188
2016-07-26 21:26:31 +02:00
Juergen Hoeller e03dea1d64 Polishing 2016-07-26 17:15:19 +02:00
Juergen Hoeller 610bdf1cc3 DataSource adapters expose setCatalog/setSchema next to setUsername/setPassword
Issue: SPR-14501
2016-07-21 14:06:40 +02:00
Juergen Hoeller 99be15f58b Revise encoding steps towards use of JDK Charset and StandardCharsets
Issue: SPR-14492
2016-07-19 23:43:06 +02:00
Juergen Hoeller d07381e862 Avoid deprecated number constructors on JDK 9
Issue: SPR-13344
2016-07-19 19:25:55 +02:00
Juergen Hoeller aaac199e8b Consistently use constructor-based instantiation instead of Class.newInstance / BeanUtils.instantiate
Issue: SPR-14486
2016-07-19 19:21:06 +02:00
Juergen Hoeller 7287baefeb GenericSqlQuery configured with RowMapper instance
Issue: SPR-14489
2016-07-19 18:44:06 +02:00
Juergen Hoeller dc1664939c Javadoc fixes and pruning of outdated references 2016-07-15 22:12:11 +02:00
Stephane Nicoll e4b0486c5a Add @FunctionalInterface on candidate interfaces
Issue: SPR-14432
2016-07-06 14:32:13 +02:00
Juergen Hoeller bc2c22d51e Streamline XML namespace support towards unversioned schemas
This commit also removes support code for outdated options which were only available in older schema versions.

Issue: SPR-13499
2016-07-05 20:50:03 +02:00
Sam Brannen 1391248ea6 Introduce log4j 2 for Spring's test suite
This commit adds a test runtime dependency on log4j 2 for every project
and migrates all log4j.properties files to log4j2-test.xml files.

Issue: SPR-14431
2016-07-05 19:19:09 +02:00
Stephane Nicoll 00d2606b00 Explicit type can be replaced by <>
Issue: SPR-13188
2016-07-05 17:00:34 +02:00
Juergen Hoeller 0fc0ce78ae Drop deprecated dependencies on Log4j, JRuby, JExcel, Burlap, Commons Pool/DBCP
This commit also removes outdated support classes for Oracle, GlassFish, JBoss.

Issue: SPR-14429
2016-07-05 15:46:53 +02:00
Juergen Hoeller 51252ebbca Avoid defensive checks against Java 8 API (java.util.Optional etc)
This commit also fixes broken javadoc links and code references.

Issue: SPR-13188
2016-07-05 02:09:00 +02:00
Juergen Hoeller d341624e91 Drop JDO support
Issue: SPR-14130
2016-07-04 23:34:48 +02:00
Juergen Hoeller 0900808820 Method-level @SuppressWarnings("unchecked") for generic varargs 2016-07-04 23:20:41 +02:00
Juergen Hoeller 7c96059ca3 BeanPropertyRowMapper uses ConversionService for date-time support
Issue: SPR-13888
2016-06-09 19:19:08 +02:00
Juergen Hoeller ca9ffa2012 Convenience constructors for CompositeDatabasePopulator
Issue: SPR-14313
2016-06-01 22:02:31 +02:00
Sanghyuk Jung 06e3ee6820 Polish javadoc in TableMetaDataContext
Closes gh-1065
2016-05-26 07:50:17 +02:00
Stephane Nicoll 7d4d3db0dd Add alternative database name for HANA
Issue: SPR-14261
2016-05-23 07:43:49 +02:00
Johnny Lim 44e652f99e Remove duplicate words
Closes gh-1039
2016-04-19 08:24:21 +02:00
Juergen Hoeller 74608e6b49 Polishing 2016-04-12 16:03:57 +02:00
Juergen Hoeller 537193a4e0 Consistent license header 2016-04-11 20:49:38 +02:00
Juergen Hoeller 6573e9142c Polishing 2016-04-05 12:17:21 +02:00
Juergen Hoeller 797f5dbba6 StatementCreatorUtils handles Types.BOOLEAN through PreparedStatement.setBoolean
Issue: SPR-14116
2016-04-05 11:12:36 +02:00
Juergen Hoeller 517ebd1d3e Consistent formatting 2016-03-24 19:22:50 +01:00
Juergen Hoeller 0b1639d963 JdbcTemplate passes negative values other than -1 on to the driver (for MySQL's special values)
Issue: SPR-14028
2016-03-11 14:59:00 +01:00
Cory Klein 71cf7b4053 Fix typo
Closes gh-992
2016-03-09 08:53:47 +01:00
Juergen Hoeller 923534595c ScriptUtils.executeSqlScript logs SQLWarnings at debug level
Issue: SPR-13959
2016-02-18 17:37:22 +01:00
Stephane Nicoll 714ae2684c Support for global separator in JDBC namespace
Previously, if a database needs to be initialized with several scripts
and many (or all) use a custom separator, said separator must be repeated
for each script.

This commit introduces a `separator` property at the parent element level
that can be used to customize the default separator. This is available
for both the `initialize-database` and `embedded-database` elements.

Issue: SPR-13792
2016-01-18 16:09:07 +01:00
Juergen Hoeller e48ec4fcd3 StatementCreatorUtils always tries getParameterType on Oracle 12c driver
Issue: SPR-13825
2015-12-29 11:19:21 +01:00
Sam Brannen 5b3edcd9f9 Spring Cleaning in December
- Delete unused imports
- Delete unused code
- Clean up warnings
2015-12-17 20:27:33 +01:00
Stephane Nicoll 752d3c715a Initiate structure for 4.3 XSDs 2015-12-17 15:43:23 +01:00
Juergen Hoeller 78dad4cfc3 Jdbc4SqlXmlHandler returns null as documented (instead of throwing NPE)
Issue: SPR-13782
2015-12-09 16:09:11 +01:00
Juergen Hoeller 11806b9215 Class identity comparisons wherever possible (and further polishing)
Issue: SPR-12926
2015-12-09 12:28:09 +01:00
Juergen Hoeller d2ad2c3af8 StatementCreatorUtils detects Microsoft SQL Server driver 4.0 as well
Issue: SPR-13772
2015-12-07 17:37:52 +01:00
Juergen Hoeller e8a0ef0206 Polishing 2015-11-12 00:48:14 +01:00
Juergen Hoeller cc06183668 SimpleJdbcCall reliably throws exception on missing stored procedure
Issue: SPR-13669
2015-11-12 00:47:46 +01:00
Juergen Hoeller cca037a74d Polishing 2015-11-02 14:42:46 +01:00
Juergen Hoeller 6685c78cea Avoid NPE for anonymous SqlParameter in CallMetaDataContext
Issue: SPR-13628
2015-11-02 14:27:33 +01:00
Juergen Hoeller 81342f14d4 Declared JDBC operation compiled flag as volatile
Issue: SPR-13617
2015-10-28 14:28:32 +01:00
Juergen Hoeller 11d1f050e9 NamedParameterUtils skips Postgres-style ?? operator
Issue: SPR-13582
2015-10-26 22:47:12 +01:00
Tobias Stoeckmann ed4197febb Fix typo
Closes gh-887
2015-10-11 16:55:41 +02:00
Sam Brannen d5ee787e1e Migrate JUnit 3 tests to JUnit 4
This commit migrates all remaining tests from JUnit 3 to JUnit 4, with
the exception of Spring's legacy JUnit 3.8 based testing framework that
is still in use in the spring-orm module.

Issue: SPR-13514
2015-09-27 21:17:51 +02:00
Juergen Hoeller b23c23279b AbstractEmbeddedDatabaseConfigurer explicitly closes JDBC Connection on shutdown
Issue: SPR-13474
2015-09-21 20:42:50 +02:00
Sam Brannen 8af0151f1b Suppress recent deprecation warnings in tests 2015-08-27 17:57:50 +02:00
Sam Brannen abc805819f Polish Javadoc for EmbeddedDatabaseBuilder 2015-08-27 17:27:53 +02:00
Juergen Hoeller 5e43f9b88f Deprecate Commons DBCP 1.x support along with Commons Pool 1.x
Issue: SPR-12532
2015-08-27 12:37:21 +02:00
Juergen Hoeller 5f3559fbad Call statement support for SAP HANA
Issue: SPR-13381
2015-08-25 17:54:38 +02:00
Juergen Hoeller 35e1eca9e8 BeanPropertyRowMapper logs in case of no corresponding property as well
Issue: SPR-13323
2015-08-25 17:54:26 +02:00
Sam Brannen a43d78ea55 Suppress warnings in tests in spring-jdbc 2015-08-21 23:56:01 +02:00
Sam Brannen 9ab4062317 Clean up warnings in tests in spring-jdbc 2015-08-19 23:29:57 +02:00
Sam Brannen d54aab2338 Log connection URL for embedded databases
Prior to this commit, EmbeddedDatabaseFactory logged the name of an
embedded database just before it was created; however, the name alone
is not sufficient for connecting to the database via external tools
such as the H2 Web Console.

This commit updates EmbeddedDatabaseFactory to make it easier to
connect to embedded databases via external tools by logging the
complete connection URL for an embedded database as it's being created.
In addition, EmbeddedDatabaseFactory now logs when an embedded database
is being shut down.

Issue: SPR-13370
2015-08-19 22:22:11 +02:00
Sam Brannen 2025d5c35e Polish Javadoc and log messages for embedded databases 2015-08-19 21:44:07 +02:00
Kazuki Shimizu 93919204a1 Add missing @since tag
Issue: SPR-12801
2015-08-15 09:07:37 +02:00
Juergen Hoeller e0f012f32d Removal of redundant JdkVersion checks in the test suite
Issue: SPR-13312
2015-08-12 18:42:36 +02:00
Juergen Hoeller bec3b0fa1a Deprecate JdkVersion (for optimistic compatibility with newer JDK generations)
Issue: SPR-13312
2015-08-12 16:14:43 +02:00
Juergen Hoeller edd6e76b9f Polishing 2015-07-21 22:58:34 +02:00
Juergen Hoeller 2934256257 Polishing 2015-07-15 00:08:11 +02:00
ndebeiss 629bcb6599 Support single quotes nested in double quotes in SQL scripts
Some databases such as Oracle permit double quoted column aliases that
contain case-sensitive characters, single quotes, and other special
characters; however, prior to this commit, SqlScripts interpreted a
single quote nested within double quotes as the start of a string
literal resulting in improper parsing.

This commit addresses this issue by ensuring that double quoted strings
such as column aliases are properly parsed even when containing single
quotes.

Issue: SPR-13218
2015-07-14 15:01:01 +03:00
Juergen Hoeller e0329306df JdbcTemplate's queryForObject allows for specifying primitive types as well
Issue: SPR-13220
2015-07-13 21:30:57 +02:00
Juergen Hoeller 41b58584ea BeanPropertyRowMapper uses US locale for lower-case conversion by default
Issue: SPR-13216
2015-07-13 14:59:43 +02:00
Sam Brannen 6c530b7bfb Delete trailing whitespace in XML files 2015-06-19 17:14:10 +02:00
Juergen Hoeller b4095c3e1d Class identity comparisons wherever possible
Issue: SPR-12926
2015-05-20 14:34:16 +02:00
Stephane Nicoll 8dec8823fb Allow parameter name binding for SimpleJdbcCall
Update SimpleJdbcCall to offer a way to use named parameters binding
instead of the simple `?` binding it offers thus far.

Issue: SPR-12801
2015-05-15 09:54:03 +02:00
Juergen Hoeller 00147379f9 Polishing
(cherry picked from commit 9e925aa)
2015-05-11 22:22:23 +02:00
Sam Brannen 4f8ef80342 Update doc for resultsMapCaseInsensitive flag in JdbcTemplate
Issue: SPR-12979
2015-05-05 14:43:32 +02:00
Juergen Hoeller cddcf3637d Polishing 2015-04-16 21:54:03 +02:00
Juergen Hoeller 050e581c10 StatementCreatorUtils.setValue only uses setString etc for Types.OTHER in case of Oracle
Issue: SPR-12890
2015-04-16 21:53:51 +02:00
Sam Brannen 1226596b8b Document connection handling in ScriptUtils
This commit improves the documentation for ScriptUtils by explicitly
mentioning that a JDBC Connection supplied to the one of the
executeSqlScript() methods will not be released automatically.

Issue: SPR-12908
2015-04-14 23:00:43 +02:00
Sam Brannen c0fbe0ae5a Support unique names for embedded databases
Development teams often encounter errors with embedded databases if
their test suite inadvertently attempts to recreate additional
instances of the same database. This can happen quite easily if an XML
configuration file or @Configuration class is responsible for creating
an embedded database and the corresponding configuration is then reused
across multiple testing scenarios within the same test suite (i.e.,
within the same JVM process) -- for example, integration tests against
embedded databases whose ApplicationContext configuration only differs
with regard to which bean definition profiles are active.

The root cause of such errors is the fact that Spring's
EmbeddedDatabaseFactory (used internally by both the
<jdbc:embedded-database> XML namespace element and the
EmbeddedDatabaseBuilder for Java Config) will set the name of the
embedded database to "testdb" if not otherwise specified. For the case
of <jdbc:embedded-database>, the embedded database is typically
assigned a name equal to the bean's id. Thus, subsequent attempts to
create an embedded database will not result in a new database. Instead,
the same JDBC connection URL will be reused, and attempts to create a
new embedded database will actually point to an existing embedded
database created from the same configuration.

This commit addresses this common issue by introducing support for
generating unique names for embedded databases. This support can be
enabled via:

 - EmbeddedDatabaseFactory.setGenerateUniqueDatabaseName()

 - EmbeddedDatabaseBuilder.generateUniqueName()

 - <jdbc:embedded-database generate-name="true" ... >

Issue: SPR-8849
2015-03-21 00:21:59 +01:00
Sam Brannen c36c6cbfaa Introduce database-name in <jdbc:embedded-database>
Prior to this commit, the EmbeddedDatabaseBeanDefinitionParser set the
name of the embedded database that it configured to the value of its
'id'. This made it impossible to assign unique names to embedded
databases if the same bean 'id' (e.g, 'dataSource') was used across
multiple application contexts loaded within the same JVM, which is
often the case within an integration test suite. In contrast, the
EmbeddedDatabaseBuilder already provides support for setting the name
in Java Config. Thus there is a disconnect between XML and Java
configuration.

This commit addresses this issue by introducing a 'database-name'
attribute in <jdbc:embedded-database />. This allows developers to set
unique names for embedded databases -- for example, via a SpEL
expression or a property placeholder that is influenced by the current
active bean definition profiles.

Issue: SPR-12835
2015-03-20 16:42:04 +01:00
Sam Brannen 7e2f12cf9f Allow <jdbc:embedded-database> to be declared w/o id
This commit modifies EmbeddedDatabaseBeanDefinitionParser so that the
<jdbc:embedded-database> XML namespace element can be declared as an
anonymous bean (i.e., without an explicit ID).

Issue: SPR-12834
2015-03-20 15:48:04 +01:00
Sam Brannen 85e4b24abb Introduce spring-jdbc-4.2.xsd
This commit introduces spring-jdbc-4.2.xsd in order to support upcoming
changes to the JDBC XML namespace.

In addition, this commit polishes the XSD documentation with regard to
use cases for script execution.
2015-03-20 15:31:41 +01:00
Juergen Hoeller bc6a98c144 Polishing (in particular updating javadoc references to Apache Commons) 2015-03-13 18:19:10 +01:00
Sam Brannen 23d52d5e35 Polish Javadoc for ScriptStatementFailedException constructor
Issue: SPR-12752
2015-02-28 00:12:53 +01:00
Juergen Hoeller 540d8792fe Fixed javadoc warnings and revised FastByteArrayOutputStream code style 2015-02-27 23:49:55 +01:00
Sam Brannen 45a80fa3ed Polish Javadoc for ScriptStatementFailedException.buildErrorMessage()
Issue: SPR-12752
2015-02-27 23:17:32 +01:00
Juergen Hoeller 2b3409461f Polishing 2015-02-27 22:29:42 +01:00
Sam Brannen 448c99f224 Introduce buildErrorMessage() utility in ScriptStatementFailedException
To eliminate code duplication, ScriptStatementFailedException and
ScriptUtils now delegate to a new buildErrorMessage() utility method.

Issue: SPR-12752
2015-02-27 21:41:52 +01:00
Sam Brannen 291b3de72b Refer to statement numbers in ScriptStatementFailedException
ScriptStatementFailedException now properly refers to statement numbers
instead of line numbers.

Issue: SPR-12752
2015-02-27 19:30:56 +01:00
Juergen Hoeller 8f228d1db4 ScriptUtils properly refers to statement numbers instead of line numbers
Issue: SPR-12752
2015-02-25 18:28:23 +01:00
Juergen Hoeller 9ac02b319d Remove pre-3.2 deprecated classes and methods
Issue: SPR-12578
2014-12-30 20:05:15 +01:00
Juergen Hoeller d6b16ffee3 Remove deprecated SimpleJdbcTemplate and supporting classes
Issue: SPR-11895
2014-12-30 14:59:38 +01:00
Juergen Hoeller 3b1584904f Polishing
Issue: SPR-12476
2014-11-27 19:57:53 +01:00
Juergen Hoeller fc92c0010e Revised SqlRowSet javadoc and support for JDBC 4.x ResultSet additions
Issue: SPR-12476
Issue: SPR-12480
2014-11-27 19:07:01 +01:00
Juergen Hoeller 2b4004d176 Consistent Map<String, ?> declarations and use of LinkedHashMap for incoming JDBC operation parameters
Issue: SPR-12462
2014-11-24 13:59:09 +01:00
Juergen Hoeller c0747a006a JdbcUtils.getResultSetValue avoids re-retrieval from ResultSet for Blob/Clob content (for Derby compatibility)
Issue: SPR-8810
2014-10-28 16:19:16 +01:00
Juergen Hoeller 1ad7a03357 Polishing 2014-10-21 18:49:03 +02:00
Juergen Hoeller 8325b10080 Consistent formatting of license headers, package javadocs, and import declarations 2014-10-21 01:44:07 +02:00
Juergen Hoeller 57d63a1903 JdbcTemplate and JmsTemplate pass settings with 0 values on to the driver
Issue: SPR-12338
2014-10-17 19:54:30 +02:00
Juergen Hoeller 43597bfed4 Polishing 2014-10-16 17:26:10 +02:00
Juergen Hoeller fb92934a7b Extracted AbstractIdentityColumnMaxValueIncrementer and introduced deleteSpecificValues mode
Issue: SPR-12327
2014-10-16 17:25:40 +02:00
Juergen Hoeller fd69ee541e DataSourceTransactionManager resets ConnectionHolder on doBegin failure
Issue: SPR-12280
2014-10-02 14:33:21 +02:00
unpush 31391232f4 fix typo 2014-10-02 10:45:47 +02:00
Stephane Nicoll b2d67914a8 Fix javadoc glitch
Issue: SPR-12282
2014-10-01 16:48:38 +02:00
Juergen Hoeller 3908804486 StatementCreatorUtils uses setClob/setNClob with stream argument in case of typed String value exceeding 4000 characters (for Oracle compatibility)
Issue: SPR-12240
2014-09-27 00:40:35 +02:00
Juergen Hoeller 3046fdd56a DefaultLobCreator's streamAsLob mode supports JDBC 4.0 setBlob/Clob variants without length parameter as well
Issue: SPR-12265
2014-09-27 00:16:01 +02:00
Juergen Hoeller d65db65fad DefaultLobCreator supports JDBC 4.0 set-stream variants without length parameter
Issue: SPR-12265
2014-09-26 23:56:43 +02:00
Juergen Hoeller 62340d6ccf Only release rolled-back database savepoints during managed nested transaction
Issue: SPR-12228
2014-09-22 17:29:10 +02:00
Juergen Hoeller 9c8f7d9246 Explicitly release rolled-back database savepoints during (long-running) transaction
Issue: SPR-12228
2014-09-22 14:59:04 +02:00
Sam Brannen f27c7df004 Avoid Gradle compiler warnings 2014-09-21 21:23:54 +02:00
Juergen Hoeller 8922da3af6 Generalized workaround for JDBC 4.1 getObject(index, requiredType) failures on MySQL and Derby
Issue: SPR-12174
Issue: SPR-12157
2014-09-12 16:27:48 +02:00
Juergen Hoeller 1e7bfd91a7 Polishing 2014-09-10 01:28:54 +02:00
Juergen Hoeller dedb04bd5c Workaround for Derby's limited support for JDBC 4.1 getObject(index, requiredType)
Issue: SPR-12157
2014-09-07 22:43:09 +02:00
Sam Brannen 79c75df088 Updated copyright date range 2014-08-20 23:53:25 +02:00
Sam Brannen b5216c5165 Merge pull request #624 from leizhiyuan/master
Stop using deprecated JdbcTemplate.queryFor*() methods
2014-08-20 23:48:17 +02:00
Juergen Hoeller 759f430ba5 StatementCreatorUtils avoids direct calls with SQL type argument in case of Types.OTHER
Issue: SPR-8571
2014-08-19 20:52:54 +02:00
leizhiyuan 3fcdae8ae8 Clean Up Deprecated Method Call
change all testcases in spring-jdbc those use queryForInt and
queryForLong methods to queryForObject
2014-08-17 08:17:46 +08:00
Juergen Hoeller 4db258b9e3 Polishing 2014-08-11 22:32:03 +02:00
Juergen Hoeller ad475ffadf Consistent vararg declarations for String array setters 2014-08-08 17:17:09 +02:00
Juergen Hoeller 8f484d382e Polishing 2014-07-29 11:42:37 +02:00
Stephane Nicoll dd2bf28a4f Add missing XSDs
Commit b676c41805 should have added the 4.1 XSDs for the jdbc and oxm
modules.

Issue: SPR-12011
2014-07-19 18:42:05 +02:00
Juergen Hoeller 9d6c38bd54 Consistent bracket alignment 2014-07-18 17:21:58 +02:00
Juergen Hoeller 55c351523d Polishing 2014-07-07 16:28:48 +02:00
Juergen Hoeller 4082274630 SQLStateSQLExceptionTranslator checks exception class name for timeout indication before resorting to UncategorizedSQLException
Issue: SPR-11959
2014-07-07 16:26:25 +02:00
Juergen Hoeller ec4e6e0b0e StatementCreatorUtils populates NVARCHAR, LONGNVARCHAR, NCLOB via setString as well
Issue: SPR-11938
2014-07-01 20:30:23 +02:00
Juergen Hoeller 0451232eb4 Polishing
(cherry picked from commit 86ea305)
2014-07-01 15:14:31 +02:00
Juergen Hoeller a6f3f101e4 Preparations for eventual removal of ParameterizedRowMapper along with SimpleJdbcTemplate
Issue: SPR-11895
2014-06-24 19:26:53 +02:00
Juergen Hoeller 18131bf611 Consistent declaration of private static final logger variables
Issue: SPR-11905
2014-06-24 14:02:05 +02:00
Sam Brannen f442ce180e Polish assertions and Javadoc for ResourceDatabasePopulator 2014-06-07 14:13:45 +02:00
Sam Brannen 5fd6ebb548 Introduce annotation to execute SQL scripts in the TCF
Prior to this commit, it was possible to execute SQL scripts
programmatically via ResourceDatabasePopulator, JdbcTestUtils, and
ScriptUtils. Furthermore, it was also possible to execute SQL scripts
declaratively via the <jdbc> XML namespace. However, it was not
possible to execute SQL scripts declaratively on a per test class or
per test method basis.

This commit makes it possible to declaratively configure SQL scripts
for execution in integration tests via annotations that can be declared
at the class or method level. Details follow.

 - Introduced a repeatable @DatabaseInitializer annotation that can be
   used to configure SQL scripts at the class or method level with
   method-level overrides. @DatabaseInitializers serves as a container
   for @DatabaseInitializer.

 - Introduced a new DatabaseInitializerTestExecutionListener that is
   responsible for parsing @DatabaseInitializer and
   @DatabaseInitializers and executing SQL scripts.

 - DatabaseInitializerTestExecutionListener is registered by default in
   abstract base test classes as well as in TestContextBootstrapper
   implementations.

 - @DatabaseInitializer and @DatabaseInitializers may be used as
   meta-annotations; however, attribute overrides are not currently
   supported for repeatable annotations used as meta-annotations. This
   is a known limitation of Spring's AnnotationUtils.

 - The semantics for locating SQL script resources is consistent with
   @ContextConfiguration's semantics for locating XML configuration
   files. In addition, a default SQL script can be detected based
   either on the name of the annotated class or on the name of the
   annotated test method.

 - @DatabaseInitializer allows for specifying which DataSource and
   PlatformTransactionManager to use from the test's
   ApplicationContext, including default conventions consistent with
   TransactionalTestExecutionListener and @TransactionConfiguration.

 - @DatabaseInitializer supports all of the script configuration options
   currently supported by ResourceDatabasePopulator.

 - @DatabaseInitializer and DatabaseInitializerTestExecutionListener
   support execution phases for scripts that dictate when SQL scripts
   are executed (i.e., before or after a test method).

 - SQL scripts can be executed within the current test's transaction if
   present, outside of the current test's transaction if present, or
   always in a new transaction, depending on the value of the boolean
   requireNewTransaction flag in @DatabaseInitializer.

 - DatabaseInitializerTestExecutionListener delegates to
   ResourceDatabasePopulator#execute to actually execute the scripts.

Issue: SPR-7655
2014-06-05 20:06:11 +02:00
Juergen Hoeller f7b465390c Moved @Uses annotations to org.springframework.lang; fixed Base64Utils to declare Java 8, and fixed PathResource's declaration to refer to Java 7.
Issue: SPR-11604
2014-06-04 21:34:23 +02:00
Stephane Nicoll 8614df8bd4 Add error code for SAP Hana
This commit adds a SQLErrorCodes instance for SAP DB, based on a
contribution from Andrew Clemons

Mostly based on SAP Hana SPS 07 with a few additional codes that are
only present is previous versions:

* -813 - Cannot connect to host somehost:30115 [Connection refused]
* -709 - Unknown host somehost:30115 [somehost], -709.]
* -708 - Cannot connect to jdbc:sap://somehost:30115 [Receive of connect failed.]
* -11210 - Invalid column index XYZ.

Issue: SPR-11770
2014-05-15 17:36:55 +02:00
Juergen Hoeller 0728e32e7f ResultSetWrappingSqlRowSet preserves first matching column per name (as defined in ResultSet's javadoc)
Issue: SPR-11786
2014-05-15 14:27:44 +02:00
Stephane Nicoll bd85c916eb Integrate animal sniffer
Animal sniffer provides tools to assist verifying that classes
compiled with a newer JDK are compatible with an older JDK.

This integratesthe latest version of the tool (1.11) that
permits the use of custom annotations. Added @UsesJava7,
@UsesJava8 and @UsesSunHttpServer and annotated the few places
where we rely on a specific environment.

The verification process can be invoked by running the 'sniff'
task.

Issue: SPR-11604

polishing
2014-04-30 13:51:01 +02:00
Juergen Hoeller 02aca9c754 Polishing 2014-04-30 00:01:07 +02:00
Juergen Hoeller 6cb45f714e General defensiveness about the bootstrap ClassLoader (i.e. null ClassLoader)
Issue: SPR-11721
(cherry picked from commit 59cef3c)
2014-04-28 00:47:21 +02:00
Philippe Marschall 7a7be598c2 Clean up spring-jdbc tests warnings
Clean up compiler warnings in the tests of spring-jdbc. This commit
adds type parameters to all the types (mostly `List` and `Map`). In
addition it uses Java 5 autoboxing to get rid of all of the following

 * new Integer
 * new Long
 * new Float
 * new Double
 * new Boolean
 * new String

This should be unnoticeably faster since interning can be uses for
Integer and such.

After this commit the only warnings in spring-jdbc left are:

* raw type warning in `MapDataSourceLookupTests`, that code would never
  compile with generics
* deprecation warning for `#queryForInt` and `#queryForLong`
2014-04-22 07:18:04 +02:00
Sam Brannen 09248a0b37 Polish ResourceDatabasePopulatorTests 2014-04-14 10:54:33 +02:00
Sam Brannen b4995f7e4f Add script after setting scripts in RsrcDbPopultr
Prior to this commit it was impossible to add additional scripts to a
ResourceDatabasePopulator after setScripts() had been invoked.

This commit fixes this by ensuring that the internal scripts list
continues to be modifiable when setScripts() is invoked.

Issue: SPR-11691
2014-04-13 15:06:47 +02:00
Sam Brannen 84f678a06b Assert preconditions in ResourceDatabasePopulator
Prior to this commit ResourceDatabasePopulator did not assert any
preconditions for constructor and method arguments. Consequently,
errors would not be encountered until the populator was executed.

This commit addresses this issue by ensuring that preconditions for
constructor and method arguments are asserted immediately, throwing
IllegalArgumentExceptions where appropriate.

Issue: SPR-11690
2014-04-13 14:51:42 +02:00
Sam Brannen 8fecee8c8a Improve Javadoc in SQL script support classes 2014-04-13 12:31:07 +02:00
Sam Brannen 910dd41467 Polish AbstractDatabasePopulatorTests 2014-04-11 18:43:36 +02:00
Sam Brannen 1753f5d1ca Make EOF_STATEMENT_SEPARATOR XML friendly
Changed the value of ScriptUtils.EOF_STATEMENT_SEPARATOR from
"<<< END OF SCRIPT >>>" to "^^^ END OF SCRIPT ^^^" so that the angle
brackets do not have to be escaped in XML configuration files.

Issue: SPR-11687
2014-04-11 18:19:21 +02:00
Sam Brannen cc0ae3a881 Support EOF as statement separator in SQL scripts
Prior to Spring Framework 4.0.3, it was possible to supply a bogus
statement separator (i.e., a separator string that does not exist in
the configured SQL scripts) to ResourceDatabasePopulator with the side
effect that the entire contents of a script file would be interpreted
as a single SQL statement.

This undocumented feature was never intentional; however, some
developers came to rely on it. Unfortunately, changes made in
conjunction with SPR-9531 and SPR-11560 caused such scenarios to no
longer work.

This commit introduces first-class support for executing scripts which
contain a single statement that spans multiple lines but is not
followed by an explicit statement separator.

Specifically, ScriptUtils.EOF_STATEMENT_SEPARATOR may now be specified
as a 'virtual' statement separator to denote that a script contains a
single statement and no actual separator.

Issue: SPR-11687
2014-04-11 17:44:27 +02:00
Juergen Hoeller 3fef35879d JDBC 3.0 related javadoc overhaul
Issue: SPR-11600
2014-04-10 15:52:26 +02:00
Juergen Hoeller 37679384e8 JdbcUtils uses JDBC 4.1 getObject(int, Class) for unknown ResultSet value types
Comes with general JDBC 3.0+ baseline upgrade, removing defensive measures.

Issue: SPR-11600
2014-04-10 15:51:44 +02:00
Sam Brannen 5d049e0de8 Introduce execute(DataSource) in ResrcDbPopulator
To simplify common use cases, this commit introduces a new
execute(DataSource) method in ResourceDatabasePopulator that complements
the existing populate(Connection) method.

Issue: SPR-11629
2014-03-30 17:01:48 +02:00
Sam Brannen b766686c40 Remove duplicate @since tags in EmbeddedDatabaseBuilder 2014-03-30 16:08:44 +02:00
Stephane Nicoll 4cd818b9e4 Harmonize log configuration
Prior to this commit, the codebase was using a mix of log4j.xml
and log4j.properties for test-related logging configuration. This
can be an issue as log4j takes the xml variant first when looking
for a default bootstrap configuration.

In practice, some modules declaring the properties variant were
taking the xml variant configuration from another module.

The general structure of the configuration has also been
harmonized to provide a standard console output as well as an
easy way to enable trace logs for the current module.
2014-03-20 09:43:29 -07:00
Sam Brannen 8aefcb9a55 Set DB_CLOSE_ON_EXIT=false in H2EmbeddedDbConfig
This commit sets the DB_CLOSE_ON_EXIT flag to false for embedded H2
databases loaded using H2EmbeddedDatabaseConfigurer (i.e., via Spring's
<jdbc:embedded-database /> XML namespace, EmbeddedDatabaseBuilder,
EmbeddedDatabaseFactory, and EmbeddedDatabaseFactoryBean).

Issue: SPR-11573
2014-03-19 01:22:46 +01:00
Sam Brannen dc6d67510d Improve configurability of EmbeddedDatabaseBuilder
This commit improves the configurability of EmbeddedDatabaseBuilder by
exposing the following new configuration methods.

 - setDataSourceFactory(DataSourceFactory)
 - addScripts(String...)
 - setScriptEncoding(String)
 - setSeparator(String)
 - setCommentPrefix(String)
 - setBlockCommentStartDelimiter(String)
 - setBlockCommentEndDelimiter(String)
 - continueOnError(boolean)
 - ignoreFailedDrops(boolean)

If more fine grained control over the configuration of the embedded
database is required, users are recommended to use
EmbeddedDatabaseFactory with a ResourceDatabasePopulator and forego use
of the builder.

Issue: SPR-11410
2014-03-18 23:56:31 +01:00
Sam Brannen 34fe252acd Polish Javadoc for embedded database support 2014-03-18 23:56:31 +01:00
Sam Brannen 42690a9a9e Overhaul Javadoc for embedded database support 2014-03-18 12:54:40 +01:00
Sam Brannen c61d62ef4b Improve DataSourceInitializer Javadoc and implementation 2014-03-18 12:54:02 +01:00
Sam Brannen 87e58a6d7b Improve Javadoc for DatabasePopulator 2014-03-18 12:52:59 +01:00
Sam Brannen 92eb99a5ab Favor ScriptException over SQLException
In ScriptUtils and related classes, SQLExceptions are now caught and
wrapped in ScriptExceptions wherever feasible.

Affected "throws" declarations have also been revised as appropriate.

Issue: SPR-11564
2014-03-17 16:05:09 +01:00
Sam Brannen fbd25467c4 Introduce SQL script exception hierarchy
This commit continues the work began in SPR-9531 as follows.

 - ScriptException now extends DataAccessException.

 - DatabasePopulator.populate() now explicitly throws ScriptException.

 - Introduced UncategorizedScriptException.

 - DatabasePopulatorUtils.execute() now throws an
   UncategorizedScriptException instead of a
   DataAccessResourceFailureException.

Issue: SPR-11564
2014-03-17 12:26:32 +01:00
Sam Brannen cae50c3a2d Polishing 2014-03-16 17:34:01 +01:00
Sam Brannen bb67cd4657 Fix regression for newline separators in SQL scripts
Changes made in conjunction with SPR-9531, introduced a regression with
regard to support for using a single newline character as the statement
separator within SQL scripts. Investigation of the cause of this issue
resulted in the discovery of another, similar issue: support for
multiple newlines as a statement separator has been broken for years
but has gone unnoticed until now.

The reason that both of these issues have gone unnoticed is a result of
the fact that the test suite only executes SQL script integration tests
against HSQL DB, and HSQL does not care if two statements occur on the
same line; whereas, the H2 database will throw an exception if multiple
statements are included on the same line when executing an update.

This commit addresses both of these issues and provides further
enhancements to Spring's SQL script support as follows.

 - ScriptUtils now properly checks if the supplied script contains the
   custom statement separator or default separator before falling back
   to the 'fallback' separator (i.e., newline).

 - Introduced FALLBACK_STATEMENT_SEPARATOR constant in ScriptUtils.

 - ScriptUtils.readScript() no longer omits empty lines from the input
   file since a statement separator string may in fact be composed of
   multiple newline characters.

 - Introduced overloaded variants of splitSqlScript() and
   executeSqlScript() in ScriptUtils with smaller argument lists for
   common use cases.

 - Extracted AbstractDatabasePopulatorTests from DatabasePopulatorTests
   and introduced concrete HsqlDatabasePopulatorTests and
   H2DatabasePopulatorTests subclasses for testing against HSQL and H2.

 - Split ScriptUtilsTests into ScriptUtilsUnitTests and
   ScriptUtilsIntegrationTests for faster builds.

Issue: SPR-11560
2014-03-16 16:41:08 +01:00
Sam Brannen 01b2f67f11 Introduce constructors in ResourceDatabasePopulator
Issue: SPR-9531
2014-03-13 13:45:05 +01:00
Sam Brannen 2bfd6ddcf4 Refactor SQL script support
This commit continues the work in the previous commit as follows:

 - Introduced an exception hierarchy for exceptions related to SQL
   scripts, with ScriptException as the base.

 - CannotReadScriptException and ScriptStatementFailedException now
   extend ScriptException.

 - Introduced ScriptParseException, used by ScriptUtils.splitSqlScript().

 - DatabasePopulatorUtils.execute() now explicitly throws a
   DataAccessException.

 - Polished Javadoc in ResourceDatabasePopulator.

 - Overhauled Javadoc in ScriptUtils and documented all constants.

 - Added missing @author tags for original authors in ScriptUtils and
   ScriptUtilsTests.

 - ScriptUtils.splitSqlScript() now asserts preconditions.

 - Deleted superfluous methods in ScriptUtils and changed method
   visibility to private or package private as appropriate.

 - Deleted the ScriptStatementExecutor introduced in the previous
   commit; ScriptUtils.executeSqlScript() now accepts a JDBC Connection;
   JdbcTestUtils, AbstractTransactionalJUnit4SpringContextTests, and
   AbstractTransactionalTestNGSpringContextTests now use
   DatabasePopulatorUtils to execute a ResourceDatabasePopulator instead
   of executing a script directly via ScriptUtils.

 - Introduced JdbcTestUtilsIntegrationTests.

Issue: SPR-9531
2014-03-13 12:00:01 +01:00
cbaldwin74 e5c17560db Support multi-line comments in SQL scripts
Prior to this commit neither ResourceDatabasePopulator nor
JdbcTestUtils properly supported multi-line comments (e.g., /* ... */).
Secondarily there has developed a significant amount of code
duplication in these two classes that has led to maintenance issues
over the years.

This commit addresses these issues as follows:

 - Common code has been extracted from ResourceDatabasePopulator and
   JdbcTestUtils and moved to a new ScriptUtils class in the
   spring-jdbc module.

 - Relevant test cases have been migrated from JdbcTestUtilsTests to
   ScriptUtilsTests.

 - ScriptUtils.splitSqlScript() has been modified to ignore multi-line
   comments in scripts during processing.

 - ResourceDatabasePopulator supports configuration of the start and end
   delimiters for multi-line (block) comments.

 - A new test case was added to ScriptUtilsTests for the new multi-line
   comment support.

Issue: SPR-9531
2014-03-13 10:51:08 +01:00
Juergen Hoeller 473061ec1e Added explicit note on thread safety to JdbcTemplate variants
Issue: SPR-11478
2014-02-28 19:00:31 +01:00
Juergen Hoeller cead06a3d9 Polishing 2014-02-12 00:12:52 +01:00
Sam Brannen c335e99e3f Remove trailing whitespace from source code 2014-02-08 17:30:39 +01:00
Juergen Hoeller 8c0e3040c2 Polishing 2014-02-07 18:06:13 +01:00
Juergen Hoeller 749b65b0b2 Polishing 2014-02-07 17:42:37 +01:00
Juergen Hoeller 8a6b095204 Polishing
Issue: SPR-11386
2014-02-04 17:41:42 +01:00
Juergen Hoeller 60c1905cdd Introduced "spring.jdbc.getParameterType.ignore" property
Issue: SPR-11386
2014-02-04 16:44:08 +01:00
Sam Brannen b8ed2f4967 Ensure all tests are executed in the Gradle build
Prior to this commit several test classes named "*Test" were not
recognized as tests by the Gradle build. This is due to the configured
inclusion of '**/*Tests.*' which follows Spring's naming convention for
test classes.

This commit addresses this issue by:

 - Renaming real test classes consistently to "*Tests".
 - Renaming internal test classes to "*TestCase".
 - Renaming @WebTest to @WebTestStereotype.
 - Disabling broken tests in AnnoDrivenStaticEntityMockingControlTest.
 - Modifying the Gradle build configuration so that classes ending in
   either "*Tests" or "*Test" are considered test classes.

Issue: SPR-11384
2014-02-03 23:16:47 +01:00
Sam Brannen 8c3868a8dd Polish Javadoc for EmbeddedDatabaseFactory 2014-01-31 13:33:55 +01:00
Juergen Hoeller c2303854d1 Polishing
Issue: SPR-11372
2014-01-31 13:17:55 +01:00
Juergen Hoeller e3017c30bb ResourceDatabasePopulator's setScripts takes varargs 2013-12-23 22:00:30 +01:00
Juergen Hoeller d032c20a54 Polishing
Issue: SPR-10469
2013-12-23 21:59:21 +01:00
Juergen Hoeller b4d6e27fb3 Upgraded embedded Derby support to 10.6+ and build to 10.10
Issue: SPR-10469
2013-12-23 21:58:42 +01:00
Juergen Hoeller 74c679eb2f Polishing 2013-12-17 18:21:04 +01:00
Juergen Hoeller 3ff3805ed6 Fixed extractOutputParameters to properly extract ResultSet in all cases
Issue: SPR-11076
2013-12-11 12:28:54 +01:00
Juergen Hoeller 2d2226baf6 Added 546 to Sybase data integrity violation codes
Issue: SPR-11097
2013-12-11 12:01:53 +01:00
Juergen Hoeller be63c07b2e Polishing 2013-12-10 13:26:52 +01:00
Juergen Hoeller 4c8a7899f2 Optimized use of JDBC 3.0 ParameterMetaData.getParameterType, caching information about drivers which do not support that feature
Issue: SPR-11100
2013-12-10 01:38:57 +01:00
Phillip Webb 043a41e382 Consistent whitespace after imports
Update code to have a consistent number of new-line characters after
import statements.
2013-11-26 15:14:43 -08:00
Juergen Hoeller 1e6f2e79b9 Adapted getXmlAsSource implementation to avoid compilation failure in IntelliJ IDEA 2013-11-26 01:41:54 +01:00
Eric Dahl e9f78f6043 Fix various typos
Fix a variety of typos throughout the project, primarily in
comments (javadoc or otherwise) but also in a handful of log messages
and a couple exception messages.

ISSUE: SPR-11123
2013-11-25 15:58:27 -08:00
Phillip Webb 59002f2456 Fix remaining compiler warnings
Fix remaining Java compiler warnings, mainly around missing
generics or deprecated code.

Also add the `-Werror` compiler option to ensure that any future
warnings will fail the build.

Issue: SPR-11064
2013-11-25 12:52:42 -08:00
Phillip Webb d9c4470461 Upgrade to HSQLDB 2.3.1
Replace `hsqldb:hsqldb:1.8.0.10` with `org.hsqldb:hsqldb:2.3.1` and
fix breaking tests.

Issue: SPR-10947
2013-11-21 15:48:17 -08:00
Alex Yursha 6a1ca41cb7 Put accidentally deleted LF in place 2013-11-09 01:57:27 +03:00
Alex Yursha 6900645d59 Fix a typo in package description 2013-11-09 01:26:59 +03:00
Juergen Hoeller 13ed423387 Polished exception messages
Issue: SPR-11042
2013-11-01 23:07:50 +01:00
Juergen Hoeller 1dc7ff8604 Avoid unnecessary char[] allocation in NamedParameterUtils
Issue: SPR-11042
2013-11-01 22:38:55 +01:00
Sam Brannen 7ca09d7e3d Polish NamedParameterUtils
- Fixed typos in Javadoc
- Formatted Javadoc
2013-10-29 23:44:53 +01:00
Juergen Hoeller c38bde259a Polishing
Issue: SPR-10185
2013-10-16 01:51:48 +02:00
Juergen Hoeller 41f041e6ae Reduced "getParameterType call not supported" log message to single line
Issue: SPR-10185
2013-10-14 23:31:53 +02:00
Juergen Hoeller 52cca48f40 Polishing 2013-10-04 22:53:49 +02:00
Juergen Hoeller d9b620381e Removed S0 from BadSqlGrammarException codes
S0 doesn't seem to be universally used for SQL grammar problems: see MS SQL Server's RAISERROR. This was reported years back; not sure why the fix didn't actually appear in the codebase back then.

Issue: SPR-10902
2013-09-25 12:30:01 +02:00
Fedor Bobin dac6aaecc8 Allow cursor returns from SQL functions
Update CallMetaDataContext to use the metaDataProvider
createDefaultOutParameter method when creating a SqlOutParameter as
a result of a SQL function call.

This change allows Spring to support Oracle cursor types when returned
from functions.

Issue: SPR-10606
2013-09-24 16:18:09 -07:00
Juergen Hoeller 88115212eb Consistent xsd header formatting 2013-08-22 19:37:42 +02:00
Juergen Hoeller 3d462b6dd9 Added missing spring.schemas entries for 4.0 xsds
Also fixing an old XmlBeanFactory test that relies on "ref local" which is gone in the 4.0 xsd now, redeclaring the affected file to an older xsd version.
2013-08-22 19:36:53 +02:00
Juergen Hoeller eb98f1f084 Added missing spring-jdbc-4.0.xsd 2013-08-22 19:33:01 +02:00
Grzegorz Rożniecki 2344412e04 Fix SimpleJdbcCall and SimpleJdbcInsert Javadoc
Change "fluid" interface to "fluent" and "string" to "chain", plus fix
few typos in Javadoc.

Issue: SPR-10792
2013-08-06 14:42:49 -07:00
Juergen Hoeller 2e4eb9fc10 Resource-based PlatformTransactionManager implementations defensively catch Throwable in doBegin in order to reliably close resource in case of OutOfMemoryError
Issue: SPR-10755
2013-07-24 15:29:10 +02:00
Phillip Webb 6a3a361376 Include specific SQL statements in batch exception
Refine the SQL statements contained in exceptions thrown from batch
updates based on BatchUpdateException.getUpdateCounts().

Issue: SPR-10677
2013-06-25 23:14:49 -07:00
Phillip Webb 2abec6fd90 Include all SQL statements in batch fail exception
Ensure any exception from calls to batchUpdate, on databases that
support batch operations, contains all the SQL statements. Prior to this
commit only the last SQL statement would be returned with the exception.

Issue: SPR-10677
2013-06-25 14:50:24 -07:00
Juergen Hoeller c8b071c89e Fixed BeanPropertyRowMapper to only prefix actual upper-case letters with underscores
Issue: SPR-10547
2013-05-16 14:33:15 +02:00
Rob Winch 9468548116 Add @Override to remaining source files
Issue: SPR-10130
2013-05-13 17:04:56 -05:00
Juergen Hoeller 2a44228b98 Consistent use of <pre class="code">
Issue: SPR-8108
2013-05-07 21:31:26 +02:00
Juergen Hoeller 0a8f5b2919 Removed deprecated helper classes and methods (that have been deprecated since 3.0 or before) 2013-05-02 17:25:10 +02:00
Phillip Webb 761bd9fd56 Merge branch '3.2.x'
* 3.2.x:
  Update javadoc external links
  JdbcTemplate etc
  Removed unnecessary default value of LifecycleGroup.lifecycleBeans
  Introduced public ArgumentPreparedStatementSetter and ArgumentTypePreparedStatementSetter classes
  Defensively uses JDBC 3.0 getParameterType call for Oracle driver compatibility
  Preparations for 3.2.3
  Fixed ReflectiveMethodResolver to avoid potential UnsupportedOperationException on sort
  Fixed Jaxb2Marshaller's partial unmarshalling feature to consistently apply to all sources
  Update copyright year in reference documentation

Conflicts:
	build.gradle
	gradle.properties
	spring-context/src/main/java/org/springframework/context/support/DefaultLifecycleProcessor.java
	spring-jdbc/src/main/java/org/springframework/jdbc/core/ArgumentPreparedStatementSetter.java
	spring-jdbc/src/main/java/org/springframework/jdbc/core/ArgumentTypePreparedStatementSetter.java
2013-04-13 09:39:09 -07:00
Juergen Hoeller 9c52ae9558 Removed OC4J support (including documentation references) 2013-03-19 14:53:26 +01:00
Juergen Hoeller 87e5f19c3f JDK 1.6+ API baseline across the codebase 2013-03-19 13:10:25 +01:00
Juergen Hoeller cc4f1328ee Introduced public ArgumentPreparedStatementSetter and ArgumentTypePreparedStatementSetter classes
Issue: SPR-10375
2013-03-19 11:28:25 +01:00
Juergen Hoeller 6b4c29cd24 Defensively uses JDBC 3.0 getParameterType call for Oracle driver compatibility
Issue: SPR-10385
2013-03-19 11:14:33 +01:00
Phillip Webb 4e1cab28df Merge branch '3.2.x'
* 3.2.x: (28 commits)
  Hide 'doc' changes from jdiff reports
  Document @Bean 'lite' mode vs @Configuration
  Final preparations for 3.2.2
  Remove Tiles 3 configuration method
  Polishing
  Extracted buildRequestAttributes template method from FrameworkServlet
  Added "beforeExistingAdvisors" flag to AbstractAdvisingBeanPostProcessor
  Minor refinements along the way of researching static CGLIB callbacks
  Compare Kind references before checking log levels
  Polish Javadoc in RequestAttributes
  Fix copy-n-paste errors in NativeWebRequest
  Fix issue with restoring included attributes
  Add additional test for daylight savings glitch
  Document context hierarchy support in the TCF
  Fix test for daylight savings glitch
  Make the methodParameter field of HandlerMethod final
  Disable AsyncTests in spring-test-mvc
  Reformat the testing chapter
  Document context hierarchy support in the TCF
  Document context hierarchy support in the TCF
  ...
2013-03-13 14:01:46 -07:00
Phillip Webb 05765d7520 Replace EasyMock with Mockito
Issue: SPR-10126
2013-03-06 11:06:15 -08:00
Chris Beams ce4be3b46b Merge branch '3.2.x' into master
Conflicts:
	gradle.properties
	spring-beans/src/main/java/org/springframework/beans/factory/support/StaticListableBeanFactory.java
	spring-context-support/src/main/java/org/springframework/cache/ehcache/EhCacheManagerFactoryBean.java
	spring-core/src/main/java/org/springframework/core/convert/support/StringToEnumConverterFactory.java
	spring-core/src/main/java/org/springframework/core/env/ReadOnlySystemAttributesMap.java
	spring-jdbc/src/main/java/org/springframework/jdbc/datasource/LazyConnectionDataSourceProxy.java
	spring-jdbc/src/main/java/org/springframework/jdbc/support/lob/AbstractLobHandler.java
	spring-web/src/main/java/org/springframework/http/client/BufferingClientHttpRequestWrapper.java
	spring-web/src/main/java/org/springframework/http/client/SimpleBufferingClientHttpRequest.java
	spring-web/src/main/java/org/springframework/http/converter/BufferedImageHttpMessageConverter.java
	spring-web/src/main/java/org/springframework/http/converter/FormHttpMessageConverter.java
2013-03-04 15:41:15 +01:00
Juergen Hoeller d3c0dd1c7e Minor javadoc updates 2013-03-01 21:55:01 +01:00
Juergen Hoeller 99c7f25b05 Deprecated OracleLobHandler in favor of DefaultLobHandler for the Oracle 10g driver and higher
Issue: SPR-10339
2013-03-01 21:55:00 +01:00
Juergen Hoeller 2bd584ca75 Added "createTemporaryLob" flag to DefaultLobHandler, using JDBC 4.0's createBlob/Clob mechanism
Issue: SPR-10339
2013-03-01 21:54:59 +01:00
Juergen Hoeller 6a043e3ea1 Mentioning JDBC 4's unwrap method for obtaining the native connection now 2013-03-01 16:05:27 +01:00
Juergen Hoeller 1716c171d8 LazyConnectionDataSourceProxy catches setReadOnly exception analogous to DataSourceUtils
Also mentioning JDBC 4's unwrap method for obtaining the native connection now.

Issue: SPR-10312
2013-03-01 16:04:10 +01:00
Carson McDonald 6a45d5bfb0 Minor changes to fix typos 2013-02-21 10:37:51 -08:00
Juergen Hoeller acffcdaa01 Polished *JdbcCall/Insert classes 2013-02-15 18:23:10 +01:00
Juergen Hoeller c1c27e7142 Deprecated JdbcTemplate's queryForInt/Long operations in favor of queryForObject (following NamedParameterJdbcTemplate)
Issue: SPR-10257
2013-02-09 17:06:30 +01:00
Juergen Hoeller 3fa6723748 Added useful query variants without parameters to NamedParameterJdbcTemplate, for convenience in DAOs
Also deprecated NamedParameterJdbcTemplate's queryForInt/Long operations in favor of queryForObject.

Issue: SPR-10256
Issue: SPR-10257
2013-02-09 16:59:38 +01:00
Juergen Hoeller 8a4ce142c4 SQLErrorCodeSQLExceptionTranslator tries to find SQLException with actual error code, looping through the causes.
Issue: SPR-10260
2013-02-06 21:32:42 +01:00
Phillip Webb f464a45ba4 Polish formatting
Minor formatting polish across that codebase. Primarily fixing
whitespace issues.
2013-02-04 10:35:25 -08:00
Phillip Webb d89e30b864 Fix unnecessary @SupressWarnings annotations 2013-01-29 15:37:25 -08:00
Phillip Webb 065b1c0e46 Fix unused local variable warnings 2013-01-25 14:35:19 -08:00
Phillip Webb 6a1e841952 Fix unused type compiler warnings 2013-01-25 14:35:07 -08:00
Juergen Hoeller 0dcc0f2227 Added further MySQL error code for DataIntegrityViolationException
Issue: SPR-9237
2013-01-23 22:00:33 +01:00
Juergen Hoeller 5d9ad5b1d1 AbstractDriverBasedDataSource does not rely on Properties chaining anymore
Issue: SPR-9461
2013-01-18 19:07:30 +01:00
Juergen Hoeller 20c4ba40d8 AbstractDriverBasedDataSource does not rely on Properties chaining anymore
Issue: SPR-9461
2013-01-18 14:02:13 +01:00
Juergen Hoeller f0a1ff2d76 JDBC parameter binding uses JDBC 3.0 ParameterMetaData (if available) for type determination
Forward-ported from 3.1.2, with minor modifications for defensiveness against the JDBC driver.

Issue: SPR-10084
2013-01-11 21:55:57 +01:00
Chris Beams 15e9fe638c Remove duplicate test resources
The files deleted in this commit existed in identical form in two places
within a given module; typically in src/test/java and
src/test/resources. The version within src/test/resources has been
favored in all cases.

This change was prompted by associated Eclipse warnings, which have now
been quelled.

Issue: SPR-9431
2013-01-04 11:38:58 +01:00
Chris Beams 51b307681a Fix warnings due to unused import statements
Issue: SPR-9431
2013-01-04 11:04:54 +01:00
Chris Beams b836e14b5f Merge branch 'cleanup-test-duplicates' into cleanup-3.2.x
* cleanup-test-duplicates:
  Update Apache license headers for affected sources
  Remove duplicate test classes
  Replace test beans with test objects

Conflicts:
	spring-beans/src/test/java/org/springframework/beans/factory/ConcurrentBeanFactoryTests.java
	spring-beans/src/test/java/org/springframework/beans/support/PagedListHolderTests.java
2013-01-04 10:31:31 +01:00
Phillip Webb 42b5d6dd7e Remove duplicate test classes
Prior to this commit many test utility classes and sample beans were
duplicated across projects. This was previously necessary due to the
fact that dependent test sources were not shared during a gradle
build. Since the introduction of the 'test-source-set-dependencies'
gradle plugin this is no longer the case.

This commit attempts to remove as much duplicate code as possible,
co-locating test utilities and beans in the most suitable project.
For example, test beans are now located in the 'spring-beans'
project.

Some of the duplicated code had started to drift apart when
modifications made in one project where not ported to others. All
changes have now been consolidated and when necessary existing tests
have been refactored to account for the differences.

Conflicts:
	spring-beans/src/test/java/org/springframework/beans/factory/ConcurrentBeanFactoryTests.java
	spring-beans/src/test/java/org/springframework/beans/factory/support/BeanFactoryGenericsTests.java
	spring-beans/src/test/java/org/springframework/beans/support/PagedListHolderTests.java
2013-01-04 10:02:29 +01:00
Chris Beams 7a737bebdd Merge branch '3.2.x' into master
* 3.2.x:
  Fix ClassCastException when setting media types
  Enable execution of TestNG tests in spring-test
  Polish support for topic branch-specific versions
  Segregate add'l long-running and performance tests
  Eliminate EBR dependencies and repository config
  Skip creation of IDEA metadata for spring-aspects
  Fix Eclipse compilation error in Gradle plugin
  Polish build.gradle
  Fix null parameterName issue in content negotiation
  Recursively add test dependencies
2013-01-03 22:31:52 +01:00
Chris Beams 68e3b7773c Segregate add'l long-running and performance tests
- Add TestGroup#LONG_RUNNING to distinguish from #PERFORMANCE, the
   former being tests that simply take a long time vs the latter being
   tests that are actually dependent on certain actions happening within
   a given time window and are thefore CPU-dependent.

Issue: SPR-9984
2013-01-03 19:28:05 +01:00
Chris Beams 961dbdb68a Merge branch '3.2.x' into master
* 3.2.x:
  Exclude spring-build-src from maven publish
  Move spring-build-junit into spring-core
  Relocate MergePlugin package
  Develop a gradle plugin to add test dependencies
  Expose Gradle buildSrc for IDE support
  Fix [deprecation] compiler warnings
  Upgrade to xmlunit version 1.3
  Improve 'build' folder ignores
  Fix regression in static setter method support
  Fix SpEL JavaBean compliance for setters

Conflicts:
	spring-beans/src/test/java/org/springframework/beans/ExtendedBeanInfoTests.java
2013-01-02 10:36:57 +01:00
Chris Beams 70eaf02b7f Revert "Merge branch 'SPR-10130' into cleanup-master"
This reverts commit 45fa50821a, reversing
changes made to a312d900f8.
2013-01-02 10:33:59 +01:00
Phillip Webb 65fb26f847 Move spring-build-junit into spring-core
Move code from spring-build-junit into spring-core/src/test along with
several other test utility classes. This commit removes the temporary
spring-build-junit project introduced in commit
b083bbdec7.
2013-01-01 19:49:45 -08:00
Phillip Webb 6626a38730 Fix [deprecation] compiler warnings
Fix deprecation compiler warnings by refactoring code or applying
@SuppressWarnings("deprecation") annotations. JUnit tests of
internally deprecated classes are now themselves marked as
@Deprecated.

Numerous EasyMock deprecation warnings will remain until the
migration to mockito can be completed.
2013-01-01 13:42:15 -08:00
Chris Beams b2a048b6f3 Update Apache license headers for affected sources 2012-12-28 23:57:33 +01:00
Chris Beams 3b40ce76bf Add @Override annotations to main sources
Issue: SPR-10130
2012-12-28 23:53:24 +01:00
Chris Beams 8472a2b2ab Update Apache license headers for affected sources 2012-12-28 23:09:31 +01:00
Phillip Webb d66c733ef4 Replace EasyMock with Mockito in test sources
Issue: SPR-10126
2012-12-28 23:07:04 +01:00
Chris Beams 4c8cd7b0bd Add @Override annotations to test sources
Issue: SPR-10129
2012-12-28 23:05:44 +01:00
Chris Beams 4c7cafbde6 Fix "unnecessary @SuppressWarnings" warnings 2012-12-28 22:50:46 +01:00
Phillip Webb 6c14eaad61 Fix [cast] compiler warnings 2012-12-28 22:41:06 +01:00
Phillip Webb b0986049a3 Fix [serial] compiler warnings
Fix serialization warnings by applying @SuppressWarnings("serial")
when appropriate.

In certain cases and for unknown reasons, a correctly-placed
@SuppressWarnings("serial") annotation will fix the warning at the
javac level (i.e. the Gradle command-line), but will produce an
"unnecessary @SuppressWarnings" warning within Eclipse. In these
cases, a private static final serialVersionUID field has been added
with the default value of 1L.
2012-12-28 22:41:06 +01:00
Phillip Webb 731d5be644 Fix warnings due to unused import statements 2012-12-28 22:40:49 +01:00
Chris Beams 9540d2c81b Replace <code> with {@code} throughout Javadoc
Issue: SPR-10128
2012-12-28 22:36:02 +01:00
Chris Beams 8597ec25ec Fix various Javadoc warnings
Issue: SPR-10128
2012-12-28 22:36:02 +01:00
Phillip Webb 2cf45bad86 Replace space indentation with tabs
Issue: SPR-10127
2012-12-28 20:49:56 +01:00
Phillip Webb 1762157ad1 Remove trailing whitespace in source files
find . -type f -name "*.java" -or -name "*.aj" | \
    xargs perl -p -i -e "s/[ \t]*$//g" {} \;

Issue: SPR-10127
2012-12-28 20:49:45 +01:00
Juergen Hoeller 6e8117c627 Polishing along with backports to 3.1.4 2012-12-12 23:39:23 +01:00
Chris Beams f26534700a Eliminate all Javadoc warnings
- Support external Javadoc links using Gradle's javadoc.options.links

 - Fix all other Javadoc warnings, such as typos, references to
   non-existent (or no longer existent) types and members, etc,
   including changes related to the Quartz 2.0 upgrade (SPR-8275) and
   adding the HTTP PATCH method (SPR-7985).

 - Suppress all output for project-level `javadoc` tasks in order to
   hide false-negative warnings about cross-module @see and @link
   references (e.g. spring-core having a @see reference to spring-web).
   Use the `--info` (-i) flag to gradle at any time to see project-level
   javadoc warnings without running the entire `api` task. e.g.
   `gradle :spring-core:javadoc -i`

 - Favor root project level `api` task for detection of legitimate
   Javadoc warnings. There are now zero Javadoc warnings across the
   entirety of spring-framework. Goal: keep it that way.

 - Remove all @link and @see references to types and members that exist
   only in Servlet <= 2.5 and Hibernate <= 4.0, favoring 3.0+ and 4.0+
   respectively. This is necessary because only one version of each of
   these dependencies can be present on the global `api` javadoc task's
   classpath. To that end, the `api` task classpath has now been
   customized to ensure that the Servlet 3 API and Hibernate Core 4 jars
   have precedence.

 - SPR-8896 replaced our dependency on aspectjrt with a dependency on
   aspectjweaver, which is fine from a POM point of view, but causes
   a spurious warning to be emitted from the ant iajc task that it
   "cannot find aspectjrt on the classpath" - even though aspectjweaver
   is perfectly sufficient. In the name of keeping the console quiet, a
   new `rt` configuration has been added, and aspectjrt added as a
   dependency to it. In turn, configurations.rt.asPath is appended to
   the iajc classpath during both compileJava and compileTestJava for
   spring-aspects.

Issue: SPR-10078, SPR-8275, SPR-7985, SPR-8896
2012-12-12 12:55:10 +01:00
Sam Brannen aa16caa2ac Support comments in statements in RDbPopulator
Prior to this commit, executing an SQL script via
ResourceDatabasePopulator would fail if a statement in the script
contained a line comment within the statement.

This commit ensures that standard SQL comments (i.e., any text beginning
with two hyphens and extending to the end of the line) are properly
omitted from the statement before executing it.

In addition, multiple adjacent whitespace characters within a statement,
but outside a literal, are now collapsed into a single space.

Issue: SPR-10075
2012-12-05 17:41:24 +01:00
Juergen Hoeller 9e337d2705 Avoid a hard dependency on Sun's CachedRowSetImpl class
Also using the JDBC 4.1 RowSetProvider API directly instead of going through reflection, since we're building on JDK 7 now.
2012-11-25 22:20:25 +01:00
Juergen Hoeller ea95da126a Implement java.io.Closeable where appropriate
Issue: SPR-9962
2012-11-08 23:44:49 +01:00
Juergen Hoeller d6e1a4a26a LocalDataSourceConnectionProvider checks against SmartDataSource before closing a Connection
Issue: SPR-9978
2012-11-08 23:37:14 +01:00
Eric Weinberg 33abee2db2 Ensure LineNumberReader is always closed
Wrap ResourceDatabasePopulator.readScript() code in a try/finally
block to ensure that the LineNumberReader is always closed.

Issue: SPR-9912
2012-11-05 15:41:28 -08:00
Phillip Webb 073b627f4e Polish ResourceDatabasePopulator 2012-11-05 15:22:11 -08:00
Chris Beams 74e86fe52f Support SQL exception translation for MSSQL 209
SQL Server error 209 [1] will now raise a BadSqlGrammarException.

[1]: http://www.sql-server-helper.com/error-messages/msg-1-500.aspx

Issue: SPR-9946
2012-11-02 14:18:37 +01:00
Sam Brannen c79c4c6e25 Fix typos and suppress warnings in JdbcTemplate 2012-10-28 15:43:16 +01:00
Chris Beams 8a38891e15 Update Apache license header date
Issue: SPR-9853
2012-10-25 09:21:27 +02:00
Phillip Webb 91f6123167 Support SQL exception translation for ORA-06550
Oracle error ORA-06550 will now raise a BadSqlGrammarException.

Issue: SPR-9853
2012-10-24 10:39:11 -07:00
Phillip Webb ba5a148d8d Polish whitespace 2012-10-24 10:37:02 -07:00
Sam Brannen 4aaf014cc6 Support comments in SQL scripts in JdbcTestUtils
Prior to this commit, utility methods in JdbcTestUtils interpreted SQL
comments as separate statements, resulting in an exception when such a
script is executed.

This commit addresses this issue by introducing a
readScript(lineNumberReader, String) method that accepts a comment
prefix. Comment lines are therefore no longer returned in the parsed
script. Furthermore, the existing readScript(lineNumberReader) method
now delegates to this new readScript() method, supplying "--" as the
default comment prefix.

Issue: SPR-9593
2012-10-22 00:52:01 -04:00
Phillip Webb 1858ef10ff Tests for DelegatingDataSource Wrappers 2012-10-10 15:49:03 -07:00
Juergen Hoeller 92a92b7937 Minor changes along with 3.1.3 backport
Issue: SPR-9781
Issue: SPR-9784
2012-10-10 23:34:23 +02:00
Juergen Hoeller 9ff640a95d AbstractRoutingDataSource consistently implements JDBC 4.0's Wrapper interface as well
Issue: SPR-9856
2012-10-10 14:28:52 +02:00
Oliver Gierke 3fb3b7d67a Work around JDK7 String#substring performance regression
String#substring has become significantly slower as of JDK 1.7.0_06 [1],
such that there are performance degradations by a factor of 100-1000 in
ResourceDatabasePopulator, especially for large SQL files.

This commit works around this problem by minimizing the substring scope
to the least amount possible to prevent unnecessary internal copying of
strings (which seems to cause the issue).

[1]: http://mail.openjdk.java.net/pipermail/core-libs-dev/2012-May/010257.html

Issue: SPR-9781
2012-09-11 15:06:40 +02:00
Juergen Hoeller a90f25668b Spring-backed DataSources consistently implement JDBC 4.0's Wrapper interface
Issue: SPR-9770
2012-09-10 15:14:12 +02:00
Sam Brannen c795c1b362 Polishing 2012-09-08 18:16:33 +02:00
Juergen Hoeller 780a259c70 re-added JDBC 4.1 getParentLogger method 2012-09-04 22:10:00 +02:00
Juergen Hoeller 7ff30d0043 Sybase lock wait timeout error code missing
Issue: SPR-9681
2012-08-29 22:00:25 +02:00
Sam Brannen 027e49c58a Document default scripts for embedded databases
The reference manual currently documents the wrong file name for the
default data SQL script used by EmbeddedDatabaseBuilder. In addition,
the testing chapter of the reference manual does not link to the testing
section of the JDBC chapter.

 - Updated the "Testing data access logic with an embedded database"
   section of the reference manual appropriately.
 - Added a new paragraph to the "JDBC Testing Support" section of the
   testing chapter which cross references the "Testing data access logic
   with an embedded database" section.

Issue: SPR-9467
2012-06-19 20:48:07 +02:00
Oliver Gierke 49c9a2a915 Use transactional connection during db population
Previously, DatabasePopulatorUtils#execute looked up a Connection from
the given DataSource directly which resulted in the executed statements
not being executed against a transactional connection (if any) which in
turn resulted in the statements executed by the populator potentially
not being rolled back.

Now DataSourceUtils#getConnection is used to transparently take part in
any active transaction and #releaseConnection is used to ensure the
connection is closed if appropriate.

Issue: SPR-9457
2012-06-04 16:36:45 +02:00
Chris Beams f3bcb6e2e4 Update spring.schemas to reflect 3.2 schemas
Commit 180c5b2ef6 introduced 3.2 versions
of all spring-* schemas; this commit updates spring.schemas mapping
files to include these new versions.
2012-05-18 14:31:33 +03:00
Philippe Marschall 13239a0c3d Fix compiler warnings
This patch fixes several compiler warnings that do not point to code
problems. Two kinds of warnings are fixed. First in a lot of cases
@SuppressWarnings("unchecked") is used although there are no unchecked
casts happening. This seems to be a leftover from when the code base
was on Java 1.4, now that the code base was moved to Java 1.5 these are
no longer necessary. Secondly there some places where the raw types of
List and Class are used where there wildcard types (List<?> and
Class<?>) would work just as well without causing any raw type warnings.

These changes are beneficial particularly when working in Eclipse or
other IDEs because it reduces 'noise', helping to isolate actual
potential problems in the code.

The following changes have been made:

 - remove @SuppressWarnings where no longer needed

 - use wildcard types instead of raw types where possible
2012-05-17 14:32:34 +03:00
Chris Beams 2db4e15f0e Translate SQLTimeoutException to QueryTimeoutException
SPR-7680 added QueryTimeoutException to Spring's DataAccessException
hierarchy, but did not integrate it into the
SQLExceptionSubclassTranslator; it was added mainly to accomodate users
defining their own custom exception translators.

However, it does make sense to translate any SQLTimeoutException to this
new QueryTimeoutException type, and this commit makes that change. It
does represent a slight backward-incompatibility, given that
QueryTimeoutException extends TransientDataAccessException, whereas
SQLExceptionSubclassTranslator previously returned the more specific
TransientDataAccessResourceException for any SQLTimeoutException.

It is expected that this incompatibily will be very low-impact, i.e. not
affecting many (if any) users. In any case, a major release (Spring 3.2)
is the right time to introduce such a change, and the migration path is
straightforward: any users depending on catching
TransientDataAccessResourceException in the case of query timeouts
should update those catch blocks to expect QueryTimeoutException
instead. Care should also be taken to ensure correctness of existing
catch blocks expecting TransientDataAccessException, as these blocks
will now catch QueryTimeoutException as well.

Issue: SPR-9376, SPR-7680
2012-05-15 22:51:45 +03:00
Stevo Slavic effb762558 Fix javadoc warnings
Before this change there were numerous javadoc warnings being reported
while building Spring framework API.

This commit resolves most of the javadoc warnings, reducing the total
number from 265 to 103.

Issue: SPR-9113
2012-04-30 11:31:02 +03:00
Chris Beams 180c5b2ef6 Introduce 3.2 versions of Spring XML namespaces
Copy spring-*-3.1.xsd => spring-*-3.2.xsd; this commit introduces no
substantive changes, but rather prepares for them by creating a clean
baseline. All internal references to 3.1 schemas (e.g. spring-tool) have
also been updated.
2012-03-26 20:06:06 +03:00
Chris Beams b2291ff814 Map ORA-30006 to CannotAcquireLockException as well
ORA-00054 is already mapped to CannotAcquireLockException and is
described as

  "resource busy and acquire with NOWAIT specified"

As pointed out in the associated JIRA issue, ORA-30006 is quite similar
being described as

  "resource busy; acquire with WAIT timeout expired"

This commit maps ORA-30006 to CannotAcquireLockException as well.

Issue: SPR-9141
2012-02-21 11:46:42 +01:00
Chris Beams 3e81482760 Sync with 3.1.x
* 3.1.x:
  Demonstrate use of @Configuration as meta-annotation
  Prune dead code from JmsTransactionManager#doBegin
  Apply @Configuration BeanNameGenerator consistently
  Improve @Configuration bean name discovery
  Fix infinite recursion bug in nested @Configuration
  Polish static imports
  Minor fix in ServletResponseMethodArgumentResolver
  extracted ResourceUtils.useCachesIfNecessary(URLConnection) method (SP
  prepared for 3.1.1 release
  CustomSQLExceptionTranslatorRegistry/Registrar etc
  revised CustomSQLExceptionTranslatorRegistry/Registrar method naming
  use custom InputStream traversal instead of a full byte array (SPR-911
  PathMatchingResourcePatternResolver preserves caching for JNLP jar con
  Resource "contentLength()" implementations work with OSGi bundle resou
  fixed MethodInvokingJobDetailFactoryBean for compatibility with Quartz
  fixed MethodInvokingJobDetailFactoryBean for compatibility with Quartz
2012-02-16 13:00:28 +01:00
Chris Beams ee36c80ca9 Sync with 3.1.x
* 3.1.x: (61 commits)
  Compensate for changes in JDK 7 Introspector
  Avoid 'type mismatch' errors in ExtendedBeanInfo
  Polish ExtendedBeanInfo and tests
  Infer AnnotationAttributes method return types
  Minor fix in MVC reference doc chapter
  Hibernate 4.1 etc
  TypeDescriptor equals implementation accepts annotations in any order
  "setBasenames" uses varargs now (for programmatic setup; SPR-9106)
  @ActiveProfiles mechanism works with @ImportResource as well (SPR-8992
  polishing
  clarified Resource's "getFilename" method to consistently return null
  substituteNamedParameters detects and unwraps SqlParameterValue object
  Replace spaces with tabs
  Consider security in ClassUtils#getMostSpecificMethod
  Adding null check for username being null.
  Improvements for registering custom SQL exception translators in app c
  SPR-7680 Adding QueryTimeoutException to the DataAccessException hiera
  Minor polish in WebMvcConfigurationSupport
  Detect overridden boolean getters in ExtendedBeanInfo
  Polish ExtendedBeanInfoTests
  ...
2012-02-13 15:17:30 +01:00
Chris Beams 6235a341a7 Remove bundlor support 2012-01-31 14:37:11 +01:00
Chris Beams 02a4473c62 Rename modules {org.springframework.*=>spring-*}
This renaming more intuitively expresses the relationship between
subprojects and the JAR artifacts they produce.

Tracking history across these renames is possible, but it requires
use of the --follow flag to `git log`, for example

    $ git log spring-aop/src/main/java/org/springframework/aop/Advisor.java

will show history up until the renaming event, where

    $ git log --follow spring-aop/src/main/java/org/springframework/aop/Advisor.java

will show history for all changes to the file, before and after the
renaming.

See http://chrisbeams.com/git-diff-across-renamed-directories
2012-01-31 14:37:10 +01:00