0
I need to take an attribute of an object and modify its value via Annotation, for example:
public class MeuDTO {
@AlgumaAnnotation
private String meuAtributo;
}
I created the note:
@Target(ElementType.FIELD)
@Retention(RetentionPolicy.RUNTIME)
public @interface AlgumaAnnotation {
}
And now, somehow, I need to get the value of this attribute in a method, apply a parse rule and return to this object (because I get it via a controller method and this value is encrypted):
@GetMapping
public ResponseEntity<?> buscarProdutos(MeuDTO requestDTO) {
}
I want to create any method that receives this attribute, decrypt it and return the value from where it came, ex:
class ClasseDaLogica {
public String fazOParse() {
// retorna o valor parseado
}
}
Is there any way to do that ?