主要删除多个回复相关类

This commit is contained in:
jinyu
2016-05-07 11:15:34 +08:00
parent bda860bb6c
commit 4ecf2c4764
7 changed files with 6 additions and 123 deletions
@@ -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);
}
}
@@ -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");
}