Spring Web Services - Exception Skipping ExceptionResolver

前端 未结 8 993
别那么骄傲
别那么骄傲 2020-12-19 04:33

I have a SOAP service, the request and responses work as expected with good input, if I specify bad input for an XML element

in request body:

...
<         


        
8条回答
  •  太阳男子
    2020-12-19 05:28

    You have to "wire" (or "inject") the exception handler in your spring beans. I'm not sure which of your Spring bean actually needs the exception handler.

    Personally, I use default-autowire="byName", which cause my exceptionHandler to be wired in my Controller class automatically. Your approach actually use manual wiring. So you need to find out which bean should actually use the exception handler. Have you tried (just on top of my head):

    
        
        
    
    

    Or you could just add the autowired mechanism of Spring and let it wire the beans automatically. :)

提交回复
热议问题