使用工具:idea
详细步骤:
file->new -> project
然后一路next即可,最后finish
最后我们看到创建后的项目只有项目名称和pom.xml就对了:
二:接下来创建我们的多模块mave子项目:
next -> finish
接下来可以看到我们的两个子模块就创建好了,并且这两个子模块的parent都是spring-security-auth
但是的话还差一点点,我们是通过springboot创建多模块的,是不是感觉还少了点啥??哈哈。。
对的,我们还需要一个子模块作为我们springboot项目的启动模块,对于springboot项目的一些配置和启动类是需要的
像上面添加子模块的步骤一样来到这个界面:
选择我们需要的一些依赖:
最后看到我们的项目结构:
最后还需要配置模块之间的依赖关系:
在我们的父pom中添加模块
父pom常用配置以及依赖
<?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <parent> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-parent</artifactId> <version>1.5.4.RELEASE</version> <relativePath/> <!-- lookup parent from repository --> </parent> <groupId>com.dengwei</groupId> <artifactId>spring-security-auth</artifactId> <version>0.0.1-SNAPSHOT</version>