cleanup
This commit is contained in:
+12
-8
@@ -21,15 +21,19 @@ public class MiniServiceServer {
|
||||
|
||||
//启动Jetty
|
||||
Server server = JettyFactory.createServerInSource(PORT, CONTEXT);
|
||||
server.start();
|
||||
try {
|
||||
server.start();
|
||||
|
||||
System.out.println("Server running at " + BASE_URL);
|
||||
System.out.println("Hit Enter in console to stop server");
|
||||
System.out.println("Server running at " + BASE_URL);
|
||||
System.out.println("Hit Enter in console to stop server");
|
||||
|
||||
//wait for close
|
||||
System.in.read();
|
||||
server.stop();
|
||||
server.join();
|
||||
System.out.println("Server stopped");
|
||||
//wait for close
|
||||
System.in.read();
|
||||
server.stop();
|
||||
server.join();
|
||||
System.out.println("Server stopped");
|
||||
} catch (Exception e) {
|
||||
System.exit(-1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+12
-8
@@ -20,15 +20,19 @@ public class MiniWebServer {
|
||||
|
||||
//启动Jetty
|
||||
Server server = JettyFactory.createServerInSource(PORT, CONTEXT);
|
||||
server.start();
|
||||
try {
|
||||
server.start();
|
||||
|
||||
System.out.println("Server running at " + BASE_URL);
|
||||
System.out.println("Hit Enter in console to stop server");
|
||||
System.out.println("Server running at " + BASE_URL);
|
||||
System.out.println("Hit Enter in console to stop server");
|
||||
|
||||
//wait for close
|
||||
System.in.read();
|
||||
server.stop();
|
||||
server.join();
|
||||
System.out.println("Server stopped");
|
||||
//wait for close
|
||||
System.in.read();
|
||||
server.stop();
|
||||
server.join();
|
||||
System.out.println("Server stopped");
|
||||
} catch (Exception e) {
|
||||
System.exit(-1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+12
-8
@@ -20,15 +20,19 @@ public class ShowcaseServer {
|
||||
|
||||
//启动Jetty
|
||||
Server server = JettyFactory.createServerInSource(PORT, CONTEXT);
|
||||
server.start();
|
||||
try {
|
||||
server.start();
|
||||
|
||||
System.out.println("Server running at " + BASE_URL);
|
||||
System.out.println("Hit Enter in console to stop server");
|
||||
System.out.println("Server running at " + BASE_URL);
|
||||
System.out.println("Hit Enter in console to stop server");
|
||||
|
||||
//wait for close
|
||||
System.in.read();
|
||||
server.stop();
|
||||
server.join();
|
||||
System.out.println("Server stopped");
|
||||
//wait for close
|
||||
System.in.read();
|
||||
server.stop();
|
||||
server.join();
|
||||
System.out.println("Server stopped");
|
||||
} catch (Exception e) {
|
||||
System.exit(-1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,6 +10,7 @@ import com.icegreen.greenmail.util.ServerSetupTest;
|
||||
/**
|
||||
* 基于GreenMail的MailServer模拟器,用于开发/测试环境。
|
||||
* 默认在localhost的3025端口启动SMTP服务, 用户名密码是greenmail@localhost.com/greemail
|
||||
* FactoryBean已将greenMail对象注入到Context中,可在测试中取用.
|
||||
*
|
||||
* @author calvin
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user