private ServerApplication createServer(Module module) { List<ServerApplicationFactory> applications = ReactiveSeq.fromStream(PluginLoader.INSTANCE.plugins.get() .stream()) .filter(m -> m.serverApplicationFactory() != null) .map(Plugin::serverApplicationFactory) .flatMap(Streams::optionalToStream) .toList(); if (applications.size() > 1) { logger.error("ERROR! Multiple server application factories found : The solution is remove one these plugins from your classpath ", applications); System.err.println("ERROR! Multiple server application factories found : The solution is remove one these plugins from your classpath " + applications); throw new IncorrectNumberOfServersConfiguredException( "Multiple server application factories found : The solution is remove one these plugins from your classpath " + applications); } else if (applications.size() == 0) { logger.error("ERROR! No server application factories found. If you using micro-spring-boot don't call MicroserverApp.start() method. A possible solution is add one of micro-grizzly or micro-tomcat to the classpath."); System.err.println("ERROR! No server application factories found. If you using micro-spring-boot don't call MicroserverApp.start() method. A possible solution is add one of micro-grizzly or micro-tomcat to the classpath."); throw new IncorrectNumberOfServersConfiguredException( "No server application factories found. If you using micro-spring-boot don't call MicroserverApp.start() method. A possible solution is add one of micro-grizzly or micro-tomcat to the classpath. "); } ServerApplication app = applications.get(0) .createApp(module, springContext); return app; }
private ServerApplication createServer(Module module) { List<ServerApplicationFactory> applications = ReactiveSeq.fromStream(PluginLoader.INSTANCE.plugins.get() .stream()) .filter(m -> m.serverApplicationFactory() != null) .map(Plugin::serverApplicationFactory) .flatMap(Streams::optionalToStream) .toList(); if (applications.size() > 1) { logger.error("ERROR! Multiple server application factories found : The solution is remove one these plugins from your classpath ", applications); System.err.println("ERROR! Multiple server application factories found : The solution is remove one these plugins from your classpath " + applications); throw new IncorrectNumberOfServersConfiguredException( "Multiple server application factories found : The solution is remove one these plugins from your classpath " + applications); } else if (applications.size() == 0) { logger.error("ERROR! No server application factories found. If you using micro-spring-boot don't call MicroserverApp.start() method. A possible solution is add one of micro-grizzly or micro-tomcat to the classpath."); System.err.println("ERROR! No server application factories found. If you using micro-spring-boot don't call MicroserverApp.start() method. A possible solution is add one of micro-grizzly or micro-tomcat to the classpath."); throw new IncorrectNumberOfServersConfiguredException( "No server application factories found. If you using micro-spring-boot don't call MicroserverApp.start() method. A possible solution is add one of micro-grizzly or micro-tomcat to the classpath. "); } ServerApplication app = applications.get(0) .createApp(module, springContext); return app; }