项目场景:
项目场景:项目启动时,服务报错。
问题描述
报错信息为:
org.springframework.beans.factory.BeanDefinitionStoreException: Failed to read candidate component class: URL [jar:file:/xxxxx/tomcat/embed/tomcat-embed-core/8.5.29/tomcat-embed-core-8.5.29.jar!/org/apache/catalina/mapper/Mapper.class]; nested exception is java.lang.ArrayIndexOutOfBoundsException: 62476
原因分析:
经过问题排查,发现 jdk 1.8.131 版本不支持 list.foreach{ … } 写法。
解决方案:
只能使用 普通for循环 写法。
foreach(集合类型 对象 : 要遍历的集合){
对象.操作
}