Skip to content

TDCY/terasoluna-tourreservation-mybatis3

 
 

Repository files navigation

Tour Reservation Sample Application

This is a reference application built completely using TERASOLUNA Server Framework for Java (5.x) (http://terasoluna.org).

This application shows how an IDEAL project configuration and package structure must be like. It also shows working sample of best practices recommended in TERASOLUNA Server Framework for Java (5.x) Development Guideline.

This sample uses MyBatis3.

  • master Build Status for master
  • 5.0.x Build Status for 5.0.x

Getting started

Download

Download source code from here. Extract the zip file at any location of choice.

Run PostgreSQL

Install and start PostgreSQL. select 'P0stgres' as password for db user or select any password of choice. Be sure to remember the password. If 'P0stgres' is not used, some changes will be required in configuration files. Hence be sure to remember it.

Run PostgreSQL

Install and start PostgreSQL.

create database 'tourreserve'.

Insert test data

It is assumed that maven is already installed. Move to the directory where the downloaded source-code is unzipped. If password of db user is set to 'P0stgres' its not required to edit any file and directly execute the below command. If it is set to any other password, then update the password in terasoluna-tourreservation-initdb/pom.xml.

Execute the below command:

$ cd terasoluna-tourreservation-initdb
$ mvn sql:execute
$ cd ..

Test data is currently available in Japanese only.

Install jars

If db user password is not set to 'P0stgres', then go to terasoluna-tourreservation-env/src/main/resources/META-INF/spring/tourreservation-infra.properties and update the password. If it is set to 'P0stgres', no changes are required.

$ mvn -f terasoluna-tourreservation-parent/pom.xml install
$ mvn -f terasoluna-tourreservation-env/pom.xml install
$ mvn -f terasoluna-tourreservation-domain/pom.xml install

Build war

$ mvn -f terasoluna-tourreservation-web/pom.xml package

Deploy war

Deploy terasoluna-tourreservation-web/target/terasoluna-tourreservation-web.war to your Application server (e.g. Tomcat7)

You can also use mvn tomcat7:run to test this application quickly with option MAVEN_OPTS=-XX:MaxPermSize=256m in environment variable.

access http://localhost:8080/terasoluna-tourreservation-web

Alternatively, these project can also be imported into Eclipse and application can be run using WTP.

Test with selenium

Install Firefox to run test.

Run test.

$ mvn -f terasoluna-tourreservation-selenium/pom.xml test

About

Sample Application (MyBatis3 version)

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Java 91.5%
  • PLpgSQL 4.4%
  • PLSQL 3.5%
  • Other 0.6%