修改发送短信接口

master
bynt 1 year ago
parent 8670e2bce8
commit e5d9aae2d1

@ -72,7 +72,7 @@ public class WebSecurityConfig extends WebSecurityConfigurerAdapter {
.and()
.authorizeRequests();
config.antMatchers("/actuator/**", "/oauth/**", "/auth/**", "/token/**","/sms/getCode").permitAll();
config.antMatchers("/actuator/**", "/oauth/**", "/auth/**", "/token/**","/sms/createCode").permitAll();
ignoreUrlPropsConfig.getUrls().forEach(url -> config.antMatchers(url).permitAll());
ignoreUrlPropsConfig.getIgnoreSecurity().forEach(url -> config.antMatchers(url).permitAll());
config

@ -26,7 +26,7 @@ public class SmsController {
private final SmsService smsService;
@GetMapping("/getCode")
@GetMapping("/createCode")
public Result<String> sendSMS(@RequestParam String mobile) {
if (StringUtils.isBlank(mobile) || !MobileUtil.checkPhone(mobile)) {
throw new BadRequestException("发送短信失败");

Loading…
Cancel
Save