添加了微信扫码登录的配置信息
This commit is contained in:
		
							
								
								
									
										29
									
								
								src/main/java/com/xkrs/common/config/ConstantConfig.java
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										29
									
								
								src/main/java/com/xkrs/common/config/ConstantConfig.java
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,29 @@ | ||||
| package com.xkrs.common.config; | ||||
|  | ||||
| import org.springframework.beans.factory.InitializingBean; | ||||
| import org.springframework.beans.factory.annotation.Value; | ||||
|  | ||||
| /** | ||||
|  * @author XinYi Song | ||||
|  */ | ||||
| public class ConstantConfig implements InitializingBean { | ||||
|  | ||||
|     @Value("${wx.open.app_id}") | ||||
|     private String appId; | ||||
|  | ||||
|     @Value("${wx.open.app_secret}") | ||||
|     private String appSecret; | ||||
|  | ||||
|     @Value("${wx.open.redirect_url}") | ||||
|     private String redirectUrl; | ||||
|  | ||||
|     public static String WX_OPEN_APP_ID; | ||||
|     public static String WX_OPEN_APP_SECRET; | ||||
|     public static String WX_OPEN_REDIRECT_URL; | ||||
|     @Override | ||||
|     public void afterPropertiesSet() throws Exception { | ||||
|         WX_OPEN_APP_ID = appId; | ||||
|         WX_OPEN_APP_SECRET = appSecret; | ||||
|         WX_OPEN_REDIRECT_URL = redirectUrl; | ||||
|     } | ||||
| } | ||||
| @@ -270,7 +270,7 @@ public class SysUserServiceImpl implements SysUserService { | ||||
|             response.setCharacterEncoding("UTF-8"); | ||||
|             String token = TokenAuthenticationService.addAuthentications(response, authToken.getName(), authToken.getAuthorities()); | ||||
|             map.put("token",token); | ||||
|             map.put("type",1); | ||||
|             map.put("type","1"); | ||||
|             return outputEncapsulationObject(PromptMessageEnum.SUCCESS,map,locale); | ||||
|         } | ||||
|     } | ||||
|   | ||||
| @@ -29,7 +29,7 @@ spring.datasource.hikari.validation-timeout = 3000 | ||||
| ## Spring Data JPA 配置 | ||||
| spring.jpa.database = POSTGRESQL | ||||
| spring.jpa.database-platform = org.hibernate.dialect.PostgreSQLDialect | ||||
| spring.jpa.show-sql = false | ||||
| spring.jpa.show-sql = true | ||||
| # 指定 ddl mode (none, validate, create, create-drop, update) | ||||
| spring.jpa.hibernate.ddl-auto = update | ||||
| # 命名策略 | ||||
| @@ -77,3 +77,10 @@ my.MaxLoginErrorCount = 5 | ||||
|  | ||||
| ## 自定义用户登录错误间隔时间(分钟) | ||||
| my.LoginErrorIntervalTime = 60 | ||||
|  | ||||
| # 微信开放平台 appid | ||||
| wx.open.app_id=你的appid | ||||
| # 微信开放平台 appsecret | ||||
| wx.open.app_secret=你的appsecret | ||||
| # 微信开放平台 重定向url | ||||
| wx.open.redirect_url=http://你的服务器名称/api/ucenter/wx/callback | ||||
|   | ||||
		Reference in New Issue
	
	Block a user