Skip to content

moisko/user-accounts

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 

Repository files navigation

user-accounts

Environment

  • Java 8

  • Services Framework - Apache CXF

  • Application Server - Tomcat 8

  • Database - MySQL

  • Persistency - Eclipselink

  • Sortable Grid - jQuery DataTables

  • CSS Framework - Bootstrap 3

Setup

  • Connector/j mysql driver should be installed in $CATALINA_HOME/lib dir

  • create account_schema db schema before deploying and starting the application

  • create a user and grant permissions to account_schema

  • Edit server.xml, add the following context configuration and replace with the correct values for username and password:

<Context docBase="user-accounts" path="/user-accounts" reloadable="true" source="org.eclipse.jst.jee.server:user-accounts">
	<Resource driverClassName="com.mysql.jdbc.Driver"
		factory="org.apache.tomcat.jdbc.pool.DataSourceFactory"
		initialSize="10"
		maxActive="100"
		maxIdle="50"
		minEvictableIdleTimeMillis="55000"
		minIdle="10"
		name="jdbc/accountsDB"
		password="<password>"
		removeAbandoned="true"
		removeAbandonedTimeout="55"
		testOnBorrow="true"
		timeBetweenEvictionRunsMillis="34000"
		type="org.apache.tomcat.jdbc.pool.DataSource"
		url="jdbc:mysql://localhost:3306/account_schema"
		username="<username>"
		validationInterval="34"
		validationQuery="select 1" />
</Context>
  • copy the war file into webapps dir

REST endpoints

See accounts.controller.Accounts