Skip to content
Advertisement

Tag: spring

X-Ray trace doesn’t shows inner method call

I’m new to aws x-ray and trying to use x-ray with AOP based approach in a springboot application. I was able to get the traces in the aws console, but traces doesn’t show inner method call method2() details. Am I missing anything here. Controller class Aspect Class When I hit http://localhost:8080/xray/method1 endpoint, AWS Xray Console doesn’t show method2() details Answer

How to set a list as an Enum constant argument?

How do I pass a List type value in the constant parameter? In this case, this parameter is only for the PARS() constant. Update: I ended up not mentioning it in the post but it’s a list of object and not a string. Answer Enums are objects instantiated from a class, like other objects and classes. So if you have

Spring Boot. Forward on RestController

I am implementing a mechanism for replacing short links. I need to forwarded request to another controller. I found examples how to do it in spring on models, but I don’t understand how to do it in RestControllers Example what i found (use models) Or maybe I’m looking in the wrong direction and I need to make a filter? UPD.

Spring Boot: Custom exception adds prefix to the exception message

In a Spring Boot app, I created a custom GlobalExceptionHandler and add the following method to handle ConstraintViolationException for invalid file type during upload process: My buildErrorResponse works correctly and build proper responses for other handle methods. However, It adds “uploadFile.file:” prefix to my error message. My questions: Is there any problem with my handleConstraintViolationException implementation? If not, how can

Order between @ControllerAdvice and custom Aspect

tl;dr How can I define the order of custom aspects and the @ControllerAdvice? Detailed description I want to decorate various methods (like normal REST-Calls or a @JmsListener) with MDC information on controller-level. The idea is: I, as a developer, don’t have to think about the MDC data in my controller-methods. I want extra MDC-information (e.g. the userId) and I can

Advertisement