Announcement Announcement Module
No announcement yet.
Scaffolding All Controllers with "--preferredMapping" Option Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Scaffolding All Controllers with "--preferredMapping" Option

    Hi community,

    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,


  • #2
    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.