INNER CODE UNIT · Java

main

luxiaoxun/Code4Java · MapHttpService/src/main/java/com/luxx/map/MapHttpServer.java:79

    public static void main(String[] args) {
        final String portString = PropertiesUtil.getInstance().GetListenPort();
        final int port = Integer.parseInt(portString);
        boolean isOK = MapDbOperation.init();
        if (isOK) {
            final MapHttpServer server = new MapHttpServer();
            try {
                log.info("Listening for connections on port " + port);
                server.start(port);
                Runtime.getRuntime().addShutdownHook(new Thread() {
                    @Override
                    public void run() {
                        server.destroy();
                    }
                });
            } catch (Exception e) {
                log.error("Map Http Service failed! " + e.getMessage());
            }

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…