Granny's Addressbook + Friends with Java + Spring MVC + PostgreSQL
As a front-end developer, I almost exclusively use VIM. I'll be attempting this as such.
Install the database.
- NOTE: You may need to setup trusted authentication for localhost. This is done by editing the pg_hba.conf file.
sudo apt-get install postgresql-9.1
- make a user called postgres and Start the postgresql server. Documentation regarding this can be found here
- Create a database called granny by following command
- Create a user/role called granny by following command
- Grant all privileges to the granny user/role by following command
GRANT ALL PRIVILEGES ON DATABASE granny to granny;
Checkout Project from git
- Install git
sudo apt-get install git
- Do a
git clone https://github.com/osintegrators/GrannyAndFriendsJPA.git
- Make sure you have maven installed, for Ubuntu users thats
apt-get install maven, and wait.
- In the new directory containing pom.xml,
mvn clean install
- This project can be deployed on any of the following
Tomcat -- which is how I'll deploy it here.
JBoss Application Server
- copy the WAR files from
dir/to/GrannyAndFriendsJPA/target/grannyandfriendsjpa.warto the tomcat webapps directory.
- If tomcat isn't running already, start it up.
- Browse to
Copyright (c) 2012 Open Software Integrators
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.