1 package com.foxinmy.weixin4j.example.server;
2
3 import com.foxinmy.weixin4j.exception.WeixinException;
4 import com.foxinmy.weixin4j.handler.DebugMessageHandler;
5 import com.foxinmy.weixin4j.startup.WeixinServerBootstrap;
6 import com.foxinmy.weixin4j.util.AesToken;
7
8
9
10
11
12
13
14
15
16 public final class Weixin4jServerStartup {
17
18
19
20 private static int port = 30000;
21
22
23
24
25
26
27
28 private static String aesToken = "weixin4j";
29
30
31
32 private static String handlerPackage = "com.foxinmy.weixin4j.example.server.handler";
33
34
35
36
37
38
39
40 public static void main(String[] args){
41 new WeixinServerBootstrap(new AesToken("wxa652fc930afe9b22", "weixin4j", "3XItJRSSkTqH7etjBUbLfLBecLdFfGjbGPfmIHuGftD"))
42 .handlerPackagesToScan(handlerPackage)
43 .addHandler(DebugMessageHandler.global)
44 .openAlwaysResponse()
45 .startup(port);
46 }
47 }