Just clone this project from github and start developing your application functionality without wasting time on writing configurations and library setup if you gonna use following technology stack:
Following things has been configured:
Project Done so far: A standard web application with authentication (login/logout) system and User management (create/role assignment) system has been implemented.
First clone this project from github and navigate there from your command line/terminal.
If you have gradle already installed, just run gradle build
then you will find a war file in your projects /build/libs/ folder. Deploy it in your favorite container e.g. tomcat.
If you don't have gradle installed, well, there is a awesome news for you! You don't need to download/install gradle to build this project! Here, gradle wrapper is used to make your life easier ;) All you have to do to run script, e.g. if you want to build this project, just execute following command from your terminal
./gradlew build
(from Unix)gradlew.bat build
(from Windows)This script will automatically determine your gradle installation or download & install gradle if required & then execute
the gradle task, e.g. build war file for above command. To see the list of tasks available, use ./gradlew tasks
or gradlew.bat tasks
You need to create a database named "webapp" in your local MySQL database to work with this application.
Change corresponding user credential to access database in persistence-mysql.properties
.
Note: There is a import.sql
file in classpath, which execute and insert a user 'admin' with password '123456' and proper roles
when hibernate.hbm2ddl.auto property is set to create-drop in applicationContext-jpa.xml.
Well, building project and deploying manually in app container sometimes become pain as these are repetitive work. To make
your life easier, here embedded tomcat container has been integrated. Just type gradle tomcatRunWar
from your command line
and your project will build and run automatically on a tomcat container within a minute. You just have to go http://localhost:8080/ from
your browser to see it running. Cool...right? ;)
/usr/local/tomcat7
config/catalina-jrebel.sh
in your /usr/local/tomcat7/bin
directory/usr/local/JRebel
directory./catalina-jrebel.sh run