Aug 21st, 2011, 05:07 AM
Scaffolding All Controllers with "--preferredMapping" Option
I was looking for an answer to this question: is there any way to scaffold all controllers to a relative path with a command like:
"web mvc all --package ~.controllers --preferredMapping /admin/"
Since these generated UI will be somehow related to DB management and can only be mapped to admin console in real world project. This would save a lot of time.
Thanks for effords,
Aug 21st, 2011, 09:04 PM
The 'web mvc all' command is meant to be shorthand solution for quick scaffolding of all entity types, it does not offer as much configurability as the 'web mvc scaffold' command. So far I have not seen a case where every domain object should be mapped to the same base path. So in your case you would have to issue the 'web mvc scaffold' for each entity type.
If you want to map everything to the admin base path to facilitate your Spring Security configuration you should consider simply locking down all of your views rather than a specific path.
Tags for this Thread