{"action":"created","issue":{"url":"https://api.github.com/repos/Netflix/archaius/issues/401","repository_url":"https://api.github.com/repos/Netflix/archaius","labels_url":"https://api.github.com/repos/Netflix/archaius/issues/401/labels{/name}","comments_url":"https://api.github.com/repos/Netflix/archaius/issues/401/comments","events_url":"https://api.github.com/repos/Netflix/archaius/issues/401/events","html_url":"https://github.com/Netflix/archaius/pull/401","id":145385739,"number":401,"title":"Back port module to enable ConfigProxyFactory for legacy archaius","user":{"login":"elandau","id":913564,"avatar_url":"https://avatars.githubusercontent.com/u/913564?v=3","gravatar_id":"","url":"https://api.github.com/users/elandau","html_url":"https://github.com/elandau","followers_url":"https://api.github.com/users/elandau/followers","following_url":"https://api.github.com/users/elandau/following{/other_user}","gists_url":"https://api.github.com/users/elandau/gists{/gist_id}","starred_url":"https://api.github.com/users/elandau/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elandau/subscriptions","organizations_url":"https://api.github.com/users/elandau/orgs","repos_url":"https://api.github.com/users/elandau/repos","events_url":"https://api.github.com/users/elandau/events{/privacy}","received_events_url":"https://api.github.com/users/elandau/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-04-02T15:39:37Z","updated_at":"2016-04-02T15:41:40Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/Netflix/archaius/pulls/401","html_url":"https://github.com/Netflix/archaius/pull/401","diff_url":"https://github.com/Netflix/archaius/pull/401.diff","patch_url":"https://github.com/Netflix/archaius/pull/401.patch"},"body":"This change makes it possible to use `ConfigProxyFactory` with any application that still uses Archaius1 for its configuration.  Libraries can now develop to the Archaius2 style of configuration using interfaces and `ConfigProxyFactory` to bind those interfaces to configuration.  \r\n\r\nTo enable just install `Archaius2BackportModule` on the injector and add configuration interface bindings as you would with Archaius2.  Note that Archacius2Backport is meant to be installed instead of `ArchaiusModule` and `StaticArchaiusBridgeModule`.\r\n\r\nNote that there are a few minor restrictions here.  This change does not add support for `@ConfigurationSource` annotations in applications still using Archaius1.  For internal Netflix applications configuration classes would need to specify both `@ConfigurationSource` (for Archaius2) and `@NFProperties` (for Archaius1).  @Configuration is also not supported so library modules should specify the property prefix when creating a proxy instance.  \r\n\r\nFor example,\r\n\r\n```java\r\n// This is the library's configuration interface\r\n@ConfigurationSource(\"myconfig\")\r\n@NFProperties(\"myconfig\")\r\npublic interface MyConfig {\r\n    int getSomeProperty();\r\n}\r\n```\r\n\r\n```\r\n// This is the library module that an application will need to install\r\npublic class MyConfigModule {\r\n    @Override\r\n    public void configure() {}\r\n\r\n    @Provides\r\n    @Singleton\r\n    MyConfig getMyConfig(ConfigProxyFactory factory) {\r\n        return factory.newProxy(MyConfig.class, \"prefix\");\r\n    }\r\n}\r\n```\r\n\r\nThe above setup will load properties from 'myconfig.properties' into archaius and bind the properties\r\n```\r\nprefix.someProperty=123\r\n```"},"comment":{"url":"https://api.github.com/repos/Netflix/archaius/issues/comments/204740749","html_url":"https://github.com/Netflix/archaius/pull/401#issuecomment-204740749","issue_url":"https://api.github.com/repos/Netflix/archaius/issues/401","id":204740749,"user":{"login":"cloudbees-pull-request-builder","id":2611310,"avatar_url":"https://avatars.githubusercontent.com/u/2611310?v=3","gravatar_id":"","url":"https://api.github.com/users/cloudbees-pull-request-builder","html_url":"https://github.com/cloudbees-pull-request-builder","followers_url":"https://api.github.com/users/cloudbees-pull-request-builder/followers","following_url":"https://api.github.com/users/cloudbees-pull-request-builder/following{/other_user}","gists_url":"https://api.github.com/users/cloudbees-pull-request-builder/gists{/gist_id}","starred_url":"https://api.github.com/users/cloudbees-pull-request-builder/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cloudbees-pull-request-builder/subscriptions","organizations_url":"https://api.github.com/users/cloudbees-pull-request-builder/orgs","repos_url":"https://api.github.com/users/cloudbees-pull-request-builder/repos","events_url":"https://api.github.com/users/cloudbees-pull-request-builder/events{/privacy}","received_events_url":"https://api.github.com/users/cloudbees-pull-request-builder/received_events","type":"User","site_admin":false},"created_at":"2016-04-02T15:41:40Z","updated_at":"2016-04-02T15:41:40Z","body":"[archaius-pull-requests #387](https://netflixoss.ci.cloudbees.com/job/archaius-pull-requests/387/) SUCCESS\nThis pull request looks good"}}