java不同module之间调用方法

情况如下:
第一个模块是 common模块
第二个模块是 service模块
在service中想要调用common模块中的方法:需要将common模块导入service的pom.xml文件当中

        <dependency>
            <groupId>com.xxx</groupId>
            <artifactId>common</artifactId>
            <version>0.0.1-SNAPSHOT</version>
        </dependency>

这样可以成功调用common模块中的方法
在这里插入图片描述

Guess you like

Origin blog.csdn.net/weixin_51993595/article/details/120424952