@@ -0,0 +1,1181 @@
+package com.example;%0A%0Aimport com.jhttpserver.core.WebServer;%0Aimport com.jhttpserver.entity.Request;%0Aimport com.jhttpserver.entity.Response;%0Aimport com.jhttpserver.interfaces.Execution;%0A%0Aimport java.io.IOException;%0A%0A/**%0A * The sell system.%0A * Created by jayin on 14/12/2.%0A */%0Apublic class Sell%7B%0A    public int tickets = 100;%0A%0A    public synchronized boolean buy()%7B%0A            if(this.tickets %3E 0 )%7B%0A                System.out.println(%22you sell the ticket No.%22 + tickets);%0A                tickets--;%0A                return true;%0A            %7Delse%7B%0A                System.out.println(%22sold out !%22);%0A                return false;%0A            %7D%0A%0A    %7D%0A%0A    public static void main(String%5B%5D args) throws IOException %7B%0A        final Sell sellSystem = new Sell();%0A%0A        WebServer app = new WebServer();%0A%0A        app.get(%22/buy%22, new Execution() %7B%0A            @Override%0A            public void onExecute(Request req, Response res) %7B%0A                    if(sellSystem.buy())%7B%0A                        res.send(%22ok%22);%0A                    %7Delse%7B%0A                        res.send(%22faild%22);%0A                    %7D%0A%0A%0A            %7D%0A        %7D);%0A%0A        app.listen(WebServer.DefaultPort);%0A    %7D%0A%7D%0A

add sell example