Usage of java Spring framework