The generated folder is the default location for code created via the Spring DSL or scaffolding. If you want, you can specify the “src” folder as the destination folder for generated code, either in the scaffolding wizards, or in the Spring DSL editor’s code generation panel. As to why something reappear in the “generated” folder after you delete it, the short answer is that is being re-generated. Items created via the Spring DSL will do this unless code generation has been turned off for that object. Did you enable Spring DSL in your project?
Regards,
Heflin