2009-09-17 5 views

답변

14

당신은

GrailsExceptionResolver

를 확장 자신의 클래스와 resources.groovy 사용하여 exceptionHandler 콩을 대체 할 수 있습니다 예를 들어,

beans = { 
    exceptionHandler(com.yourapp.YourExceptionHandler){ 
     // this is required so that calls to super work 
     exceptionMappings = ['java.lang.Exception': '/error'] 
    } 
} 
+0

감사합니다. 모든 사람들을위한 솔루션을 명확히하기 위해,'exceptionHandler'는'GrailsExceptionResolver' – Saurabh

+0

깔끔한 해결책보다 우선합니다. 감사 – angryip