A few minor points on top of Vogel's:
- It seems
PostController postController
can befinal
- Instead of using
request.getRequestURI()
(the entire URL) andMatcher.find()
, you could userequest.getContextPath()
(just the path part) andMatcher.matches()
. The pattern matching logic would be slightly simpler that way, and you could drop the$
from the end of the patterns