当前位置:网站首页>Live classroom system 02 build project environment

Live classroom system 02 build project environment

2022-07-23 14:53:00 z754916067

Project structure

among glkt-parent Is subdirectory , Used to manage all the following modules .
common Is the parent node of the public module .
commom_util Is a tool module , All modules will depend on it .
service_utils:service Service base package , contain service The public configuration class of the service , all service Modules depend on it .
rabbit_utils:rabbitmq Wrapper utility class
model: Entity class related modules
server-gateway: The service gateway
service:api Interface service parent node
service_acl: Rights management interface service
service_activity: Coupon api Interface services
service_live: Live course api Interface services
service_order: Order api Interface services
service_user: user api Interface services
service_vod: On demand courses api Interface services
service_wechat: official account api Interface services
service-client:feign The service invokes the parent node
service-activity-client: Coupon api Interface
service-live-client: Live course api Interface
service-order-client: Order api Interface
service-user-client: user api Interface
service-vod-client: On demand courses api Interface
 Insert picture description here
I can't understand these things anyway , Write it first .

Create a project

I'm in the company , Cannot pass IDEA download spring.io The generation inside , You can only go directly to the website .
 Insert picture description here

Delete src Folder

 Insert picture description here

Introduce dependencies

pom.xml as follows

<?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 https://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>2.2.1.RELEASE</version>
		<relativePath/> <!-- lookup parent from repository -->
	</parent>
	<groupId>com.class</groupId>
	<artifactId>ggkt_parent</artifactId>
	<version>0.0.1-SNAPSHOT</version>
	<name>ggkt_parent</name>
	<description>Demo project for Spring Boot</description>
	<properties>
		<skipTests>true</skipTests>
		<java.version>1.8</java.version>
		<cloud.version>Hoxton.RELEASE</cloud.version>
		<alibaba.version>2.2.0.RELEASE</alibaba.version>
		<mybatis-plus.version>3.4.1</mybatis-plus.version>
		<mysql.version>5.1.46</mysql.version>
		<swagger.version>2.9.2</swagger.version>
		<jwt.version>0.7.0</jwt.version>
		<fastjson.version>1.2.29</fastjson.version>
		<httpclient.version>4.5.1</httpclient.version>
		<easyexcel.version>2.2.0-beta2</easyexcel.version>
		<aliyun.version>4.5.14</aliyun.version>
		<jodatime.version>2.10.1</jodatime.version>
		<jwt.version>0.7.0</jwt.version>
		<xxl-job.version>2.3.0</xxl-job.version>
		<aliyun.oss.version>3.9.0</aliyun.oss.version>
	</properties>
	<!-- To configure dependencyManagement Lock the dependent version -->
	<dependencyManagement>
		<dependencies>
			<dependency>
				<groupId>org.springframework.cloud</groupId>
				<artifactId>spring-cloud-dependencies</artifactId>
				<version>${cloud.version}</version>
				<type>pom</type>
				<scope>import</scope>
			</dependency>
			<dependency>
				<groupId>com.alibaba.cloud</groupId>
				<artifactId>spring-cloud-alibaba-dependencies</artifactId>
				<version>${alibaba.version}</version>
				<type>pom</type>
				<scope>import</scope>
			</dependency>
			<!--mybatis-plus  Persistence layer -->
			<dependency>
				<groupId>com.baomidou</groupId>
				<artifactId>mybatis-plus-boot-starter</artifactId>
				<version>${mybatis-plus.version}</version>
			</dependency>
			<dependency>
				<groupId>mysql</groupId>
				<artifactId>mysql-connector-java</artifactId>
				<version>${mysql.version}</version>
			</dependency>
			<dependency>
				<groupId>com.github.xiaoymin</groupId>
				<artifactId>knife4j-spring-boot-starter</artifactId>
				<version>2.0.8</version>
			</dependency>
			<dependency>
				<groupId>io.jsonwebtoken</groupId>
				<artifactId>jjwt</artifactId>
				<version>${jwt.version}</version>
			</dependency>
			<dependency>
				<groupId>org.apache.httpcomponents</groupId>
				<artifactId>httpclient</artifactId>
				<version>${httpclient.version}</version>
			</dependency>
			<dependency>
				<groupId>com.alibaba</groupId>
				<artifactId>fastjson</artifactId>
				<version>${fastjson.version}</version>
			</dependency>
			<dependency>
				<groupId>com.alibaba</groupId>
				<artifactId>easyexcel</artifactId>
				<version>${easyexcel.version}</version>
			</dependency>
			<dependency>
				<groupId>com.aliyun</groupId>
				<artifactId>aliyun-java-sdk-core</artifactId>
				<version>${aliyun.version}</version>
			</dependency>
			<!--aliyunOSS-->
			<dependency>
				<groupId>com.aliyun.oss</groupId>
				<artifactId>aliyun-sdk-oss</artifactId>
				<version>${aliyun.oss.version}</version>
			</dependency>
			<!-- Date time tool -->
			<dependency>
				<groupId>joda-time</groupId>
				<artifactId>joda-time</artifactId>
				<version>${jodatime.version}</version>
			</dependency>
			<dependency>
				<groupId>com.xuxueli</groupId>
				<artifactId>xxl-job-core</artifactId>
				<version>${xxl-job.version}</version>
			</dependency>
			<!--swagger-->
			<dependency>
				<groupId>io.springfox</groupId>
				<artifactId>springfox-swagger2</artifactId>
				<version>${swagger.version}</version>
			</dependency>
			<!--swagger ui-->
			<dependency>
				<groupId>io.springfox</groupId>
				<artifactId>springfox-swagger-ui</artifactId>
				<version>${swagger.version}</version>
			</dependency>
		</dependencies>
	</dependencyManagement>

	<build>
		<plugins>
			<plugin>
				<groupId>org.springframework.boot</groupId>
				<artifactId>spring-boot-maven-plugin</artifactId>
			</plugin>
		</plugins>
	</build>

</project>

establish model modular

 Insert picture description here
 Insert picture description here

model Modules introduce dependencies

stay model Of pom.xml Lower introduction

<?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>ggkt_parent</artifactId>
        <groupId>com.class</groupId>
        <version>0.0.1-SNAPSHOT</version>
    </parent>
    <dependencies>
        <dependency>
            <groupId>org.projectlombok</groupId>
            <artifactId>lombok</artifactId>
        </dependency>
        <!--mybatis-plus-->
        <dependency>
            <groupId>com.baomidou</groupId>
            <artifactId>mybatis-plus-boot-starter</artifactId>
            <scope>provided </scope>
        </dependency>
        <dependency>
            <groupId>com.alibaba</groupId>
            <artifactId>easyexcel</artifactId>
            <scope>provided </scope>
        </dependency>
        <dependency>
            <groupId>com.github.xiaoymin</groupId>
            <artifactId>knife4j-spring-boot-starter</artifactId>
            <!-- When quoting, please use maven Central warehouse search 2.X Latest version number -->
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-data-mongodb</artifactId>
            <scope>provided </scope>
        </dependency>
        <dependency>
            <groupId>com.alibaba</groupId>
            <artifactId>fastjson</artifactId>
            <scope>provided </scope>
        </dependency>
        <!-- Create index library -->
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-data-elasticsearch</artifactId>
            <scope>provided </scope>
        </dependency>
    </dependencies>
    <modelVersion>4.0.0</modelVersion>
    <artifactId>model</artifactId>
</project>
原网站

版权声明
本文为[z754916067]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/204/202207230925011238.html