0
I would like to create my own annotations. For example; when a controller
spring is called and it has my annotation, some validation is executed.
@GetMapping
@MinhaAnotacao(value="log") // Aqui faria um log, com a request
public ResponseEntity<?> get(){
...
}
How could I do this in spring boot? I don’t have much experience with annotations in Java. You could create the annotation as in normal java with Reflection, but all the examples I found, the annotation was created and then to execute it you had to call a method at hand in the implementation to do some action with that method. How annotations like @pathVariable, @Component, @Service, @Bean are automatically called?