Service模块能够正常调用Entity模块方法,但是一到统一打包的时候发现Entity某个程序包不存在。
这种原因导致的原因是Entity本身不能通过Maven打包成可执行包。
我们可以把Entity打成可以执行的包就不会出现上述问题了。
<plugins> <plugin> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-maven-plugin</artifactId> <configuration> <mainClass>com.jd.entity.EntityApplication</mainClass> <classifier>exec</classifier> </configuration> </plugin> </plugins>