Actions
Sample-spring-hibernate » History » Revision 2
« Previous |
Revision 2/20
(diff)
| Next »
Henning Blohm, 18.09.2012 10:10
A sample using Hibernate and Spring on Z2¶
This sample is very similar to Sample-hibernate-basic but differs in that we use the Spring framework throughout...
- for assembly within the modules and to wire services between modules
- for declarative transaction demarcation
- for JPA entity manager injection
This sample is stored in z2-samples.spring-hibernate.
Prerequisites¶
You need the z_tx_tests database on a local MySQL database system. Start the MySQL client as the root user and run:
create database z_tx_tests;
grant all on z_tx_tests.* to tx@localhost identified by 'tx';
Run it¶
Like all samples, also this sample can be run as in How to run a sample. If you have the database, the fastest way to verify whether it runs is:
mkdir install
cd install
git clone -b master http://git.z2-environment.net/z2-base.core
git clone -b master http://git.z2-environment.net/z2-samples.spring-hibernate
# on Linux / Mac OS:
cd z2-base.core/run/bin
./gui.sh
# on Windows:
cd z2-base.core\run\bin
gui.bat
When running, go to http://localhost:8080/spring-hibernate. You should see this:
Updated by Henning Blohm about 12 years ago · 2 revisions