Shutdown embedded Jetty in Spring-Boot Application with Apache CXF -
in spring-boot application register apache-cxf soap service this: @bean(destroymethod = "destroy") org.apache.cxf.endpoint.server server(myservice myservice) { jaxwsserverfactorybean svrfactory = new jaxwsserverfactorybean(); svrfactory.setserviceclass(myservice.class); svrfactory.setaddress("http://0.0.0.0:4711/myservice"); svrfactory.setservicebean(myservice); svrfactory.getininterceptors().add(new loggingininterceptor()); svrfactory.getoutinterceptors().add(new loggingoutinterceptor()); return svrfactory.create(); } it may happen @ other places of spring configuration, context can not initialized succesfully (application startup failed) , application shutdown initiated. unfortunately sever bean, created, stays alive , prevents application shutting down completely. thought destroymethod = "destroy" trick, destroys webapp/soap endpoint (resultig in http error 404) embedded jetty still running. do have chance