Project uses docker packaged by switching maven plugin Google jib, I found that the project will be prompted method does not exist,
java.lang.NoSuchMethodError: com.zcckj.common.utils.JsonUtils.toJsonString(Ljava/lang/Object;)Ljava/lang/String;
But the original plug-packaged items, including now the local startup is ok!
Investigation method:
Use -verbose: class View class loader:
[Loaded com.zcckj.common.utils.JsonUtils from file:/app/libs/zc-component-common-1.1.9.jar]
This class is found from an old jar inside to take the project, and this method is not new, so NoSuchMethodError
Settlement Act:
<exclusion> <artifactId>zc-component-common</artifactId> <groupId>com.zcckj.component</groupId> </exclusion>
Restart, ok!