From f08b1b374e359009392352c91a5396124d758b47 Mon Sep 17 00:00:00 2001 From: Daniel Rohe Date: Thu, 11 Aug 2022 19:46:00 +0200 Subject: [PATCH] added documentation --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 7b71a03..3d65a4d 100644 --- a/README.md +++ b/README.md @@ -15,11 +15,11 @@ Sample Project to show that Spring Framework FieldError logs sensitive data. "id": "4", "accountNumber": "4444333322221112", "expirationDate": "2022-12", - "accountHolder": "Jimmy-2 Doe", + "accountHolder": "Jimmy Doe", }' ``` -1. Check log file of spring boot application. It will contain the following log event: +1. Check log file of spring boot application. It will contain the following log event as rejectedValue []: ``` 2022-08-11 19:35:56.283 WARN 1 --- [nio-8080-exec-2] .w.s.m.s.DefaultHandlerExceptionResolver : Resolved [org.springframework.web.bind.MethodArgumentNotValidException: Validation failed for argument [0] in public com.example.demo.domain.PaymentCard com.example.demo.api.CardController.saveCard(com.example.demo.domain.PaymentCard): [Field error in object 'paymentCard' on field 'accountNumber': rejected value [4444333322221112]; codes [CreditCardNumber.paymentCard.accountNumber,CreditCardNumber.accountNumber,CreditCardNumber.java.lang.String,CreditCardNumber]; arguments [org.springframework.context.support.DefaultMessageSourceResolvable: codes [paymentCard.accountNumber,accountNumber]; arguments []; default message [accountNumber],false]; default message [invalid credit card number]] ]