Handler dispatch failed; nested exception is java.lang.LinkageError: loader constraint violation: when resolving method 'com.alibaba.fastjson.JSONObject com.oppo.tsp.magicbox.m4a.spring.api.siam.SiamAuthService.getAccessToken(java.lang.String)' the class loader org.springframework.boot.devtools.restart.classloader.RestartClassLoader @136bae7e of the current class, com/oppo/sso/util/ApiUtil, and the class loader 'app' for the method's defining class, com/oppo/tsp/magicbox/m4a/spring/api/siam/SiamAuthService, have different Class objects for the type com/alibaba/fastjson/JSONObject used in the signature (com.oppo.sso.util.ApiUtil is in unnamed module of loader org.springframework.boot.devtools.restart.classloader.RestartClassLoader @136bae7e, parent loader 'app'; com.oppo.tsp.magicbox.m4a.spring.api.siam.SiamAuthService is in unnamed module of loader 'app')
错误解析,经多次Google发现 报java.lang.LinkageError:异常的多少jar包冲突,事实也是如此。其中 loader (instance of org/springframework/boot/devtools/restart/classloader/RestartClassLoader) previously ...()中的就是冲突的地方,经Google发现()中的信息与
与该jar有关,注释掉发现问题可以解决。
<!-- spring-boot-devtools --> <!-- <dependency>--> <!-- <groupId>org.springframework.boot</groupId>--> <!-- <artifactId>spring-boot-devtools</artifactId>--> <!-- <optional>true</optional> <!– 表示依赖不会传递 –>--> <!-- </dependency>-->