October 2017
Intermediate to advanced
396 pages
10h 2m
English
In application development, the embedded database is very useful, because it doesn't require a separate database server that your application connects. Spring provides one more data source for embedded databases. It is not powerful enough for the production environment. We can use the embedded data source for the development and testing environment. In Spring, the jdbc namespace configures an embedded database, H2, as follows:
In XML configuration, H2 is configured as follows:
<jdbc:embedded-database id="dataSource" type="H2">
<jdbc:script location="schema.sql"/>
<jdbc:script location="data.sql"/>
</jdbc:embedded-database>
In Java configuration, H2 is configured as follows: ...
Read now
Unlock full access