configKey接口匿名访问
This commit is contained in:
parent
0536ca3a4b
commit
be168e54b7
@ -14,6 +14,7 @@ import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import com.ruoyi.common.annotation.Anonymous;
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
@ -80,6 +81,7 @@ public class SysConfigController extends BaseController
|
||||
*/
|
||||
@Operation(summary = "根据参数键名查询参数值")
|
||||
@GetMapping(value = "/configKey/{configKey}")
|
||||
@Anonymous
|
||||
public AjaxResult getConfigKey(@PathVariable( name = "configKey" ) String configKey)
|
||||
{
|
||||
return success(configService.selectConfigByKey(configKey));
|
||||
|
@ -89,11 +89,7 @@ public class SysConfigServiceImpl implements ISysConfigService
|
||||
public boolean selectCaptchaEnabled()
|
||||
{
|
||||
String captchaEnabled = selectConfigByKey("sys.account.captchaEnabled");
|
||||
if (StringUtils.isEmpty(captchaEnabled))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
return Convert.toBool(captchaEnabled);
|
||||
return Convert.toBool(captchaEnabled,true);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user