You can not select more than 25 topics
			Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
		
		
		
		
			
				
					22 lines
				
				588 B
			
		
		
			
		
	
	
					22 lines
				
				588 B
			| 
											3 years ago
										 | package com.ynxbd.common.config.manager;
 | ||
|  | 
 | ||
|  | import weixin.popular.support.TokenManager;
 | ||
|  | 
 | ||
|  | import javax.servlet.ServletContextEvent;
 | ||
|  | import javax.servlet.ServletContextListener;
 | ||
|  | 
 | ||
|  | public class TokenManagerListener implements ServletContextListener {
 | ||
|  | 
 | ||
|  |     @Override
 | ||
|  |     public void contextInitialized(ServletContextEvent sce) {
 | ||
|  |         //WEB容器 初始化时调用
 | ||
|  |         TokenManager.init("appid", "secret");
 | ||
|  |     }
 | ||
|  | 
 | ||
|  |     @Override
 | ||
|  |     public void contextDestroyed(ServletContextEvent sce) {
 | ||
|  |         //WEB容器  关闭时调用
 | ||
|  |         TokenManager.destroyed();
 | ||
|  |     }
 | ||
|  | }
 |