https://github.com/christs8920/bankapp-restapi
An application for remote management of bank accounts. Made using RESTful web services.
https://github.com/christs8920/bankapp-restapi
glassfish java mysql rest-api restful-api webservices
Last synced: about 2 months ago
JSON representation
An application for remote management of bank accounts. Made using RESTful web services.
- Host: GitHub
- URL: https://github.com/christs8920/bankapp-restapi
- Owner: ChrisTs8920
- License: mit
- Created: 2023-07-30T13:17:12.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2024-08-03T10:04:51.000Z (almost 2 years ago)
- Last Synced: 2025-02-27T11:58:37.823Z (over 1 year ago)
- Topics: glassfish, java, mysql, rest-api, restful-api, webservices
- Language: Java
- Homepage:
- Size: 2.64 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Bank Application - Java RESTful API
## Description
An application for remote management of bank accounts. It was made using Java, Jakarta RESTful web services (JAX-RS API, Jersey implementation), MySQL (and JDBC API), IntelliJ IDEA Ultimate and Glassfish 6.2.4.
>**Tested using Mozilla Firefox and Postman.**
>*This project was made during my Network programming course in University.*
### The application offers the following actions
1. Create account
2. Deposit amount
3. Withdraw amount
4. Transfer to another account
5. Enable/Disable account
6. View details of an account (XML/JSON)
7. View details of all accounts (XML/JSON)
8. Delete account
>**For simplicity, we assume that the user can execute the above actions to any account simply by knowing the Account ID. (i.e without requiring any kind of authentication).**
### Endpoints
0. ```http://localhost:8080/BankApp-1.0-SNAPSHOT/``` ```//main page```
1. ```http://localhost:8080/BankApp-1.0-SNAPSHOT/addAccount.html```
2. ```http://localhost:8080/BankApp-1.0-SNAPSHOT/api/bankService/deposit/?amount=```
3. ```http://localhost:8080/BankApp-1.0-SNAPSHOT/api/bankService/withdraw/?amount=```
4. ```http://localhost:8080/BankApp-1.0-SNAPSHOT/api/bankService/transferBalance/?aid2=&amount=```
5. ```http://localhost:8080/BankApp-1.0-SNAPSHOT/api/bankService/updateAccountStatus//```
6. ```http://localhost:8080/BankApp-1.0-SNAPSHOT/api/bankService/allAccounts_json/```
```http://localhost:8080/BankApp-1.0-SNAPSHOT/api/bankService/allAccounts_xml/```
7. ```http://localhost:8080/BankApp-1.0-SNAPSHOT/api/bankService/allAccounts_json```
```http://localhost:8080/BankApp-1.0-SNAPSHOT/api/bankService/allAccounts_xml```
8. ```http://localhost:8080/BankApp-1.0-SNAPSHOT/api/bankService/delete/```
>*Where `` insert the appropriate account id, and `` insert the appropriate amount.*
>*`` is either activate or deactivate.*
### Database
The sql file creates the database **bank_accs** which contains the following table:
| aid | name | surname | contactPhone | address | accBalance | activated |
|-----|------|---------|--------------|---------|------------|-----------|
| 10 | CHRIS | TSOUCHLAKIS | 6986868969 | Street 42 | 100 | 1 |
| 11 | MARKOS | MARKOY | 6985368422 | Street 47 | 225 | 1 |
| 12 | IWANNA | IWANNOY | 6976663345 | Street 107 | 150 | 1 |
| 13 | IWANNHS | IWANNOY | 6977775569 | Street 107 | 10 | 1 |
| 14 | GIWRGOS | GIWRGOY | 6966665544 | Street 21 | 1000 | 1 |
>**The database also creates a user named 'TSOUCHLAKIS' with password '1234', with all privileges granted. This user is required for the JDBC API to connect with the database.**
## Requirements
1. Glassfish (tested on version 6.2.4) or Tomcat
2. MySQL installation
3. JDBC API (included)
4. JAX-RS API (included, also comes with Glassfish)