-
Notifications
You must be signed in to change notification settings - Fork 181
Using Spring Lemon Effectively
Sanjay Patel edited this page Oct 13, 2018
·
3 revisions
This page is a work in progress, which discusses how to use Spring Lemon effectively.
Searching for Le*Utils
should bring the Spring Lemon utility classes. They contain many vital utility methods that would be highly useful in your applications. Go through those, and use those!
Spring Lemon provides comprehensive exception handling and validation mechanisms. Read here and here for some more details.
To add a new exception handler to your application, just create a bean inheriting from AbstractExceptionHandler
or one of its subclasses, like AbstractBadRequestExceptionHandler
. To override an existing exception handler, add a new handler with a higher priority (i.e. annotate that with @Order(Ordered.HIGHEST_PRECEDENCE)
).
...