{"push_id":1711528905,"size":1,"distinct_size":1,"ref":"refs/heads/master","head":"95e145085226ae5975513c53684e68d466faec89","before":"2d3a3efe417fe6b9ffff7b2b06171f1969844b4c","commits":[{"sha":"95e145085226ae5975513c53684e68d466faec89","author":{"name":"JeffAbdu","email":"740c568d2e47d8291991c0a810884f03416064b1@gmail.com"},"message":"Annots to Set Init and Destroy on Beans - Part 1\n\nAnnotations to Set Init and Destroy Methods on Beans - Part1:\n\n- Ability to define some custom code that we can run after Spring has\nbeen intialized, and to run code before a bean is destoyed.\n- init-method would be called after the contructing the bean.\n- destroy-method would be called before destroying the bean.\n\n- Create our init and destroy methods within Fruit.java:\n\npublic void initMethod(){\nSystem.out.println(\"The fruit bean is ready to go.\" + this.description);\n}\n\npublic void destroyMethod(){\nSystem.out.println(\"The fruit bean is about to be destroyed.\");\n}\n\n=> Part1: call init and destry method from the bean:\n- Modify our fruit bean so that the init and destry methods would be\ncalled by the bean:\n\n<bean id=\"fruit\" scope=\"singleton\" class=\"food.Fruit\"\ninit-method=\"initMethod\"\ndestroy-method=\"destroyMethod\">\n<property name=\"description\" value=\"I am a fruit\"/>\n</bean>","distinct":true,"url":"https://api.github.com/repos/JeffAbdu/SpringWithAnnotation/commits/95e145085226ae5975513c53684e68d466faec89"}]}
{"actor":{"display_login":"JeffAbdu"}}