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.
我在 grails 应用程序中遇到问题。我的应用程序使用插件生成一些域模型,我需要向其中一个域模型添加一个字段,但我没有源代码。有没有办法动态地做到这一点?例如使用 GORM API 元类或类似的东西?
You could probably just extend the class from the plugin and add your field. That is a common thing to do with plugins like Spring Security Core.
class MyUser extends SecUser { String phoneNumber ... }