tag:blogger.com,1999:blog-32637828.post6334329626192224650..comments2023-10-31T16:37:25.528+00:00Comments on fahd.blog: Spring 3: JavaConfig vs XML ConfigFahd Shariffhttp://www.blogger.com/profile/00919911016127601294noreply@blogger.comBlogger3125tag:blogger.com,1999:blog-32637828.post-74059983165070451972013-05-25T17:34:14.380+01:002013-05-25T17:34:14.380+01:00No, it's not necessary to explicitly have the ...No, it's not necessary to explicitly have the "destroyMethod" parameter on the Bean annotation because Spring will infer it. In this case, it will notice that the DataSource bean has a close() method available and so will automatically register it as the destroyMethod.Fahd Shariffhttps://www.blogger.com/profile/00919911016127601294noreply@blogger.comtag:blogger.com,1999:blog-32637828.post-67343093765379837782013-05-24T21:07:54.417+01:002013-05-24T21:07:54.417+01:00Do you need this parameter in the Bean annotation?...Do you need this parameter in the Bean annotation? You have it on the xml version:<br />@Bean(destroyMethod = "close")Anonymoushttps://www.blogger.com/profile/04828899423036844981noreply@blogger.comtag:blogger.com,1999:blog-32637828.post-23766556916642919552013-04-26T06:43:20.963+01:002013-04-26T06:43:20.963+01:00This comment has been removed by the author.@uiroshanhttps://www.blogger.com/profile/08109803392616904571noreply@blogger.com