Giriş
Açıklaması şöyle
Micronaut provides two ways of creating HTTP clients:- A declarative HTTP Client- A programmatic HTTP Client
Örnek
Şöyle yaparız
@Validatedpublic interface PetOperations {@PostSingle<Pet> save(@NotBlank String name, @Min(1L) int age);}@Client("/pets")public interface PetClient extends PetOperations {@OverrideSingle<Pet> save(String name, int age);}PetClient client = applicationContext.getBean(PetOperations.class);Single<Pet> pet = client.save("Hoppie", 1));
Hiç yorum yok:
Yorum Gönder