This app integrates with the twelvedata.com API to fetch daily exchange rates, manages user transactions including dates, amounts, and currencies, and monitors monthly transaction limits, sending notifications if exceeded.
It includes:
- A RESTful API endpoint for handling CRUD operations on entities.
- Integration with a MySql database for data persistence.
- Fetch currency data from https://api.twelvedata.com
- Swagger UI integration for API documentation.
Before running this application, ensure that you have the following installed:
- Java Development Kit (JDK) 8 or higher
- Maven build tool
- MySQL database server (optional, you can configure another database if needed)
-
Clone the repository:
git clone https://github.com/bolatdias/transaction-manager
-
Navigate to the project directory:
cd test
-
Build the project:
mvn clean install
-
Run the application:
java -jar target/demo-0.0.1-SNAPSHOT.jar
The application will start running on
http://localhost:8080.
You can configure the application settings by modifying the application.properties file located in the src/main/resources directory.
Example configuration:
spring.application.name=demo ## Server Properties server.port= 8080 ## Spring DATASOURCE (DataSourceAutoConfiguration & DataSourceProperties) spring.datasource.url=jdbc:mysql://localhost:3306/bank?useSSL=false&serverTimezone=UTC&useLegacyDatetimeCode=false spring.datasource.username=root spring.datasource.password=root ## Hibernate Properties # The SQL dialect makes Hibernate generate better SQL for the chosen database spring.jpa.hibernate.ddl-auto = none spring.jpa.show-sql=true spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver # Initialize the datasource with available DDL and DML scripts spring.sql.init.mode=never spring.jpa.defer-datasource-initialization= false ## App Properties app.cors.allowedOrigins = http://localhost:3000 app.service.url=https://api.twelvedata.com app.service.apiKey= ## Flyway spring.flyway.locations=classpath:db/migration spring.flyway.baseline-on-migrate=true
Swagger UI is integrated into this application for easy API documentation and testing. You can access the Swagger UI by navigating to http://localhost:8080/swagger-ui/index.html after starting the application.