I am using spring and Hibernate in my application,There is one scenario where i insert same records morethan once ,So application correctly throwing Constraint Exception because i applied Unique constraint in one of the db column.So far is everything fine.
But i have to display some custom message like “record already exists'” instead of showing Hibernate Exception.
How can i do with Spring framework.
Any hints or examples greatly appreciated.
Regards,
Raju
Yes you can exception in controller:
Of cause you can catch any tpe of exception just insert it as the parameter to
@ExceptionHandlerHope it helps.