public class SpringFeignClientInterfaceDecoratorRule extends Object implements Rule<com.sun.codemodel.JCodeModel,com.sun.codemodel.JDefinedClass,ApiResourceMetadata>
FeignClient.
The goal is to generate code that does not have to be manually extended by the user.
@FeignClient(url = "http://somehost:8080/people", name = "feignClientPeople")
interface PeopleFeignClient {
@RequestMapping(value="", method=RequestMethod.GET)
ResponseEntity<com.gen.test.model.People> getPeople();
}
Now all the user has to do is to autowire this interface.
This way he can invoke remote endpoint.| Constructor and Description |
|---|
SpringFeignClientInterfaceDecoratorRule() |
| Modifier and Type | Method and Description |
|---|---|
com.sun.codemodel.JDefinedClass |
apply(ApiResourceMetadata metadata,
com.sun.codemodel.JCodeModel generatableType)
Add whatever Java source is required to the given generatable to
represent this rule.
|
public SpringFeignClientInterfaceDecoratorRule()
public final com.sun.codemodel.JDefinedClass apply(ApiResourceMetadata metadata, com.sun.codemodel.JCodeModel generatableType)
Ruleapply in interface Rule<com.sun.codemodel.JCodeModel,com.sun.codemodel.JDefinedClass,ApiResourceMetadata>metadata - The meta data from which the code is build.generatableType - A code generation construct to which this rule should be appliedCopyright © 2017. All rights reserved.