***************************
APPLICATION FAILED TO START
***************************
Description:
Failed to bind properties under 'hm.jwt.location' to cn.hutool.core.io.resource.Resource:
Property: hm.jwt.location
Value: "classpath:hmall.jks"
Origin: class path resource [application.yaml] - 36:15
Reason: org.springframework.core.convert.ConverterNotFoundException: No converter found capable of converting from type [java.lang.String] to type [cn.hutool.core.io.resource.Resource]
Action:
Update your application's configuration
进程已结束,退出代码为 1
特性 | 网关拦截器 (GlobalFilter) | 微服务拦截器 (HandlerInterceptor) | OpenFeign拦截器 (RequestInterceptor) |
---|---|---|---|
作用范围 | 所有进入网关的请求 | 微服务内部的请求处理 | Feign 客户端发起的 HTTP 请求 |
典型用途 | 鉴权、日志记录、流量控制、请求预处理 | 认证与授权、日志记录、数据验证 | 修改请求、添加认证信息、日志记录 |
实现接口 | GlobalFilter | HandlerInterceptor | RequestInterceptor |
触发时机 | 请求进入网关时 | 请求到达控制器之前和之后 | Feign 客户端发起请求前 |
依赖框架 | Spring Cloud Gateway | Spring MVC | OpenFeign |
配置复杂度 | 中等 | 低 | 低 |
适用场景 | 全局拦截、网关层面的统一处理 | 各微服务内部的请求预处理和后处理 | Feign 调用时需要统一处理请求信息+ |