Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
Q1> 在 spring-roo 中,我如何定义一个我想出现在页面上但不会保留在数据库中的字段。
例如:如果我有一个想要显示在页面上的确认密码字段,以便我可以验证密码但不想保留它。
Q2> 有没有办法直接从 roo shell 定义密码字段。
Q1:用@Transient 标记该字段。这实际上是一个 JPA 问题,而不是 Roo 问题。
Q2:您可以在 roo shell 中定义字段,但我不相信 Roo shell 中存在临时选项。使用 roo shell 生成字段后,您必须使用 @Transient 选项标记字段。
顺便说一句,Roo 岩石。