Search code examples
crudspring-roospring-datajspx

Spring Roo: How to mark some field to not generate MVC scaffold


My Entities configured to be Auditable by Spring Data, so it have 4 fields below:

  • createdBy
  • lastUpdatedBy
  • createdTime
  • lastUpdatedTime

However, I do not want to have it on the CRUD screen which generated by Spring Roo. I try to delete those fields tags in the generated jspx, after that whenever I add/remove field in the Entity, Spring Roo regenerate the jspx and add the deleted field tags.

It quite annoy, do we have any way to mark those fields are not scaffold-able?


Solution

  • In the jspx, set the z attribute to user-managed and render attribute to false.