多模块开发

1:

2:自增长

private final static AtomicInteger ID_GENERATOR = new AtomicInteger();

Integer id = ID_GENERATOR.incrementAndGet();
3:主模块配置
<modules>
<module>boot-module-web</module>
<module>boot-module-repository</module>
<module>boot-module-domain</module>
<module>test</module>
</modules>
<packaging>pom</packaging>
4:web层 依赖repository
<dependency>
<groupId>com.myimooc</groupId>
<artifactId>boot-module-repository</artifactId>
<version>0.0.1-SNAPSHOT</version>
</dependency>
//同时继承主模块
<parent>
<artifactId>boot-module</artifactId>
<groupId>com.myimooc</groupId>
<version>0.0.1-SNAPSHOT</version>
</parent>
5:

posted @ 2018-09-07 16:25  zhangniuniu  阅读(165)  评论(0)    收藏  举报