Commit d1867aa3 authored by fangxinjiang's avatar fangxinjiang

@inner 放行 bug修复

parent f2163871
...@@ -77,6 +77,7 @@ public class HttpDaprUtil { ...@@ -77,6 +77,7 @@ public class HttpDaprUtil {
try { try {
res = restTemplate.postForEntity(URI.create(stringBuffer.toString()),entity, cs); res = restTemplate.postForEntity(URI.create(stringBuffer.toString()),entity, cs);
} catch (Exception e) { } catch (Exception e) {
log.error("日志保存异常:",e);
return R.failed("获取信息失败:" + e.getMessage()); return R.failed("获取信息失败:" + e.getMessage());
} }
if (null != res && CommonConstants.SUCCESS == res.getStatusCodeValue()) { if (null != res && CommonConstants.SUCCESS == res.getStatusCodeValue()) {
......
...@@ -65,15 +65,15 @@ public class PermitAllUrlProperties implements InitializingBean, ApplicationCont ...@@ -65,15 +65,15 @@ public class PermitAllUrlProperties implements InitializingBean, ApplicationCont
// 获取方法上边的注解 替代path variable 为 * // 获取方法上边的注解 替代path variable 为 *
Inner method = AnnotationUtils.findAnnotation(handlerMethod.getMethod(), Inner.class); Inner method = AnnotationUtils.findAnnotation(handlerMethod.getMethod(), Inner.class);
if (null != method && null != info.getPathPatternsCondition()){ if (null != method && null != info.getPatternsCondition()){
Optional.ofNullable(method).ifPresent(inner -> info.getPathPatternsCondition().getPatterns() Optional.ofNullable(method).ifPresent(inner -> info.getPatternsCondition().getPatterns()
.forEach(url -> urls.add(ReUtil.replaceAll( url.toString(), PATTERN, "*")))); .forEach(url -> urls.add(ReUtil.replaceAll( url.toString(), PATTERN, "*"))));
} }
// 获取类上边的注解, 替代path variable 为 * // 获取类上边的注解, 替代path variable 为 *
Inner controller = AnnotationUtils.findAnnotation(handlerMethod.getBeanType(), Inner.class); Inner controller = AnnotationUtils.findAnnotation(handlerMethod.getBeanType(), Inner.class);
if (null != controller && null != info.getPathPatternsCondition()) if (null != controller && null != info.getPatternsCondition())
Optional.ofNullable(controller).ifPresent(inner -> info.getPathPatternsCondition().getPatterns() Optional.ofNullable(controller).ifPresent(inner -> info.getPatternsCondition().getPatterns()
.forEach(url -> urls.add(ReUtil.replaceAll(url.toString(), PATTERN, "*")))); .forEach(url -> urls.add(ReUtil.replaceAll(url.toString(), PATTERN, "*"))));
}); });
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment