Resource classes are not managed by spring. so autowiring might not work. (courtesy shruthi)