商城项目day10 购物车:
1.报错如下: UnsatisfiedDependencyException:
Unsatisfied dependency expressed through field 'cartService'; nested exception is
Error creating bean with name 'com.changgou.goods.feign.SkuFeign': FactoryBean threw exception on object creation; nested exception is java.lang.IllegalStateException: PathVariable annotation was empty on param 0.
2.原因: 路径变量注解的参数为空

3. 解决: 返回的Result<Sku>的集合
商城项目开发中遇到Day10购物车接口调用问题,主要表现为UnsatisfiedDependencyException,原因是SkuFeign工厂bean创建时PathVariable注解的参数为空。解决方案在于修正返回Result<Sku>集合时的路径变量注解,确保其不为空,从而避免此类异常的发生。
6858

被折叠的 条评论
为什么被折叠?



