直播课堂系统02-搭建项目环境

目录

  • 项目结构
  • 创建工程
    • 删除src文件夹
    • 引入依赖
    • 创建model模块
      • model模块引入依赖

项目结构

其中glkt-parent是子目录,用来管理下面所有模块的。
common是公共模块的父节点。
commom_util为工具模块,所有模块都会依赖于它。
service_utils:service服务的base包,包含service服务的公共配置类,所有service模块依赖于它。
rabbit_utils:rabbitmq封装工具类
model:实体类相关模块
server-gateway:服务网关
service:api接口服务父节点
service_acl:权限管理接口服务
service_activity:优惠券api接口服务
service_live:直播课程api接口服务
service_order:订单api接口服务
service_user:用户api接口服务
service_vod:点播课程 api接口服务
service_wechat:公众号api接口服务
service-client:feign服务调用父节点
service-activity-client:优惠券api接口
service-live-client:直播课程api接口
service-order-client:订单api接口
service-user-client:用户api接口
service-vod-client:点播课程api接口
直播课堂系统02-搭建项目环境_第1张图片
这些东西反正我也看不懂,先写着吧。

创建工程

我这边在公司,不能通过IDEA下载spring.io里面的生成,只能去网站里面直接下了。
直播课堂系统02-搭建项目环境_第2张图片

删除src文件夹

直播课堂系统02-搭建项目环境_第3张图片

引入依赖

pom.xml如下


<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.0modelVersion>
	<parent>
		<groupId>org.springframework.bootgroupId>
		<artifactId>spring-boot-starter-parentartifactId>
		<version>2.2.1.RELEASEversion>
		<relativePath/> 
	parent>
	<groupId>com.classgroupId>
	<artifactId>ggkt_parentartifactId>
	<version>0.0.1-SNAPSHOTversion>
	<name>ggkt_parentname>
	<description>Demo project for Spring Bootdescription>
	<properties>
		<skipTests>trueskipTests>
		<java.version>1.8java.version>
		<cloud.version>Hoxton.RELEASEcloud.version>
		<alibaba.version>2.2.0.RELEASEalibaba.version>
		<mybatis-plus.version>3.4.1mybatis-plus.version>
		<mysql.version>5.1.46mysql.version>
		<swagger.version>2.9.2swagger.version>
		<jwt.version>0.7.0jwt.version>
		<fastjson.version>1.2.29fastjson.version>
		<httpclient.version>4.5.1httpclient.version>
		<easyexcel.version>2.2.0-beta2easyexcel.version>
		<aliyun.version>4.5.14aliyun.version>
		<jodatime.version>2.10.1jodatime.version>
		<jwt.version>0.7.0jwt.version>
		<xxl-job.version>2.3.0xxl-job.version>
		<aliyun.oss.version>3.9.0aliyun.oss.version>
	properties>
	
	<dependencyManagement>
		<dependencies>
			<dependency>
				<groupId>org.springframework.cloudgroupId>
				<artifactId>spring-cloud-dependenciesartifactId>
				<version>${cloud.version}version>
				<type>pomtype>
				<scope>importscope>
			dependency>
			<dependency>
				<groupId>com.alibaba.cloudgroupId>
				<artifactId>spring-cloud-alibaba-dependenciesartifactId>
				<version>${alibaba.version}version>
				<type>pomtype>
				<scope>importscope>
			dependency>
			
			<dependency>
				<groupId>com.baomidougroupId>
				<artifactId>mybatis-plus-boot-starterartifactId>
				<version>${mybatis-plus.version}version>
			dependency>
			<dependency>
				<groupId>mysqlgroupId>
				<artifactId>mysql-connector-javaartifactId>
				<version>${mysql.version}version>
			dependency>
			<dependency>
				<groupId>com.github.xiaoymingroupId>
				<artifactId>knife4j-spring-boot-starterartifactId>
				<version>2.0.8version>
			dependency>
			<dependency>
				<groupId>io.jsonwebtokengroupId>
				<artifactId>jjwtartifactId>
				<version>${jwt.version}version>
			dependency>
			<dependency>
				<groupId>org.apache.httpcomponentsgroupId>
				<artifactId>httpclientartifactId>
				<version>${httpclient.version}version>
			dependency>
			<dependency>
				<groupId>com.alibabagroupId>
				<artifactId>fastjsonartifactId>
				<version>${fastjson.version}version>
			dependency>
			<dependency>
				<groupId>com.alibabagroupId>
				<artifactId>easyexcelartifactId>
				<version>${easyexcel.version}version>
			dependency>
			<dependency>
				<groupId>com.aliyungroupId>
				<artifactId>aliyun-java-sdk-coreartifactId>
				<version>${aliyun.version}version>
			dependency>
			
			<dependency>
				<groupId>com.aliyun.ossgroupId>
				<artifactId>aliyun-sdk-ossartifactId>
				<version>${aliyun.oss.version}version>
			dependency>
			
			<dependency>
				<groupId>joda-timegroupId>
				<artifactId>joda-timeartifactId>
				<version>${jodatime.version}version>
			dependency>
			<dependency>
				<groupId>com.xuxueligroupId>
				<artifactId>xxl-job-coreartifactId>
				<version>${xxl-job.version}version>
			dependency>
			
			<dependency>
				<groupId>io.springfoxgroupId>
				<artifactId>springfox-swagger2artifactId>
				<version>${swagger.version}version>
			dependency>
			
			<dependency>
				<groupId>io.springfoxgroupId>
				<artifactId>springfox-swagger-uiartifactId>
				<version>${swagger.version}version>
			dependency>
		dependencies>
	dependencyManagement>

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

project>

创建model模块

直播课堂系统02-搭建项目环境_第4张图片
直播课堂系统02-搭建项目环境_第5张图片

model模块引入依赖

在model的pom.xml下引入


<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_parentartifactId>
        <groupId>com.classgroupId>
        <version>0.0.1-SNAPSHOTversion>
    parent>
    <dependencies>
        <dependency>
            <groupId>org.projectlombokgroupId>
            <artifactId>lombokartifactId>
        dependency>
        
        <dependency>
            <groupId>com.baomidougroupId>
            <artifactId>mybatis-plus-boot-starterartifactId>
            <scope>provided scope>
        dependency>
        <dependency>
            <groupId>com.alibabagroupId>
            <artifactId>easyexcelartifactId>
            <scope>provided scope>
        dependency>
        <dependency>
            <groupId>com.github.xiaoymingroupId>
            <artifactId>knife4j-spring-boot-starterartifactId>
            
            <scope>providedscope>
        dependency>
        <dependency>
            <groupId>org.springframework.bootgroupId>
            <artifactId>spring-boot-starter-data-mongodbartifactId>
            <scope>provided scope>
        dependency>
        <dependency>
            <groupId>com.alibabagroupId>
            <artifactId>fastjsonartifactId>
            <scope>provided scope>
        dependency>
        
        <dependency>
            <groupId>org.springframework.bootgroupId>
            <artifactId>spring-boot-starter-data-elasticsearchartifactId>
            <scope>provided scope>
        dependency>
    dependencies>
    <modelVersion>4.0.0modelVersion>
    <artifactId>modelartifactId>
project>

你可能感兴趣的:(Java,java,spring,boot,java-rabbitmq)