优化代码
This commit is contained in:
+1
-1
@@ -4,7 +4,7 @@ import com.foxinmy.weixin4j.mp.response.TextResponse;
|
||||
import com.foxinmy.weixin4j.msg.BaseMessage;
|
||||
|
||||
/**
|
||||
* 返回空白消息
|
||||
* 输出空白消息
|
||||
*
|
||||
* @className BlankAction
|
||||
* @author jy.hu
|
||||
|
||||
+1
-1
@@ -4,7 +4,7 @@ import com.foxinmy.weixin4j.mp.response.TextResponse;
|
||||
import com.foxinmy.weixin4j.msg.BaseMessage;
|
||||
|
||||
/**
|
||||
* 显示调试信息
|
||||
* 调试输出用户消息
|
||||
*
|
||||
* @className DebugAction
|
||||
* @author jy
|
||||
|
||||
+1
-1
@@ -5,7 +5,7 @@ import com.foxinmy.weixin4j.msg.ImageMessage;
|
||||
import com.foxinmy.weixin4j.type.MessageType;
|
||||
|
||||
/**
|
||||
* 图片消息响应
|
||||
* 图片消息处理
|
||||
*
|
||||
* @className ImageAction
|
||||
* @author jy
|
||||
|
||||
+1
-1
@@ -5,7 +5,7 @@ import com.foxinmy.weixin4j.msg.LinkMessage;
|
||||
import com.foxinmy.weixin4j.type.MessageType;
|
||||
|
||||
/**
|
||||
* 链接消息响应
|
||||
* 链接消息处理
|
||||
*
|
||||
* @className LinkAction
|
||||
* @author jy
|
||||
|
||||
+1
-1
@@ -5,7 +5,7 @@ import com.foxinmy.weixin4j.msg.LocationMessage;
|
||||
import com.foxinmy.weixin4j.type.MessageType;
|
||||
|
||||
/**
|
||||
* 地理位置响应
|
||||
* 地理位置处理
|
||||
*
|
||||
* @className LocationAction
|
||||
* @author jy
|
||||
|
||||
+1
-1
@@ -13,7 +13,7 @@ import com.foxinmy.weixin4j.util.ConfigUtil;
|
||||
import com.foxinmy.weixin4j.util.MessageUtil;
|
||||
|
||||
/**
|
||||
* 用于校验消息安全性
|
||||
* 用于校验消息是否来自微信
|
||||
*
|
||||
* @className SignatureAction
|
||||
* @author jy
|
||||
|
||||
+1
-1
@@ -6,7 +6,7 @@ import com.foxinmy.weixin4j.msg.TextMessage;
|
||||
import com.foxinmy.weixin4j.type.MessageType;
|
||||
|
||||
/**
|
||||
* 文字消息响应
|
||||
* 文字消息处理
|
||||
*
|
||||
* @className TextAction
|
||||
* @author jy
|
||||
|
||||
+1
-1
@@ -5,7 +5,7 @@ import com.foxinmy.weixin4j.msg.VideoMessage;
|
||||
import com.foxinmy.weixin4j.type.MessageType;
|
||||
|
||||
/**
|
||||
* 视频消息响应
|
||||
* 视频消息处理
|
||||
*
|
||||
* @className VideoAction
|
||||
* @author jy
|
||||
|
||||
+1
-1
@@ -5,7 +5,7 @@ import com.foxinmy.weixin4j.msg.VoiceMessage;
|
||||
import com.foxinmy.weixin4j.type.MessageType;
|
||||
|
||||
/**
|
||||
* 语音消息响应
|
||||
* 语音消息处理
|
||||
*
|
||||
* @className VoiceAction
|
||||
* @author jy
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@ import com.foxinmy.weixin4j.type.EventType;
|
||||
import com.foxinmy.weixin4j.type.MessageType;
|
||||
|
||||
/**
|
||||
* 菜单点击click事件时触发
|
||||
* click类型菜单点击时触发
|
||||
*
|
||||
* @className MenuClickAction
|
||||
* @author jy
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@ import com.foxinmy.weixin4j.type.EventType;
|
||||
import com.foxinmy.weixin4j.type.MessageType;
|
||||
|
||||
/**
|
||||
* 菜单发送地理位置时触发
|
||||
* 点击菜单发送地理位置时触发
|
||||
*
|
||||
* @className MenuLocationAction
|
||||
* @author jy
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@ import com.foxinmy.weixin4j.type.EventType;
|
||||
import com.foxinmy.weixin4j.type.MessageType;
|
||||
|
||||
/**
|
||||
* 菜单发送图片时触发
|
||||
* 点击菜单发送图片时触发
|
||||
*
|
||||
* @className MenuPhotoAction
|
||||
* @author jy
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@ import com.foxinmy.weixin4j.type.EventType;
|
||||
import com.foxinmy.weixin4j.type.MessageType;
|
||||
|
||||
/**
|
||||
* 菜单扫描时触发
|
||||
* 点击菜单扫描时触发
|
||||
*
|
||||
* @className MenuScanAction
|
||||
* @author jy
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@ import com.foxinmy.weixin4j.type.EventType;
|
||||
import com.foxinmy.weixin4j.type.MessageType;
|
||||
|
||||
/**
|
||||
* 菜单点击view事件时触发
|
||||
* view类型菜单点击时触发
|
||||
*
|
||||
* @className MenuViewAction
|
||||
* @author jy
|
||||
|
||||
+1
-1
@@ -13,7 +13,7 @@ import com.foxinmy.weixin4j.type.MessageType;
|
||||
* @author jy
|
||||
* @date 2014年10月9日
|
||||
* @since JDK 1.7
|
||||
* @see com.foxinmy.weixin4j.msg.event.ScanEventMessage
|
||||
* @see com.foxinmy.weixin4j.msg.event.ScribeEventMessage
|
||||
*/
|
||||
@Action(msgType = MessageType.event, eventType = { EventType.subscribe })
|
||||
public class SubscribeAction extends DebugAction<ScribeEventMessage> {
|
||||
|
||||
+1
-1
@@ -13,7 +13,7 @@ import com.foxinmy.weixin4j.type.MessageType;
|
||||
* @author jy
|
||||
* @date 2014年10月10日
|
||||
* @since JDK 1.7
|
||||
* @see com.foxinmy.weixin4j.msg.event.ScanEventMessage
|
||||
* @see com.foxinmy.weixin4j.msg.event.ScribeEventMessage
|
||||
*/
|
||||
@Action(msgType = MessageType.event, eventType = { EventType.unsubscribe })
|
||||
public class UnsubscribeAction extends DebugAction<ScribeEventMessage> {
|
||||
|
||||
+3
-3
@@ -8,16 +8,16 @@ import java.lang.annotation.Target;
|
||||
import com.foxinmy.weixin4j.type.EventType;
|
||||
import com.foxinmy.weixin4j.type.MessageType;
|
||||
|
||||
@Target(ElementType.TYPE)
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
/**
|
||||
* 标注
|
||||
* 标注Action类来处理消息请求
|
||||
* @className Action
|
||||
* @author jy
|
||||
* @date 2014年10月12日
|
||||
* @since JDK 1.7
|
||||
* @see
|
||||
*/
|
||||
@Target(ElementType.TYPE)
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
public @interface Action {
|
||||
|
||||
MessageType msgType();
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
action与消息的mapping实现
|
||||
+1
-1
@@ -13,7 +13,7 @@ import java.util.ResourceBundle;
|
||||
import com.foxinmy.weixin4j.mp.server.WeixinServerInitializer;
|
||||
|
||||
/**
|
||||
* 微信服务启动程序
|
||||
* 微信服务netty启动程序
|
||||
*
|
||||
* @className WeixinBootstrap
|
||||
* @author jy
|
||||
|
||||
Reference in New Issue
Block a user