Skip to content

Commit

Permalink
chore: Profile 어노테이션으로 Order 모듈 feign client 분리
Browse files Browse the repository at this point in the history
  • Loading branch information
clean2001 committed Oct 28, 2024
1 parent a86a234 commit e62939a
Show file tree
Hide file tree
Showing 5 changed files with 41 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
import java.util.List;
import java.util.Optional;

@FeignClient(name = "member-service", configuration = FeignConfig.class)
public interface MemberFeign {

@GetMapping(value = "/member/{id}")
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
package org.samtuap.inong.common.client;


import org.samtuap.inong.config.FeignConfig;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.context.annotation.Profile;

@Profile("local")
@FeignClient(name = "member-service", configuration = FeignConfig.class)
public interface MemberFeignLocal extends MemberFeign {
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
package org.samtuap.inong.common.client;

import org.samtuap.inong.config.FeignConfig;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.context.annotation.Profile;

@Profile("prod")
@FeignClient(name = "member-service", url = "http://member-service", configuration = FeignConfig.class)
public interface MemberFeignProd extends MemberFeign {
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
package org.samtuap.inong.common.client;

import org.samtuap.inong.config.FeignConfig;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.context.annotation.Profile;

@Profile("local")
@FeignClient(name = "product-service", configuration = FeignConfig.class)
public interface ProductFeignLocal extends ProductFeign {
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
package org.samtuap.inong.common.client;

import org.samtuap.inong.config.FeignConfig;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.context.annotation.Profile;

@Profile("prod")
@FeignClient(name = "product-service", url="http://product-service", configuration = FeignConfig.class)
public interface ProductFeignProd extends ProductFeign {
}

0 comments on commit e62939a

Please sign in to comment.