site-business

site-business is the final phase of building the business logic after building business-manager-api and then business-manager.
The site-business component in the ap_predict_online repository represents a compound database and associated site data processing of a fictional company.
If you wish to build your own site-business see here.

Dependencies

  • Maven (build)
  • Java 7 or higher (build, deploy)
  • Java Servlet Container, e.g. Apache Tomcat (deploy)
  • Database (build, deploy)
  • business-manager-api and business-manager

Database choice

See also

Database choice

Initial installation

Download the project source and go to this component’s root directory (i.e. here) and follow the steps below.

  1. [ T ] Copy src/properties/sample.env.properties to src/properties/env.properties
  2. [ T ] Copy src/properties/database/site/sample.site.database.properties to src/properties/database/site/site.database.properties

Configuration

src/properties/env.properties

log.file.site_business=

Component log file location on disk, e.g. ‘logs/site-business.log’.

log.level.site_business=

Component log level, e.g. (trace|debug|info|warn|error|fatal).

log.level.general=

Log level of code from other libraries, e.g. (trace|debug|info|warn|error|fatal).

src/properties/database/site/site.database.properties

If you wish to use the embedded HSQL database then this file can have all content removed, otherwise you will need to assign the appropriate JDBC driver and user details.

Build

-Dspring.profiles.active=

Options are currently (sitedata_embedded|sitedata_mysql).

Warning

At build time it is important to use the -Dspring.profiles.active=sitedata_embedded arg because during integration testing rubbish may be written to the database so it is important to use the embedded database during this process.

Example build instructions :

cd <ap_predict_online>/site-business
mvn clean verify -Dspring.profiles.active=sitedata_embedded

Deploy

If the build command has completed successfully the webapp .war file should be in the target directory. Copy this to the servlet container’s relevant file, e.g for Tomcat, the webapps directory.

Run

See start.

Start-up problems

TODO