ProGuard将使Spring Bean名称冲突

问题描述

启动错误

2020-11-06 18:07:31.452  WARN 13120 --- [           main] ConfigServletWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanDeFinitionStoreException: Failed to parse configuration class [com.maple.MapleApplication]; nested exception is org.springframework.context.annotation.ConflictingBeanDeFinitionException: Annotation-specified bean name 'a' for bean class [com.maple.a.d.a.a] conflicts with existing,non-compatible bean deFinition of same name and class [com.maple.a.b.a]
2020-11-06 18:07:31.463 ERROR 13120 --- [           main] o.s.boot.SpringApplication               : Application run Failed
org.springframework.beans.factory.BeanDeFinitionStoreException: Failed to parse configuration class [com.maple.MapleApplication]; nested exception is org.springframework.context.annotation.ConflictingBeanDeFinitionException: Annotation-specified bean name 'a' for bean class [com.maple.a.d.a.a] conflicts with existing,non-compatible bean deFinition of same name and class [com.maple.a.b.a]

我尝试使用Spring deFinition.getBeanClassName()命名规则,但是没有用。如果要在注释上手动设置每个bean的名称,是否会麻烦太多? ProGuard可以提供不重复类名称功能吗?我还没找到。

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)