freemindscafe/samples-spring
Folders and files
| Name | Name | Last commit date | ||
|---|---|---|---|---|
Repository files navigation
This repository will hold all the spring samples that we need time-to-time. Samples are in the form of test cases. Guidelines ---------------------------- - Please use spring package names so if you are adding test case for jdbc, please add your test case under com/freemindcafe/spring/jdbc. - Please create a new sample package freely. Do not try to add many test cases in a single sample package. - All the classes, ddl, dml and wiring should be referred from that package only. It is ok to have duplcate code, ddl, dml and wiring. - The individual test cases should be independent and should be able to run in isolation. Database ---------- Apache derby database is being used as a datastore. Creating an in-memory database To create an in-memory database, specify memory as the JDBC subprotocol. For example, to create an in-memory database named myDB using the embedded driver, use the following connection URL: jdbc:derby:memory:embeddedDataSource;create=true For the network client driver, use the following connection URL. Because the client driver does not understand the memory subprotocol, you must include it in the database name: jdbc:derby://myhost:1527/memory:embeddedDataSource;create=true Be careful to specify a colon (:) after memory.