GH-2127 Wrap event publishing in try/catch issuing warning in case of error
Resolves #2127
This commit is contained in:
@@ -298,7 +298,12 @@ public class DefaultBinderFactory implements BinderFactory, DisposableBean, Appl
|
||||
@Override
|
||||
public void onApplicationEvent(ApplicationEvent event) {
|
||||
if (context != null) {
|
||||
context.publishEvent(event);
|
||||
try {
|
||||
context.publishEvent(event);
|
||||
}
|
||||
catch (Exception e) {
|
||||
logger.warn("Failed to publish " + event, e);
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user