【发布时间】:2013-05-19 09:59:07
【问题描述】:
我正在从 2.1.0 版升级我的 Grails 应用程序。在此升级之前,应用程序运行良好。我下载并设置了新版本的 Grails(最初我尝试了 2.2.1 版,但今天尝试升级到 2.2.2)并在我的应用程序上进行了 Grails 升级。
由于升级我的应用程序不会启动,引用 DuplicateMappingException。
DuplicateMappingException: duplicate import: User refers to both com.mycompany.myapp.User and net.security.User (try using auto-import="false")
或
DuplicateMappingException: duplicate import: Role refers to both net.security.Role and com.mycompany.myapp.Role (try using auto-import="false")
所以在我看来,GORM 出于某种原因认为它需要将这些 net.security 类映射到数据库。
Role 和 User 是我在 Grails 的 Shiro 安全插件中使用的域类。
我尝试将autoImport false 添加到我的域类的映射块中。这会在使用User 或Role 的系统其他部分引起问题。我没有进一步追求这一点,因为我确信这里不应该有冲突。
所以我正在寻找是否有人知道可能导致此问题的原因,或者我可能会尝试解决一些问题。
仅供参考,我已尝试对项目进行 Grails 清理。
谢谢
【问题讨论】:
标签: grails grails-orm grails-plugin shiro grails-2.2