0
点赞
收藏
分享

微信扫一扫

后端项目环境搭建-03

海牙秋天 2022-06-01 阅读 50

统计模块

子父模块 ​​his-statistics​​ 模块及子项目的创建

子父模块 his-statistics 的创建

后端项目环境搭建-03_xml

修改 his-statistics 模块的 pom.xml

<?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">
    <parent>
        <artifactId>BNTang-his</artifactId>
        <groupId>com.it6666</groupId>
        <version>1.0</version>
    </parent>
    <modelVersion>4.0.0</modelVersion>
    <artifactId>his-statistics</artifactId>

    <dependencies>
        <dependency>
            <groupId>com.it6666</groupId>
            <artifactId>his-commons</artifactId>
            <version>1.0</version>
        </dependency>
    </dependencies>
</project>

子模块 ​​statistics-domain​​ 的创建

后端项目环境搭建-03_apache_02

修改子模块 statistics-domain 的 pom.xml

<?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">
    <parent>
        <artifactId>his-statistics</artifactId>
        <groupId>com.it6666</groupId>
        <version>1.0</version>
    </parent>
    <modelVersion>4.0.0</modelVersion>
    <artifactId>statistics-domain</artifactId>

    <dependencies>
        <dependency>
            <groupId>com.baomidou</groupId>
            <artifactId>mybatis-plus-boot-starter</artifactId>
        </dependency>
    </dependencies>
</project>

子模块 statistics-api 模块的创建

后端项目环境搭建-03_apache_02

修改 statistics-api 模块的 pom.xml

<?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">
    <parent>
        <artifactId>his-statistics</artifactId>
        <groupId>com.it6666</groupId>
        <version>1.0</version>
    </parent>
    <modelVersion>4.0.0</modelVersion>
    <artifactId>statistics-api</artifactId>

    <dependencies>
        <dependency>
            <groupId>com.it6666</groupId>
            <artifactId>statistics-domain</artifactId>
            <version>1.0</version>
        </dependency>
    </dependencies>
</project>

子模块 statistics-mapper 模块的创建

后端项目环境搭建-03_apache_02

修改 statistics-mapper 模块的 pom.xml

<?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">
    <parent>
        <artifactId>his-statistics</artifactId>
        <groupId>com.it6666</groupId>
        <version>1.0</version>
    </parent>
    <modelVersion>4.0.0</modelVersion>
    <artifactId>statistics-mapper</artifactId>

    <dependencies>
        <dependency>
            <groupId>com.it6666</groupId>
            <artifactId>statistics-domain</artifactId>
            <version>1.0</version>
        </dependency>
    </dependencies>
</project>

子模块 statistics-service 模块的创建

后端项目环境搭建-03_apache_02

修改 statistics-service 模块的 pom.xml

<?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">
    <parent>
        <artifactId>his-statistics</artifactId>
        <groupId>com.it6666</groupId>
        <version>1.0</version>
    </parent>
    <modelVersion>4.0.0</modelVersion>
    <artifactId>statistics-service</artifactId>

    <dependencies>
        <dependency>
            <groupId>com.it6666</groupId>
            <artifactId>statistics-mapper</artifactId>
            <version>1.0</version>
        </dependency>

        <dependency>
            <groupId>com.it6666</groupId>
            <artifactId>statistics-api</artifactId>
            <version>1.0</version>
        </dependency>
        <!-- mysql -->
        <dependency>
            <groupId>mysql</groupId>
            <artifactId>mysql-connector-java</artifactId>
        </dependency>
        <!-- druid -->
        <dependency>
            <groupId>com.alibaba</groupId>
            <artifactId>druid-spring-boot-starter</artifactId>
        </dependency>

        <!-- 测试的依赖 -->
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-test</artifactId>
            <scope>test</scope>
            <exclusions>
                <exclusion>
                    <groupId>org.junit.vintage</groupId>
                    <artifactId>junit-vintage-engine</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <!-- dubbo -->
        <dependency>
            <groupId>org.apache.dubbo</groupId>
            <artifactId>dubbo-spring-boot-starter</artifactId>
        </dependency>
        <!-- 使用zk做注册中心,Dubbo需要的依赖 -->
        <dependency>
            <groupId>org.apache.dubbo</groupId>
            <artifactId>dubbo-dependencies-zookeeper</artifactId>
            <type>pom</type>
            <exclusions>
                <exclusion>
                    <groupId>org.slf4j</groupId>
                    <artifactId>slf4j-log4j12</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
    </dependencies>
</project>

创建 StatisticsApplication 启动类

后端项目环境搭建-03_xml_06

/**
 * @author BNTang
 * @version V1.0
 * @program BNTang-his
 * @date Created in 2020/8/28 14:43
 * @description 统计模块启动类
 **/
@SpringBootApplication
@MapperScan(basePackages&nbsp;=&nbsp;{&quot;com.it6666.mapper&quot;})
@EnableDubbo
public&nbsp;class&nbsp;StatisticsApplication&nbsp;{

&nbsp;&nbsp;&nbsp;&nbsp;public&nbsp;static&nbsp;void&nbsp;main(String[]&nbsp;args)&nbsp;{
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;SpringApplication.run(StatisticsApplication.class,&nbsp;args);
&nbsp;&nbsp;&nbsp;&nbsp;}
}

小程序模块 his-app 模块及子项目的创建和配置,这个小程序前端我们后面再正式做的时候再来创建


QQ群:598347590,源文件:​​https://github.com/XiaoHuiHuiT/BNTang-his/releases/tag/it6666-Releasev1.0​​



举报

相关推荐

0 条评论