what is best way service layer can provide to tell Controller part if anything happens bad(Exception)

StackOverflow https://stackoverflow.com//questions/10690973

  •  12-12-2019
  •  | 
  •  

Question

I am using spring3.0.2 for my project "Online Exam"

Putting business logic in service layer makes controller easy to feel.

what is best way service layer can provide to tell Controller part if anything happens bad(Exception)

Eager to hear soon!!

Was it helpful?

Solution

Throw your own exceptions, and then, catch them inside your controller so you can define exactly the best behavior

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top