/*
 * Copyright 2014-2016 the original author or authors.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
 * either express or implied. See the License for the specific language
 * governing permissions and limitations under the License.
 */
package org.dbflute.intro;

import org.dbflute.jetty.JettyBoot;

/**
 * @author p1us2er0
 */
public class IntroBoot {

    protected static final int DEFAULT_PORT = 9000;

    public static void main(String[] args) {
        JettyBoot jettyBoot = new JettyBoot(getPort(), "dbflute-intro");
        jettyBoot.asDevelopment();
        if (Boolean.getBoolean("browseOnDesktop")) {
            jettyBoot.browseOnDesktop();
        }
        jettyBoot.bootAwait();
    }

    private static int getPort() {
        String port = System.getProperty("port");
        if (port != null) {
            try {
                return Integer.parseInt(port);
            } catch (NumberFormatException ignore) {
            }
        }
        return DEFAULT_PORT;
    }
}

@@ -702,16 +702,34 @@
 1us2er0%0A
+ * @author jflute%0A
  */%0Apubl
@@ -750,16 +750,68 @@
 Boot %7B%0A%0A
+    // TODO jflute intro: default port (2016/08/02)%0A
     prot
@@ -918,22 +918,17 @@
 ttyBoot 
-jettyB
+b
 oot = ne
@@ -972,30 +972,81 @@
 %22);%0A        
-jettyB
+// TODO jflute intro: development? (2016/08/02)%0A        b
 oot.asDevelo
@@ -1115,30 +1115,25 @@
             
-jettyB
+b
 oot.browseOn
@@ -1165,14 +1165,9 @@
     
-jettyB
+b
 oot.
@@ -1233,22 +1233,32 @@
     
-String port = 
+return Integer.parseInt(
 Syst
@@ -1282,196 +1282,25 @@
 ort%22
-);%0A        if (port != null) %7B%0A            try %7B%0A                return Integer.parseInt(port);%0A            %7D catch (NumberFormatException ignore) %7B%0A            %7D%0A        %7D%0A        return 
+, String.valueOf(
 DEFA
@@ -1307,16 +1307,19 @@
 ULT_PORT
+)))
 ;%0A    %7D%0A

refactor boot class