Manage My Money Server - MyBatis
- Java SE 8 (JDK)
- Maven version 3.x
- PostgreSQL and postgresql93-devel (development header files and libraries)
Create a Postgres database called
Download the following files that will be used to initialize the database
Change directory to the location where you downloaded the files and initialize the database:
$ psql manage-my-money manage-my-money=# \i create-schema.sql manage-my-money=# \i load-data.sql
Open a terminal (command line) window
Clone this repo
Make sure that
src/main/resources/mybatis-config.xmlhas the correct database parameters
Run the application locally:
$ mvn spring-boot:run
To verify that the application is working correctly, point your browser to http://localhost:8080/accounts - you should see a response with a list of accounts in JSON format.
manage-my-money-mybatis/src/main/java/org/archfirst/mmm /adapter /application /domain /persisence
adapterlayer adapts interactions from the external world to the application layer. This layer contains the REST adapter that converts incoming HTTP messages to a format acceptable by the application layer.
applicationlayer coordinates high-level activities such as creation of the domain objects and asking them to perform tasks requested by the external world.
domainlayer encapsulate the state and behavior of the business domain. It consists of entities and value objects. See this article for a detailed description of the domain layer.
persistencelayer is responsible for storing and retrieving the domain objects using the persistence library called MyBatis.