Reputation: 3243
So im trying to use the @client annotation when making external calls..
@Client("/api/external/call")
@Header(name = ACCEPT, value = "application/json")
public interface ExternalCall{
@Get
MyResponse Call();
}
now im not sure should the @Client be like @Client("http://host") and have the @Get("/api/external/call")
I both but whenever i try to run the app i get the following error
Unexpected error occurred: All possible Introduction advise exhausted and no implementation found for method: MyResponse Call() io.micronaut.aop.exceptions.UnimplementedAdviceException: All possible Introduction advise exhausted and no implementation found for method: MyResponse Call()
Not sure why this is...
Upvotes: 0
Views: 1937
Reputation: 11319
I believe that you're missing the following dependency:
<dependency>
<groupId>io.micronaut</groupId>
<artifactId>micronaut-http-client</artifactId>
</dependency>
Upvotes: 0
Reputation: 27245
now im not sure should the @Client be like @Client("http://host") and have the @Get("/api/external/call")
If you had this:
@Client("http://host")
public interface ExternalCall{
@Get("/api/external/call")
MyResponse Call();
}
When you invoke that Call()
method, that should generate a GET request to http://host/api/external/call.
Your question mentions Greeting serviceAGreeting()
and MyResponse Call()
. It isn't clear how those relate to the code you show.
Upvotes: 1