You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@Controller("/i/services/save")
public class ServiceController {
@Post(value = "/{serviceId}", consumes = MediaType.MULTIPART_FORM_DATA)
public void view(@PathVariable long serviceId) {
// some code here
throw new MyExeption();
}
@Status(HttpStatus.BAD_REQUEST)
@Error(exception = MyException.class)
public ViewData onValidationError(
@PathVariable long serviceId
Principal principal,
MyException ex) {
// somecode
}
So in error handler onValidationError, I cannot get @PathVariable. What I can do instead?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
So in error handler onValidationError, I cannot get @PathVariable. What I can do instead?
Beta Was this translation helpful? Give feedback.
All reactions