主要删除多个回复相关类
This commit is contained in:
-3
@@ -38,11 +38,8 @@ public class Weixin4jServerStartupWithoutThread {
|
||||
* @throws WeixinException
|
||||
*/
|
||||
public static void main(String[] args) throws WeixinException {
|
||||
//ApplicationContext applicationContext = new ClassPathXmlApplicationContext(
|
||||
// new String[] { "classpath:/spring-bean.xml" });
|
||||
new WeixinServerBootstrap(aesToken)
|
||||
.handlerPackagesToScan(handlerPackage).openAlwaysResponse()
|
||||
//.resolveBeanFactory(new SpringBeanFactory(applicationContext))
|
||||
.startup(port);
|
||||
}
|
||||
}
|
||||
|
||||
+4
@@ -20,9 +20,13 @@ import com.foxinmy.weixin4j.response.WeixinResponse;
|
||||
*/
|
||||
@Component
|
||||
public class HelloMessageHandler extends MessageHandlerAdapter<TextMessage> {
|
||||
|
||||
@Override
|
||||
public boolean canHandle0(WeixinRequest request, TextMessage message)
|
||||
throws WeixinException {
|
||||
/**
|
||||
* 用户输入hello时
|
||||
*/
|
||||
return message.getContent().equalsIgnoreCase("hello");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user