Skip to content

Commit

Permalink
added documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
danielrohe committed Aug 11, 2022
1 parent f0519ed commit f08b1b3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 [<sensitive data>]:
```
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]] ]
Expand Down

0 comments on commit f08b1b3

Please sign in to comment.