feat(修复): 远程调用失败404
Signed-off-by: bunny <1319900154@qq.com>
This commit is contained in:
parent
87cb1a343a
commit
dc86482af3
|
@ -44,9 +44,6 @@ public class WebMvcConfiguration implements WebMvcConfigurer {
|
|||
registry.addInterceptor(loginAuthInterceptor).addPathPatterns("/admin/**")
|
||||
.excludePathPatterns(loginAuthInterceptors);
|
||||
|
||||
// String[] userLoginAuthInterceptors = {"/api/user/userInfo/login"};
|
||||
registry.addInterceptor(userLoginAuthInterceptor).addPathPatterns("/api/**/auth/**");
|
||||
// registry.addInterceptor(userLoginAuthInterceptor).addPathPatterns("/api/**");
|
||||
// .excludePathPatterns(userLoginAuthInterceptors);
|
||||
}
|
||||
}
|
|
@ -46,11 +46,11 @@ spring:
|
|||
- id: service-cart
|
||||
uri: lb://service-cart
|
||||
predicates:
|
||||
- Path=/api/order/cart/**
|
||||
- Path=/*/order/cart/**
|
||||
- id: service-order
|
||||
uri: lb://service-order
|
||||
predicates:
|
||||
- Path=/api/order/orderInfo/**
|
||||
- Path=/*/order/*/**
|
||||
data:
|
||||
redis:
|
||||
host: ${bunny.redis.host}
|
||||
|
|
|
@ -3,13 +3,11 @@ package com.atguigu.feign.product;
|
|||
import com.atguigu.spzx.model.entity.product.ProductSku;
|
||||
import com.atguigu.spzx.model.vo.result.Result;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
|
||||
@Component
|
||||
@FeignClient(value = "service-product")
|
||||
@FeignClient(name = "service-product")
|
||||
public interface ProductFeignClient {
|
||||
@GetMapping("getBySkuId/{skuId}")
|
||||
Result<ProductSku> getBySkuId(@PathVariable("skuId") Long skuId);
|
||||
Result<ProductSku> getBySkuId(@PathVariable Long skuId);
|
||||
}
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
<packaging>jar</packaging>
|
||||
|
||||
<name>service-cart</name>
|
||||
<url>http://maven.apache.org</url>
|
||||
<url>https://maven.apache.org</url>
|
||||
|
||||
<properties>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
|
|
|
@ -107,11 +107,6 @@ public class UserInfoServiceImpl implements UserInfoService {
|
|||
*/
|
||||
@Override
|
||||
public UserInfoVo getCurrentUserInfo(String token) {
|
||||
// Object tokenObject = redisTemplate.opsForValue().get(token);
|
||||
// emptyUtil.isEmpty(tokenObject, MessageConstant.TOKEN_IS_EMPTY);
|
||||
//
|
||||
// UserInfo userInfo = JSON.parseObject((String) tokenObject, UserInfo.class);
|
||||
|
||||
UserInfo userInfo = BaseContext.getUserInfo();
|
||||
UserInfoVo userInfoVo = new UserInfoVo();
|
||||
BeanUtils.copyProperties(userInfo, userInfoVo);
|
||||
|
|
Loading…
Reference in New Issue