i have spring boot app using springws. inside of wsconfigureradapter overriding addinterceptors in order add logging/authentication/validation/etc.
@configuration @enablecaching @enablews public class webserviceconfig extends wsconfigureradapter { ... @override public void addinterceptors(list<endpointinterceptor> interceptors) { environmentsettings environment = getenvironmentsettings(); interceptors.add(getlogsetupinterceptor()); interceptors.add(getauthenticationinterceptor()); interceptors.add(getserverlogginginterceptor()); interceptors.add(getauthorizationinterceptor()); serverpayloadvalidatinginterceptor validatinginterceptor = new serverpayloadvalidatinginterceptor(); validatinginterceptor.setvalidaterequest(environment.isvalidatesoaprequest()); validatinginterceptor.setvalidateresponse(environment.isvalidatesoapresponse()); validatinginterceptor.setxsdschema( xsdschema()); interceptors.add(validatinginterceptor); } }
what strange when run locally, of these interceptors being added , run every request fine. however, when deploy application .war was, 1 method not being run. added logging statements , can tell it's method that's getting skipped on instead of interceptors themselves. know spring boot .war files don't?
also, here application class:
@springbootapplication public class application extends springbootservletinitializer { @override protected springapplicationbuilder configure(springapplicationbuilder application) { return application.sources(application.class); } public static void main(string[] args) { springapplication.run(application.class, args); } }
i figured out did wrong. turns out creating servlet mapping in both webserviceconfig , web.xml both @ /*.
Comments
Post a Comment