这个报错一般都是由于依赖有重复包了,根据maven或gradle排查下包结构看有没有重复的,下面是我的排查思路
在使用easypoi时遇到了这个问题:
Error creating bean with name ‘requestMappingHandlerMapping’ defined in org.springframework.web.servlet.config.annotation.DelegatingWebMvcConfiguration: Invocation of init method failed; nested exception is java.lang.ArrayStoreException: sun.reflect.annotation.TypeNotPresentExceptionProxy,我是引入了这个整合springboot的包

但这里发现这两个依赖里都有spring-boot这个包导致了包重复,这就是报错的原因

解决办法:
1.使用这个官方提供的这三个单独依赖而不使用跟springboot整合后的依赖

2.使用exclude把重复依赖给排除
本文介绍了在使用Easypoi时遇到的ArrayStoreException,原因在于两个依赖包含重复的spring-boot包。解决方法包括使用官方推荐的独立依赖或排除重复依赖。
4268

被折叠的 条评论
为什么被折叠?



