Dubbo启动不依赖Tomcat容器,cpu飙升100%的解决办法

最近改造项目,微服务启动仅启动dubbo的接口服务,不依赖tomcat容器启动,但是出现个小问题,就是cpu飙升100%,其实加个sleep就完美解决了。

ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext(new String[]{"dubbo-provider.xml"});
context.start();
TimeUnit.HOURS.sleep(1);

猜你喜欢

转载自blog.csdn.net/airyearth/article/details/105916550