the code to create @ControllerAdvice class to handle the exceptions globally
1.import org.springframework.web.bind.annotation.@GlobalAdvice ; @ControllerAdvice public class ProductExceptionController { }
2.import org.springframework.web.bind.annotation.@@GlobalAdvice ; @GlobalAdice public class ProductExceptionController { }
3.import org.springframework.web.bind.annotation.ControllerAdvice; @ControllerAdvice public class ProductExceptionController { }
4.None
Posted Date:-2020-11-25 00:25:27