1.新建spring项目
2.上传到github或者gitee
简历多模块的spring boot项目
- 新建父类
删除src
在pom文件中添加
pom
创建子模块
右键根项目依次创建module
因为父类是maven项目 不是直接构建的spring boot项目 所以要在父类里面加上spring boot的依赖
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.2.4.RELEASE</version>
</parent>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-thymeleaf</artifactId>
</dependency>
</dependencies>
2.新建的项目上传到gitee
把项目托管到git
2.登录gitee或GitHub创建远程git仓,并复制地址
3.在idea中添加需要提交的文件
4.提交,写好提交注释并push
5.push时,将见到这个:
把复制的链接丢进去 ok