【发布时间】:2012-04-26 17:25:54
【问题描述】:
我在混淆我的项目后收到此错误,eventghout 只有我的实现类 com.company.project.f.a.a.b 符合 @Component("myImpl")
java.lang.IllegalStateException: Annotation-specified bean name 'myImpl' 用于 bean 类 [com.company.project.f.a.a.b] 与现有的不兼容的冲突 同名同类的bean定义[com.company.project.f.a.a.a]
我真的不明白为什么 spring 为 interface 和 implementation 赋予了相同的名称。我的 Proguard 配置有问题吗?
【问题讨论】:
-
我不认为 Proguard 和 Spring 会兼容,因为 Proguard 重命名类、属性等... :(
-
我切换到基于注释的配置,这使得 proguard 可以重命名类属性等.. 我只是在与这些障碍作斗争.. 如果我克服了它,它肯定可以工作。
-
com.company.project.f.a.a.a是什么? -
com.company.project.f.a.a.a是com.company.project.f.a.a.b中实现的接口
-
你确定你的类路径中没有旧 jar 吗?