tag:blogger.com,1999:blog-3237724005744642470.post1109056352478714594..comments2020-07-30T12:43:10.297+01:00Comments on Captain Debug's Blog: Exception Handling with the Spring 3.2 @ControllerAdvice AnnotationRoger Hugheshttp://www.blogger.com/profile/07042290171112551665[email protected]Blogger5125tag:blogger.com,1999:blog-3237724005744642470.post-8190437416903729282016-05-09T22:28:31.663+01:002016-05-09T22:28:31.663+01:00Thanks for sharing. The &#39;ControllerAdvice&#39;...Thanks for sharing. The &#39;ControllerAdvice&#39; is really a useful annotation to abstract exception handling behaviors!<br />Anonymoushttps://www.blogger.com/profile/04471025968275159904[email protected]tag:blogger.com,1999:blog-3237724005744642470.post-90649155432391167202014-06-05T17:35:28.207+01:002014-06-05T17:35:28.207+01:00Ina, this should handle any exceptions that are sp...Ina, this should handle any exceptions that are specified in the @ExceptionHandler annotation irrespective of wherever they originate in your code, so long as they get thrown out of the controller method.Roger Hugheshttps://www.blogger.com/profile/07042290171112551665[email protected]tag:blogger.com,1999:blog-3237724005744642470.post-8576359842506796462014-06-05T16:00:34.484+01:002014-06-05T16:00:34.484+01:00Hi, I have one question: this controller handles e...Hi, I have one question: this controller handles exceptions thrown by ohter controller or it handles all the exception, from service let say.<br />ThanksIna Galerhttps://www.blogger.com/profile/12974687700723591192[email protected]tag:blogger.com,1999:blog-3237724005744642470.post-50956119989256149682013-12-12T22:06:10.320+00:002013-12-12T22:06:10.320+00:00Pakman It&#39;s difficult to say what&#39;s wrong ...Pakman<br />It&#39;s difficult to say what&#39;s wrong without looking at your code, mine worked okay.<br /><br />Things to check are:<br />1) that you have the correct annotation on the object you&#39;re injecting via @Autowired. This means using @Service or @Component<br /><br />2) that you have the correct tags in your Spring context xml file.<br /><br />You can also switch on DEBUG logging and take a look at all the messages Spring throws out whilst it&#39;s loading the ApplicationContext.<br /><br />Roger Hugheshttps://www.blogger.com/profile/07042290171112551665[email protected]tag:blogger.com,1999:blog-3237724005744642470.post-73905820634587151292013-12-12T18:55:13.338+00:002013-12-12T18:55:13.338+00:00How did you manage to make the @Autowired work in ...How did you manage to make the @Autowired work in your @ControllerAdvice?<br /><br />I can&#39;t make it work. The @ControllerAdvice gets called alright, but the @Autowired dependency is not satisfied (it is alwas null).pakmanhttps://www.blogger.com/profile/05502577511417871974[email protected]