In each controller I have in my Spring MVC webapp, there’s this line:
static Logger logger = Logger.getLogger(ControllerName.class);
It’s a little duplication. How can I write “logger-provided” controllers, without repeating this line every time?
Thanks
Maybe you don’t like it, but one of the things I love about Project Lombok is this one. You can annotate your class with @Log4j (or better, @Slf4j) in order to get an invisible Logger called log.