Spring - slf4J : how to automatically log errors and exceptions?
问题 We are using Spring with slf4j and hibernate, I'm trying to figure out a way to log exceptions and errors automatically (i.e without initiating an instance of the debugger in each class), so that it may catch any error or exception thrown and also get class and method name in the log, I read a very short note about using aspects & interceptors for this, so could you provide me with some detailed way to implement this, Regards, 回答1: an exception aspect could look like this: @Aspect public