diff --git a/Procfile b/Procfile
index 2d684f6..4d437d5 100644
--- a/Procfile
+++ b/Procfile
@@ -1 +1 @@
-web: java -jar -Dspring.profiles.active=prod -Dserver.port=$PORT target/financial-java-api-3.0.1-SNAPSHOT.jar
\ No newline at end of file
+web: java -jar -Dspring.profiles.active=prod -Dserver.port=$PORT target/financial-java-api-3.0.2-SNAPSHOT.jar
\ No newline at end of file
diff --git a/README.md b/README.md
index 0139bb5..23f90f1 100644
--- a/README.md
+++ b/README.md
@@ -159,12 +159,13 @@ This project was developed with:
* **Java 11 (Java Development Kit - JDK: 11.0.7)**
* **Spring Boot 2.3.0**
+* **Spring Admin Client 2.2.3**
* **Maven**
* **JUnit 5**
* **Surfire**
* **PostgreSQL 12**
* **Flyway 6.4.1**
-* **Swagger 2.9.2**
+* **Swagger 2.10.5**
* **Model Mapper 2.3.8**
* **Heroku**
* **EhCache**
@@ -178,7 +179,7 @@ The API also was developed to run with an `jar`. In order to generate this `jar`
mvn package
```
-It will clean, compile and generate a `jar` at target directory, e.g. `financial-java-api-3.0.1-SNAPSHOT.jar`
+It will clean, compile and generate a `jar` at target directory, e.g. `financial-java-api-3.0.2-SNAPSHOT.jar`
### Execution
@@ -216,7 +217,7 @@ mvn integration-test
In order to run the API, run the jar simply as following:
```bash
-java -jar financial-java-api-3.0.1-SNAPSHOT.jar --spring.profiles.active=prod
+java -jar financial-java-api-3.0.2-SNAPSHOT.jar --spring.profiles.active=prod
```
or
diff --git a/pom.xml b/pom.xml
index 831706f..ee0a23c 100644
--- a/pom.xml
+++ b/pom.xml
@@ -5,7 +5,7 @@
io.github.mariazevedo88
financial-java-api
- 3.0.1-SNAPSHOT
+ 3.0.2-SNAPSHOT
jar
financial-java-api
@@ -30,7 +30,7 @@
org.springframework.boot
spring-boot-starter-parent
- 2.3.1.RELEASE
+ 2.3.2.RELEASE
diff --git a/src/main/java/io/github/mariazevedo88/financialjavaapi/controller/v1/transaction/TransactionController.java b/src/main/java/io/github/mariazevedo88/financialjavaapi/controller/v1/transaction/TransactionController.java
index 0f50c83..e526468 100644
--- a/src/main/java/io/github/mariazevedo88/financialjavaapi/controller/v1/transaction/TransactionController.java
+++ b/src/main/java/io/github/mariazevedo88/financialjavaapi/controller/v1/transaction/TransactionController.java
@@ -10,8 +10,6 @@
import javax.validation.Valid;
import org.modelmapper.ModelMapper;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.hateoas.Link;
import org.springframework.hateoas.server.mvc.WebMvcLinkBuilder;
@@ -39,6 +37,7 @@
import io.github.mariazevedo88.financialjavaapi.service.transaction.TransactionService;
import io.github.mariazevedo88.financialjavaapi.util.FinancialApiUtil;
import io.swagger.annotations.ApiOperation;
+import lombok.extern.log4j.Log4j2;
/**
* SpringBoot RestController that creates all service endpoints related to the transaction.
@@ -46,12 +45,11 @@
* @author Mariana Azevedo
* @since 08/09/2019
*/
+@Log4j2
@RestController
@RequestMapping("/financial/v1/transactions")
public class TransactionController {
- private static final Logger logger = LoggerFactory.getLogger(TransactionController.class);
-
private TransactionService transactionService;
@Autowired
@@ -220,7 +218,7 @@ public ResponseEntity>> findAll(@RequestHeader(val
try {
createSelfLinkInCollections(apiVersion, apiKey, dto);
} catch (TransactionNotFoundException e) {
- logger.error("There are no transactions registered in the database.");
+ log.error("There are no transactions registered in the database.");
}
});
@@ -274,7 +272,7 @@ public ResponseEntity>> findByNsu(@RequestHeader(v
try {
createSelfLinkInCollections(apiVersion, apiKey, dto);
} catch (TransactionNotFoundException e) {
- logger.error("There are no transactions registered with the nsu=" + transactionNSU);
+ log.error("There are no transactions registered with the nsu=" + transactionNSU);
}
});
diff --git a/src/main/java/io/github/mariazevedo88/financialjavaapi/util/CacheEventLogger.java b/src/main/java/io/github/mariazevedo88/financialjavaapi/util/CacheEventLogger.java
index 115d46b..1a84781 100644
--- a/src/main/java/io/github/mariazevedo88/financialjavaapi/util/CacheEventLogger.java
+++ b/src/main/java/io/github/mariazevedo88/financialjavaapi/util/CacheEventLogger.java
@@ -2,10 +2,10 @@
import org.ehcache.event.CacheEvent;
import org.ehcache.event.CacheEventListener;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Component;
+import lombok.extern.log4j.Log4j2;
+
/**
* Class that implements an event logger to show cache creation and expiration
* in the API.
@@ -13,17 +13,16 @@
* @author Mariana Azevedo
* @since 11/06/2020
*/
+@Log4j2
@Component
public class CacheEventLogger implements CacheEventListener