RabbitMQ springboot创建父工程

创建maven工程

略

idea创建maven工程必须修改idea配置

删掉 src

父工程 是空工程,删除 src 目录

pom.xml

修改打包方式

由于父工程是聚合工程,所以将打包方式修改成pom

<!-- 打包方式修改成pom -->
<packaging>pom</packaging>

修改pom.xml

增加 springboot 依赖
增加 SpringBoot的RabbitMQ客户端依赖:spring-boot-starter-amqp

<dependencyManagement>
    <dependencies>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-dependencies</artifactId>
            <version>2.2.2.RELEASE</version>
            <type>pom</type>
            <scope>import</scope>
        </dependency>
    </dependencies>
</dependencyManagement>
<dependencies>
    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-web</artifactId>
    </dependency>

    <!--    SpringBoot的RabbitMQ客户端    -->
    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-amqp</artifactId>
    </dependency>

</dependencies>

原文出处:/show_1IX1ib4sCCGu.html