Service discovery, configuration, circuit breakers, load balancing, and API gateway.
// Discovery Server
@SpringBootApplication
@EnableEurekaServer
public class DiscoveryServerApplication {}
// Client registration
@SpringBootApplication
@EnableDiscoveryClient
public class UserServiceApplication {}
# Client configuration
spring:
application:
name: user-service
eureka:
client:
service-url:
defaultZone: http://localhost:8761/eureka
instance:
prefer-ip-address: true
@FeignClient(
name = "order-service",
fallbackFactory = OrderClientFallbackFactory.class
)
public interface OrderClient {
@GetMapping("/api/orders/{userId}")
List<Order> getOrdersByUser(@PathVariable Long userId);
@PostMapping("/api/orders")
Order createOrder(@RequestBody CreateOrderRequest request);
}
@Component
public class OrderClientFallbackFactory implements FallbackFactory<OrderClient> {
@Override
public OrderClient create(Throwable cause) {
return new OrderClient() {
@Override
public List<Order> getOrdersByUser(Long userId) {
log.warn("Fallback: returning empty orders", cause);
return List.of();
}
// ...
};
}
}
@Service
public class PaymentService {
@CircuitBreaker(name = "payment", fallbackMethod = "fallback")
@Retry(name = "payment")
@TimeLimiter(name = "payment")
public CompletableFuture<PaymentResult> process(Payment payment) {
return CompletableFuture.supplyAsync(() -> paymentGateway.process(payment));
}
public CompletableFuture<PaymentResult> fallback(Payment payment, Throwable t) {
return CompletableFuture.completedFuture(PaymentResult.pending());
}
}
resilience4j:
circuitbreaker:
instances:
payment:
sliding-window-size: 10
failure-rate-threshold: 50
wait-duration-in-open-state: 30s
retry:
instances:
payment:
max-attempts: 3
wait-duration: 500ms
Search for places (restaurants, cafes, etc.) via Google Places API proxy on localhost.
Interact with GitHub using the `gh` CLI. Use `gh issue`, `gh pr`, `gh run`, and `gh api` for issues, PRs, CI runs, and advanced queries.
Create or update AgentSkills. Use when designing, structuring, or packaging skills with scripts, references, and assets.
Start voice calls via the OpenClaw voice-call plugin.
Notion API for creating and managing pages, databases, and blocks.
Gemini CLI for one-shot Q&A, summaries, and generation.
Category:developer