{"action":"created","issue":{"url":"https://api.github.com/repos/spring-projects/spring-boot/issues/7532","repository_url":"https://api.github.com/repos/spring-projects/spring-boot","labels_url":"https://api.github.com/repos/spring-projects/spring-boot/issues/7532/labels{/name}","comments_url":"https://api.github.com/repos/spring-projects/spring-boot/issues/7532/comments","events_url":"https://api.github.com/repos/spring-projects/spring-boot/issues/7532/events","html_url":"https://github.com/spring-projects/spring-boot/issues/7532","id":192464741,"number":7532,"title":"How can I controller the order of beans?","user":{"login":"jearton","id":10370433,"avatar_url":"https://avatars.githubusercontent.com/u/10370433?v=3","gravatar_id":"","url":"https://api.github.com/users/jearton","html_url":"https://github.com/jearton","followers_url":"https://api.github.com/users/jearton/followers","following_url":"https://api.github.com/users/jearton/following{/other_user}","gists_url":"https://api.github.com/users/jearton/gists{/gist_id}","starred_url":"https://api.github.com/users/jearton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jearton/subscriptions","organizations_url":"https://api.github.com/users/jearton/orgs","repos_url":"https://api.github.com/users/jearton/repos","events_url":"https://api.github.com/users/jearton/events{/privacy}","received_events_url":"https://api.github.com/users/jearton/received_events","type":"User","site_admin":false},"labels":[{"id":293438798,"url":"https://api.github.com/repos/spring-projects/spring-boot/labels/waiting-for-triage","name":"waiting-for-triage","color":"ededed","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2016-11-30T03:15:12Z","updated_at":"2016-11-30T05:51:46Z","closed_at":null,"body":"I want to initialize ZBean before ABean. How to do that? Here is my code, It dose not work!\r\n\r\n```\r\n@Component\r\npublic class ZBean implements DisposableBean, Ordered {\r\n    public ZBean() {\r\n        System.out.println(\"init\");\r\n    }\r\n\r\n    @Override\r\n    public void destroy() throws Exception {\r\n        System.out.println(\"destroy\");\r\n    }\r\n\r\n    @Override\r\n    public int getOrder() {\r\n        return Ordered.HIGHEST_PRECEDENCE;\r\n    }\r\n}\r\n\r\n@Component\r\npublic class ABean implements Ordered {\r\n\r\n    public ABean() {\r\n        System.out.println(\"init\");\r\n    }\r\n\r\n    @Override\r\n    public int getOrder() {\r\n        return Ordered.LOWEST_PRECEDENCE;\r\n    }\r\n}\r\n```"},"comment":{"url":"https://api.github.com/repos/spring-projects/spring-boot/issues/comments/263789536","html_url":"https://github.com/spring-projects/spring-boot/issues/7532#issuecomment-263789536","issue_url":"https://api.github.com/repos/spring-projects/spring-boot/issues/7532","id":263789536,"user":{"login":"jearton","id":10370433,"avatar_url":"https://avatars.githubusercontent.com/u/10370433?v=3","gravatar_id":"","url":"https://api.github.com/users/jearton","html_url":"https://github.com/jearton","followers_url":"https://api.github.com/users/jearton/followers","following_url":"https://api.github.com/users/jearton/following{/other_user}","gists_url":"https://api.github.com/users/jearton/gists{/gist_id}","starred_url":"https://api.github.com/users/jearton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jearton/subscriptions","organizations_url":"https://api.github.com/users/jearton/orgs","repos_url":"https://api.github.com/users/jearton/repos","events_url":"https://api.github.com/users/jearton/events{/privacy}","received_events_url":"https://api.github.com/users/jearton/received_events","type":"User","site_admin":false},"created_at":"2016-11-30T05:51:46Z","updated_at":"2016-11-30T05:51:46Z","body":"@code-4-fun Assuming that ZBean is in a dependent jar which can not see other beans, how to do that?"}}
{"actor":{"display_login":"jearton"}}