Replies: 1 comment 4 replies
-
I was thinking of adding something similar when I was working on this but gave up on the idea eventually. |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Idea
The idea consists of annotations for route methods that specify what kind of notification should be automatically added in the response.
It would improve
nrich-notifcation
so that the user doesn't need to includeNotificationResponseService
in the controller class and return a notification instance. Instead, user could simply annotate the method and then springs route handler would, after handling the request, create required notification and return it in response.The annotation would be similar to
@ResponseBody
. It could resolve action codes automatically or would use given action codes that were passed to it as an argument.Example
As it is now (if we provide action code manually):
With annotation:
For case that we do not provide an action code:
With annotation:
Beta Was this translation helpful? Give feedback.
All reactions