yonge 5 年之前
父節點
當前提交
5efb2d27ed

+ 1 - 1
mec-auth/mec-auth-server/src/main/java/com/ym/mec/auth/config/WebSecurityConfig.java

@@ -70,7 +70,7 @@ public class WebSecurityConfig extends WebSecurityConfigurerAdapter {
 
 	@Override
 	public void configure(WebSecurity web) throws Exception {
-		web.ignoring().antMatchers("/usernameLogin", "/smsLogin", "/refreshToken", "/v2/api-docs","/loginIn","/code/*","/user/setPassword","/user/updatePassword");
+		web.ignoring().antMatchers("/usernameLogin", "/smsLogin", "/refreshToken", "/v2/api-docs","/loginIn","/code/*");
 	}
 
 	@Bean

+ 2 - 2
mec-auth/mec-auth-server/src/main/java/com/ym/mec/auth/web/controller/UserController.java

@@ -78,7 +78,7 @@ public class UserController extends BaseController {
 	}
 
 	@ApiOperation(value = "设置密码")
-	@PostMapping(value = "/setPassword", consumes = MediaType.APPLICATION_FORM_URLENCODED_VALUE)
+	@PostMapping(value = "/setPassword", consumes = MediaType.APPLICATION_FORM_URLENCODED_VALUE, produces = MediaType.APPLICATION_JSON_VALUE)
 	@ApiImplicitParams({ @ApiImplicitParam(name = "mobile", value = "手机号", required = true, dataType = "String"),
 			@ApiImplicitParam(name = "password", value = "密码", required = true, dataType = "String") })
 	public Object setPassword(String mobile, String password) {
@@ -95,7 +95,7 @@ public class UserController extends BaseController {
 	}
 
 	@ApiOperation(value = "修改密码")
-	@PostMapping(value = "/updatePassword", consumes = MediaType.APPLICATION_FORM_URLENCODED_VALUE)
+	@PostMapping(value = "/updatePassword", consumes = MediaType.APPLICATION_FORM_URLENCODED_VALUE, produces = MediaType.APPLICATION_JSON_VALUE)
 	@ApiImplicitParams({ @ApiImplicitParam(name = "mobile", value = "手机号", required = true, dataType = "String"),
 			@ApiImplicitParam(name = "authCode", value = "验证码", required = true, dataType = "String"),
 			@ApiImplicitParam(name = "newPassword", value = "新密码", required = true, dataType = "String") })