diff --git a/spzx-common/common-service/src/main/java/com/atguigu/config/WebMvcConfiguration.java b/spzx-common/common-service/src/main/java/com/atguigu/config/WebMvcConfiguration.java index 45ecc53..b1c4e45 100644 --- a/spzx-common/common-service/src/main/java/com/atguigu/config/WebMvcConfiguration.java +++ b/spzx-common/common-service/src/main/java/com/atguigu/config/WebMvcConfiguration.java @@ -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); } } \ No newline at end of file diff --git a/spzx-server-gateway/src/main/resources/application.yml b/spzx-server-gateway/src/main/resources/application.yml index 91ea601..27236dc 100644 --- a/spzx-server-gateway/src/main/resources/application.yml +++ b/spzx-server-gateway/src/main/resources/application.yml @@ -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} diff --git a/spzx-service-client/service-product-client/src/main/java/com/atguigu/feign/product/ProductFeignClient.java b/spzx-service-client/service-product-client/src/main/java/com/atguigu/feign/product/ProductFeignClient.java index 8f9dfde..87ad38e 100644 --- a/spzx-service-client/service-product-client/src/main/java/com/atguigu/feign/product/ProductFeignClient.java +++ b/spzx-service-client/service-product-client/src/main/java/com/atguigu/feign/product/ProductFeignClient.java @@ -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 getBySkuId(@PathVariable("skuId") Long skuId); + Result getBySkuId(@PathVariable Long skuId); } diff --git a/spzx-service/service-cart/pom.xml b/spzx-service/service-cart/pom.xml index c4bf5d5..3af78a5 100644 --- a/spzx-service/service-cart/pom.xml +++ b/spzx-service/service-cart/pom.xml @@ -11,7 +11,7 @@ jar service-cart - http://maven.apache.org + https://maven.apache.org UTF-8 diff --git a/spzx-service/service-user/src/main/java/com/atguigu/user/service/impl/UserInfoServiceImpl.java b/spzx-service/service-user/src/main/java/com/atguigu/user/service/impl/UserInfoServiceImpl.java index 4162cb4..5b3ea0d 100644 --- a/spzx-service/service-user/src/main/java/com/atguigu/user/service/impl/UserInfoServiceImpl.java +++ b/spzx-service/service-user/src/main/java/com/atguigu/user/service/impl/UserInfoServiceImpl.java @@ -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);