♻️ Refactoring code. @SneakyThrows

This commit is contained in:
冷冷 committed 2019-01-19 22:35:17 +08:00
1 parent f80d6d51e4
commit 271fefcdfc
37 files changed
+206 -171

No files matched your search

@@ -95,7 +95,7 @@ public class SpringContextHolder implements ApplicationContextAware, DisposableB
* 实现DisposableBean接口, 在Context关闭时清理静态变量.
*/
@Override
public void destroy() throws Exception {
public void destroy() {
SpringContextHolder.clearHolder();
}
@@ -23,6 +23,7 @@ import cn.hutool.core.codec.Base64;
import cn.hutool.core.util.CharsetUtil;
import cn.hutool.json.JSONUtil;
import com.pig4cloud.pigx.common.core.exception.CheckedException;
import lombok.SneakyThrows;
import lombok.experimental.UtilityClass;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang.StringUtils;
@@ -204,7 +205,8 @@ public class WebUtils extends org.springframework.web.util.WebUtils {
*
* @return
*/
public String[] getClientId(ServerHttpRequest request) throws Exception {
@SneakyThrows
public String[] getClientId(ServerHttpRequest request) {
String header = request.getHeaders().getFirst(HttpHeaders.AUTHORIZATION);
if (header == null || !header.startsWith(BASIC_)) {