1 package com.foxinmy.weixin4j.example.server.handler;
2
3 import org.springframework.stereotype.Component;
4
5 import com.foxinmy.weixin4j.handler.MessageHandlerAdapter;
6 import com.foxinmy.weixin4j.mp.event.ScribeEventMessage;
7 import com.foxinmy.weixin4j.request.WeixinRequest;
8 import com.foxinmy.weixin4j.response.TextResponse;
9 import com.foxinmy.weixin4j.response.WeixinResponse;
10
11
12
13
14
15
16
17
18
19 @Component
20 public class SubscribeMessageHandler extends MessageHandlerAdapter<ScribeEventMessage> {
21
22 @Override
23 public WeixinResponse doHandle0(ScribeEventMessage message) {
24 return new TextResponse("欢迎关注~");
25 }
26 }