Răsfoiți Sursa

打开首页时,显示激活地址信息

桑博 7 ani în urmă
părinte
comite
53bea9fb78
1 a modificat fișierele cu 9 adăugiri și 1 ștergeri
  1. 9 1
      src/main/java/com/vvvtimes/server/MainServer.java

+ 9 - 1
src/main/java/com/vvvtimes/server/MainServer.java

@@ -242,7 +242,15 @@ public class MainServer extends AbstractHandler {
         response.setContentType("text/html; charset=utf-8");
         response.setContentType("text/html; charset=utf-8");
         response.setStatus(HttpServletResponse.SC_OK);
         response.setStatus(HttpServletResponse.SC_OK);
         baseRequest.setHandled(true);
         baseRequest.setHandled(true);
-        response.getWriter().println("<h1>Hello,This is a Jrebel & JetBrains License Server!</h1>");
+
+        int port = request.getServerPort();
+        String html = "<h1>Hello,This is a Jrebel & JetBrains License Server!</h1>";
+        html += "<p>License Server started at http://localhost:" + port;
+        html += "<p>JetBrains Activation address was: <span style='color:red'>http://localhost:" + port + "/";
+        html += "<p>JRebel 7.1 and earlier version Activation address was: <span style='color:red'>http://localhost:" + port + "/{tokenname}</span>, with any email.";
+        html += "<p>JRebel 2018.1 and later version Activation address was: http://localhost:" + port + "/{guid}(eg:<span style='color:red'>http://localhost:" + port + "/"+ UUID.randomUUID().toString()+"</span>), with any email.";
+
+        response.getWriter().println(html);
 
 
     }
     }
 }
 }