Skip to content

Instantly share code, notes, and snippets.

@mafei-dev
Created June 29, 2022 10:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mafei-dev/6859a939e402aa728b0a813bcd30acbb to your computer and use it in GitHub Desktop.
Save mafei-dev/6859a939e402aa728b0a813bcd30acbb to your computer and use it in GitHub Desktop.
stacksaga example - order-service-entity-ExternalUserPointsService.java
package org.mono.stacksaga.example.orderservice.service.external;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
@FeignClient(value = "UserPointsService", url = "${services.url.user-service}")
public interface ExternalUserPointsService {
@RequestMapping(method = RequestMethod.PUT, value = "/user/point?user_uid={user_uid}", produces = MediaType.APPLICATION_JSON_VALUE)
void incrementPoints(@PathVariable("user_uid") String userUid);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment