当我有一个从作为 EJB 的 UserT 类扩展的 grails 域类 User 时,在 User() 实例化中会引发错误。我不明白这个问题的原因,请帮助我并解释为什么需要 init 方法以及它应该在哪里。以下是错误代码:
Error creating bean with name 'gn.User': Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [gn.User]: Constructor threw exception; nested exception is java.lang.NoSuchMethodError: com.jobs.users.UserT: method <init>()V not found