Made changes to use Spring framework feature.