java program  to generate file and data in spring framework