added init method to creat spring context