Я пользуюсь верблюжьей версией 2.23.2.
После загрузки маршрутов я обнаружил только один веб-сервис. И когда я перезагрузил приложение, я обнаружил ниже исключение.
[2019-11-11 23:31:21.644][Thread-30 (182)][INFO ][o.e.j.s.h.ContextHandler] Stopped o.e.j.s.h.ContextHandler@aadbe9e{/,null,UNAVAILABLE}
[2019-11-11 23:31:21.644][Thread-30 (182)][INFO ][o.e.j.s.h.ContextHandler] Stopped o.e.j.s.h.ContextHandler@1cf96cd{/,null,UNAVAILABLE}
[2019-11-11 23:31:21.651][Thread-30 (182)][INFO ][o.e.j.s.AbstractConnector] Stopped ServerConnector@34ff8753{HTTP/1.1,[http/1.1]}{localhost:9090}
java.lang.NullPointerException
at org.apache.cxf.transport.http_jetty.JettyHTTPServerEngine.stop(JettyHTTPServerEngine.java:1040)
at org.apache.cxf.transport.http_jetty.JettyHTTPServerEngineFactory.destroyForPort(JettyHTTPServerEngineFactory.java:318)
at org.apache.cxf.transport.http_jetty.JettyHTTPServerEngine.shutdown(JettyHTTPServerEngine.java:210)
at org.apache.cxf.transport.http_jetty.JettyHTTPServerEngineFactory.postShutdown(JettyHTTPServerEngineFactory.java:372)
at org.apache.cxf.transport.http_jetty.JettyHTTPServerEngineFactory$JettyBusLifeCycleListener.postShutdown(JettyHTTPServerEngineFactory.java:155)
at org.apache.cxf.bus.managers.CXFBusLifeCycleManager.postShutdown(CXFBusLifeCycleManager.java:110)
at org.apache.cxf.bus.extension.ExtensionManagerBus.shutdown(ExtensionManagerBus.java:306)
at org.apache.cxf.bus.extension.ExtensionManagerBus.shutdown(ExtensionManagerBus.java:282)
at org.apache.cxf.bus.spring.SpringBus.onApplicationEvent(SpringBus.java:109)
at org.apache.cxf.bus.spring.SpringBus$1.onApplicationEvent(SpringBus.java:58)
at org.springframework.context.event.SimpleApplicationEventMulticaster.doInvokeListener(SimpleApplicationEventMulticaster.java:172)
at org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:165)
at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:139)
at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:402)
at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:359)
at org.springframework.context.support.AbstractApplicationContext.doClose(AbstractApplicationContext.java:1009)
at org.springframework.context.support.AbstractApplicationContext.close(AbstractApplicationContext.java:975)
at target.atom.engine.TargetAtomEngineApplication.lambda$0(TargetAtomEngineApplication.java:100)
at java.base/java.lang.Thread.run(Thread.java:834)
Ниже приведен журнал во время загрузки приложения.
[2019-11-11 23:31:26.849][Thread-30 (182)][INFO ][o.a.c.w.s.f.ReflectionServiceFactoryBean] Creating Service {http://transfer.file.ws.van.processor.targetline/}FileTransferService from class targetline.processor.van.ws.file.transfer.FileTransferService
[2019-11-11 23:31:26.901][Thread-30 (182)][INFO ][o.a.c.e.ServerImpl] Setting the server's publish address to be http://localhost:9090/fileTransferService
[2019-11-11 23:31:26.922][Thread-30 (182)][INFO ][o.a.c.w.s.f.ReflectionServiceFactoryBean] Creating Service {http://payment.ws.van.processor.targetline/}CardPayment from class targetline.processor.van.ws.payment.CardPayment
[2019-11-11 23:31:26.992][Thread-30 (182)][INFO ][o.a.c.e.ServerImpl] Setting the server's publish address to be http://localhost:9090/cardPaymentService
[2019-11-11 23:31:27.011][Thread-30 (182)][INFO ][o.e.j.s.Server] jetty-9.4.19.v20190610; built: 2019-06-10T16:30:51.723Z; git: afcf563148970e98786327af5e07c261fda175d3; jvm 11.0.2+9
[2019-11-11 23:31:27.017][Thread-30 (182)][INFO ][o.e.j.s.AbstractConnector] Started ServerConnector@4d6e2c22{HTTP/1.1,[http/1.1]}{localhost:9090}
[2019-11-11 23:31:27.017][Thread-30 (182)][INFO ][o.e.j.s.Server] Started @383149ms
[2019-11-11 23:31:27.017][Thread-30 (182)][WARN ][o.e.j.s.h.ContextHandler] Empty contextPath
функция перезапуска
public static void restart() {
ApplicationArguments args = context.getBean(ApplicationArguments.class);
Thread thread = new Thread(() -> {
context.close();
context = SpringApplication.run(TargetAtomEngineApplication.class, args.getSourceArgs());
});
thread.setDaemon(false);
thread.start();
}