{"id":20660918,"url":"https://github.com/openfeign/feign-cdi","last_synced_at":"2025-04-19T15:10:59.710Z","repository":{"id":57734398,"uuid":"75575797","full_name":"OpenFeign/feign-cdi","owner":"OpenFeign","description":"CDI provider for injecting Feign types","archived":false,"fork":false,"pushed_at":"2019-03-04T08:19:04.000Z","size":95,"stargazers_count":7,"open_issues_count":5,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-29T09:11:50.785Z","etag":null,"topics":["cdi","feign-interfaces","http-client"],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/OpenFeign.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-12-05T01:05:25.000Z","updated_at":"2023-10-21T14:53:26.000Z","dependencies_parsed_at":"2022-09-10T20:12:07.682Z","dependency_job_id":null,"html_url":"https://github.com/OpenFeign/feign-cdi","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OpenFeign%2Ffeign-cdi","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OpenFeign%2Ffeign-cdi/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OpenFeign%2Ffeign-cdi/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OpenFeign%2Ffeign-cdi/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/OpenFeign","download_url":"https://codeload.github.com/OpenFeign/feign-cdi/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249723219,"owners_count":21315975,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cdi","feign-interfaces","http-client"],"created_at":"2024-11-16T19:06:30.678Z","updated_at":"2025-04-19T15:10:59.690Z","avatar_url":"https://github.com/OpenFeign.png","language":"Java","readme":"# Feign CDI\nIntegration for OpenFeign with Java Contexts \u0026 Dependency Injection, allowing you to inject your type safe restful interfaces\n\n## Adding to your project\nFeign CDI is built using Apache Maven.  Artifacts are published, though there's only a single artifact at this time.\n\n```xml\n\u003cdependency\u003e\n    \u003cgroupId\u003eio.github.openfeign.cdi\u003c/groupId\u003e\n    \u003cartifactId\u003efeign-cdi\u003c/artifactId\u003e\n    \u003cversion\u003e0.1.6\u003c/version\u003e\n\u003c/dependency\u003e\n```\n\n## Creating clients\nFeign CDI uses the normal Feign interfaces for declaring your rest client.  You can add additional annotations to your interface to support CDI integration\n\n### @FeignClient\n\n```java\npublic @interface FeignClient {\n    Logger.Level logLevel() default Logger.Level.NONE;\n\n    Class\u003c? extends Contract\u003e contract() default Contract.Default.class;\n\n    Class\u003c? extends Client\u003e client() default CDIClient.class;\n\n    Class\u003c? extends Decoder\u003e decoder() default Decoder.Default.class;\n\n    Class\u003c? extends Encoder\u003e encoder() default Encoder.Default.class;\n\n    Class\u003c? extends ErrorDecoder\u003e errorDecoder() default ErrorDecoder.Default.class;\n\n    Class\u003c? extends InvocationHandlerFactory\u003e invocationHandlerFactory() default InvocationHandlerFactory.Default.class;\n\n    Class\u003c? extends Logger\u003e logger() default Logger.NoOpLogger.class;\n\n    Class\u003c? extends Retryer\u003e retryer() default Retryer.Default.class;\n\n    Class\u003c? extends RequestInterceptor\u003e[] requestInterceptors() default {};\n\n    String url();\n\n    int connectTimeoutMillis() default 10 * 1000;\n\n    int readTimeoutMillis() default 60 * 1000;\n\n    boolean decode404() default false;\n}\n```\n\n`@FeignClient` is an annotation to place on your interfaces where you can define the normal configuration options for Feign interfaces.  The defaults here match the defaults in `Feign.Builder`, except for the client implementation to support no-arg constructors.\n\nAny class configured here will follow one of two options:\n\n- Managed CDI Beans\n- No-args constructor\n\nAny classes you use here should be normal scoped beans - don't use `@Dependent` as there is no creational context.  If no bean is found, then this extension will instantiate the class using its default constructor.\n\n### Managing Scopes\n\nAny `@Scope` declared on the interface will be used by the bean.\n\n### Registering the extension\n\nThe CDI extension class to register is `feign.cdi.impl.FeignExtension`, which will add annotated client beans for each interface discovered.","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopenfeign%2Ffeign-cdi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fopenfeign%2Ffeign-cdi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopenfeign%2Ffeign-cdi/lists"}