EasyBankApi is an API REST for Easybank's backend, a web app for bank transactions and other payments using Spring Boot 4 and Java 25.
Clone this repo to your computer:
git clone https://github.com/Juanlu3095/Easybank-API.gitMake sure you use a PostgreSQL database. This project uses it.
Create a secrets.properties file in src/main/resources with the environment variables using secrets.properties.example.
Run this command to download dependencies in pom.xml if not and the app will start:
mvnw spring-boot:run"mvnw" is used for the wrapper in case you don´t have Maven installed in your machine.
For Linux/Bash (Careful with chmod permissions!):
./mvnw spring-boot:runMust create a different PostgreSQL database than the one used for production or development. Once is done, create a file test/resources/application-test.properties with database config the same way as in main folder. The name of the database to create for testing is given here. Then, in each test class must add the annotation @ActiveProfiles("test") for telling Spring which environment to use. Use the next command to run all tests:
mvnw testFor running a specific test class:
mvnw test -Dtest=MessageTestwhere "MessageTest" is the name of the class where the individual tests are.
To run a specific test in a class:
mvnw test -Dtest=MessageTest#createMessagewhere "MessageTest" is the class name and "createMessage" is the method with @Test annotation to run.
You can compile this project with the maven command:
mvnw packageIf you need to clean the target directory, this command will delete every file in that folder and compile:
mvnw clean packageWith this, tests will be executed and if successful, the compiled .jar file will be available in target folder. To execute it:
java -jar target/easybank_api-0.0.1-SNAPSHOT.jarThis diagram shows database tables and their relationships: