SOFA框架跨包调用报错NoClassDefFoundError

 报错信息:

java.lang.NoClassDefFoundError

乍一看是找不到这个包,POM也加了  <dependency>  依赖,

        <dependency>

            <groupId>A</groupId>

            <artifactId>B</artifactId>

        </dependency>

但是就是报错无法调用。

实际上POM里还需要添加

        <artifactItem>

              <groupId>A</groupId>

              <artifactId>B</artifactId>

        </artifactItem>

原因是SOFA版本过低,所以需要添加<artifactItem>来支持跨包调用。

猜你喜欢

转载自www.cnblogs.com/hkgov/p/12520947.html