Spring boot Web application with REST API for getting list of transactions from DB.
-
Download the project or clone using git
git clone https://github.com/kerberos/transaction.git
-
Prepare MS SQL database. You can use Docker
a) Download the official MS SQL Server image from Docker Hub:
docker pull mcr.microsoft.com/mssql/server
b) Run a container with MS SQL Server:
docker run -e 'ACCEPT_EULA=Y' -e 'MSSQL_SA_PASSWORD=kerberos-2025' -p 1433:1433 --name sqlserver -d mcr.microsoft.com/mssql/server
(later just run existing container:
docker start sqlserver
)c) Create database
transact
-
Check
application.yaml
: property is setsql.init.mode: always
Db entities will be generated based on given path to sqlresources/sql/ta_database.sql
-
Run the TransactionAplication. After database objects are created, change prperty to
sql.init.mode: never
to skip SQL script executions for further app runs.
example request http://localhost:8080/accounts/1234567890/transactions
Access http://localhost:8080/swagger-ui.html in browser.