【探花交友】day01—项目介绍与环境搭建(四)

本文涉及的产品
云数据库 RDS MySQL,集群系列 2核4GB
推荐场景:
搭建个人博客
RDS MySQL Serverless 基础系列,0.5-2RCU 50GB
Redis 开源版,标准版 2GB
推荐场景:
搭建游戏排行榜
简介: 【探花交友】day01—项目介绍与环境搭建(四)

4.5、模块依赖

tanhua

1. <properties>
2. <maven.compiler.source>8</maven.compiler.source>
3. <maven.compiler.target>8</maven.compiler.target>
4. <mysql.version>5.1.47</mysql.version>
5. <jackson.version>2.11.0</jackson.version>
6. <druid.version>1.0.9</druid.version>
7. <servlet-api.version>2.5</servlet-api.version>
8. <jsp-api.version>2.0</jsp-api.version>
9. <joda-time.version>2.5</joda-time.version>
10. <commons-lang3.version>3.3.2</commons-lang3.version>
11. <commons-io.version>1.3.2</commons-io.version>
12. <mybatis.version>3.5.6</mybatis.version>
13. <mybatis.mybatis-plus>3.4.1</mybatis.mybatis-plus>
14. <lombok.version>1.18.8</lombok.version>
15. <mongo.version>4.0.5</mongo.version>
16. <spring-cloud.version>Hoxton.SR10</spring-cloud.version>
17. <spring-cloud-alibaba.version>2.2.5.RELEASE</spring-cloud-alibaba.version>
18. </properties>
19. 
20. <!--通用依赖-->
21. <dependencies>
22. <dependency>
23. <groupId>org.springframework.boot</groupId>
24. <artifactId>spring-boot-starter-test</artifactId>
25. <scope>test</scope>
26. </dependency>
27. <dependency>
28. <groupId>junit</groupId>
29. <artifactId>junit</artifactId>
30. <version>4.12</version>
31. <scope>test</scope>
32. </dependency>
33. <dependency>
34. <groupId>org.projectlombok</groupId>
35. <artifactId>lombok</artifactId>
36. </dependency>
37. <dependency>
38. <groupId>cn.hutool</groupId>
39. <artifactId>hutool-all</artifactId>
40. <version>5.4.3</version>
41. </dependency>
42. <dependency>
43. <groupId>com.alibaba</groupId>
44. <artifactId>fastjson</artifactId>
45. <version>1.2.8</version>
46. </dependency>
47. </dependencies>
48. 
49. <dependencyManagement>
50. <dependencies>
51. <dependency>
52. <groupId>io.netty</groupId>
53. <artifactId>netty-bom</artifactId>
54. <version>4.1.59.Final</version>
55. <type>pom</type>
56. <scope>import</scope>
57. </dependency>
58. 
59. <dependency>
60. <groupId>io.projectreactor</groupId>
61. <artifactId>reactor-bom</artifactId>
62. <version>2020.0.4</version>
63. <type>pom</type>
64. <scope>import</scope>
65. </dependency>
66. 
67. <dependency>
68. <groupId>io.projectreactor.netty</groupId>
69. <artifactId>reactor-netty</artifactId>
70. <version>0.9.8.RELEASE</version>
71. </dependency>
72. 
73. <dependency>
74. <groupId>org.springframework.cloud</groupId>
75. <artifactId>spring-cloud-dependencies</artifactId>
76. <version>${spring-cloud.version}</version>
77. <type>pom</type>
78. <scope>import</scope>
79. </dependency>
80. 
81. <dependency>
82. <groupId>com.alibaba.cloud</groupId>
83. <artifactId>spring-cloud-alibaba-dependencies</artifactId>
84. <version>${spring-cloud-alibaba.version}</version>
85. <type>pom</type>
86. <scope>import</scope>
87. </dependency>
88. 
89. <dependency>
90. <groupId>joda-time</groupId>
91. <artifactId>joda-time</artifactId>
92. <version>${joda-time.version}</version>
93. </dependency>
94. 
95. <!-- mybatis-plus插件依赖 -->
96. <dependency>
97. <groupId>com.baomidou</groupId>
98. <artifactId>mybatis-plus</artifactId>
99. <version>${mybatis.mybatis-plus}</version>
100. </dependency>
101. 
102. <!-- MySql -->
103. <dependency>
104. <groupId>mysql</groupId>
105. <artifactId>mysql-connector-java</artifactId>
106. <version>${mysql.version}</version>
107. </dependency>
108. 
109. <dependency>
110. <groupId>org.mongodb</groupId>
111. <artifactId>mongodb-driver-sync</artifactId>
112. <version>${mongodb.version}</version>
113. </dependency>
114. 
115. <dependency>
116. <groupId>org.projectlombok</groupId>
117. <artifactId>lombok</artifactId>
118. <optional>true</optional>
119. <version>${lombok.version}</version>
120. </dependency>
121. 
122. <dependency>
123. <groupId>org.apache.commons</groupId>
124. <artifactId>commons-lang3</artifactId>
125. <version>${commons-lang3.version}</version>
126. </dependency>
127. 
128. <dependency>
129. <groupId>org.apache.commons</groupId>
130. <artifactId>commons-lang3</artifactId>
131. <version>3.7</version>
132. </dependency>
133. <!-- Jackson Json处理工具包 -->
134. <dependency>
135. <groupId>com.fasterxml.jackson.core</groupId>
136. <artifactId>jackson-databind</artifactId>
137. <version>${jackson.version}</version>
138. </dependency>
139. <dependency>
140. <groupId>com.alibaba</groupId>
141. <artifactId>druid</artifactId>
142. <version>${druid.version}</version>
143. </dependency>
144. <dependency>
145. <groupId>commons-codec</groupId>
146. <artifactId>commons-codec</artifactId>
147. <version>1.11</version>
148. </dependency>
149. </dependencies>
150. </dependencyManagement>
151. 
152. <build>
153. <plugins>
154. <!-- java编译插件 -->
155. <plugin>
156. <groupId>org.apache.maven.plugins</groupId>
157. <artifactId>maven-compiler-plugin</artifactId>
158. <version>3.2</version>
159. <configuration>
160. <source>1.8</source>
161. <target>1.8</target>
162. <encoding>UTF-8</encoding>
163. </configuration>
164. </plugin>
165. </plugins>
166. </build>

tanhua-app-server

1. <dependencies>
2. 
3. <dependency>
4. <groupId>org.springframework.boot</groupId>
5. <artifactId>spring-boot-starter-web</artifactId>
6. </dependency>
7. 
8. <!--SpringDataRedis依赖-->
9. <dependency>
10. <groupId>org.springframework.boot</groupId>
11. <artifactId>spring-boot-starter-data-redis</artifactId>
12. </dependency>
13. 
14. <!--lombok依赖-->
15. <dependency>
16. <groupId>org.projectlombok</groupId>
17. <artifactId>lombok</artifactId>
18. </dependency>
19. 
20. <!--工具包-->
21. <dependency>
22. <groupId>org.apache.commons</groupId>
23. <artifactId>commons-lang3</artifactId>
24. </dependency>
25. <dependency>
26. <groupId>com.fasterxml.jackson.core</groupId>
27. <artifactId>jackson-databind</artifactId>
28. </dependency>
29. <dependency>
30. <groupId>commons-codec</groupId>
31. <artifactId>commons-codec</artifactId>
32. </dependency>
33. <dependency>
34. <groupId>joda-time</groupId>
35. <artifactId>joda-time</artifactId>
36. </dependency>
37. 
38. <!--jwt依赖-->
39. <dependency>
40. <groupId>io.jsonwebtoken</groupId>
41. <artifactId>jjwt</artifactId>
42. <version>0.9.1</version>
43. </dependency>
44. 
45. <!--fastdfs文件存储-->
46. <dependency>
47. <groupId>com.github.tobato</groupId>
48. <artifactId>fastdfs-client</artifactId>
49. <version>1.26.7</version>
50. <exclusions>
51. <exclusion>
52. <groupId>ch.qos.logback</groupId>
53. <artifactId>logback-classic</artifactId>
54. </exclusion>
55. </exclusions>
56. </dependency>
57. 
58. 
59. <!-- Dubbo Spring Cloud Starter-->
60. <dependency>
61. <groupId>com.alibaba.cloud</groupId>
62. <artifactId>spring-cloud-starter-dubbo</artifactId>
63. </dependency>
64. 
65. <!-- Spring Cloud Nacos Service Discovery-->
66. <dependency>
67. <groupId>com.alibaba.cloud</groupId>
68. <artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId>
69. </dependency>
70. 
71. <!-- nacos配置中心依赖支持
72.     <dependency>
73.         <groupId>com.alibaba.cloud</groupId>
74.         <artifactId>spring-cloud-starter-alibaba-nacos-config</artifactId>
75.     </dependency>
76.   -->
77. <!--RabbitMQ
78.     <dependency>
79.         <groupId>org.springframework.boot</groupId>
80.         <artifactId>spring-boot-starter-amqp</artifactId>
81.     </dependency>
82.   -->
83. <dependency>
84. <groupId>com.itheima</groupId>
85. <artifactId>tanhua-dubbo-interface</artifactId>
86. <version>1.0-SNAPSHOT</version>
87. </dependency>
88. <dependency>
89. <groupId>com.itheima</groupId>
90. <artifactId>tanhua-commons</artifactId>
91. <version>1.0-SNAPSHOT</version>
92. </dependency>
93. <dependency>
94. <groupId>com.itheima</groupId>
95. <artifactId>tanhua-autoconfig</artifactId>
96. <version>1.0-SNAPSHOT</version>
97. </dependency>
98. </dependencies>
99. 
100. <build>
101. <finalName>tanhua-app-server</finalName>
102. <plugins>
103. <plugin>
104. <groupId>org.springframework.boot</groupId>
105. <artifactId>spring-boot-maven-plugin</artifactId>
106. <version>2.3.9.RELEASE</version>
107. </plugin>
108. </plugins>
109. </build>

tanhua-autoconfig

1. <dependencies>
2. 
3. <dependency>
4. <groupId>org.springframework.boot</groupId>
5. <artifactId>spring-boot-starter-web</artifactId>
6. </dependency>
7. 
8. <!--SpringDataRedis依赖-->
9. <dependency>
10. <groupId>org.springframework.boot</groupId>
11. <artifactId>spring-boot-starter-data-redis</artifactId>
12. </dependency>
13. 
14. <!--lombok依赖-->
15. <dependency>
16. <groupId>org.projectlombok</groupId>
17. <artifactId>lombok</artifactId>
18. </dependency>
19. 
20. <!--工具包-->
21. <dependency>
22. <groupId>org.apache.commons</groupId>
23. <artifactId>commons-lang3</artifactId>
24. </dependency>
25. <dependency>
26. <groupId>com.fasterxml.jackson.core</groupId>
27. <artifactId>jackson-databind</artifactId>
28. </dependency>
29. <dependency>
30. <groupId>commons-codec</groupId>
31. <artifactId>commons-codec</artifactId>
32. </dependency>
33. <dependency>
34. <groupId>joda-time</groupId>
35. <artifactId>joda-time</artifactId>
36. </dependency>
37. 
38. <!--jwt依赖-->
39. <dependency>
40. <groupId>io.jsonwebtoken</groupId>
41. <artifactId>jjwt</artifactId>
42. <version>0.9.1</version>
43. </dependency>
44. 
45. <!--fastdfs文件存储-->
46. <dependency>
47. <groupId>com.github.tobato</groupId>
48. <artifactId>fastdfs-client</artifactId>
49. <version>1.26.7</version>
50. <exclusions>
51. <exclusion>
52. <groupId>ch.qos.logback</groupId>
53. <artifactId>logback-classic</artifactId>
54. </exclusion>
55. </exclusions>
56. </dependency>
57. 
58. 
59. <!-- Dubbo Spring Cloud Starter-->
60. <dependency>
61. <groupId>com.alibaba.cloud</groupId>
62. <artifactId>spring-cloud-starter-dubbo</artifactId>
63. </dependency>
64. 
65. <!-- Spring Cloud Nacos Service Discovery-->
66. <dependency>
67. <groupId>com.alibaba.cloud</groupId>
68. <artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId>
69. </dependency>
70. 
71. <!-- nacos配置中心依赖支持
72.     <dependency>
73.         <groupId>com.alibaba.cloud</groupId>
74.         <artifactId>spring-cloud-starter-alibaba-nacos-config</artifactId>
75.     </dependency>
76.   -->
77. <!--RabbitMQ
78.     <dependency>
79.         <groupId>org.springframework.boot</groupId>
80.         <artifactId>spring-boot-starter-amqp</artifactId>
81.     </dependency>
82.   -->
83. <dependency>
84. <groupId>com.itheima</groupId>
85. <artifactId>tanhua-dubbo-interface</artifactId>
86. <version>1.0-SNAPSHOT</version>
87. </dependency>
88. <dependency>
89. <groupId>com.itheima</groupId>
90. <artifactId>tanhua-commons</artifactId>
91. <version>1.0-SNAPSHOT</version>
92. </dependency>
93. <dependency>
94. <groupId>com.itheima</groupId>
95. <artifactId>tanhua-autoconfig</artifactId>
96. <version>1.0-SNAPSHOT</version>
97. </dependency>
98. </dependencies>
99. 
100. <build>
101. <finalName>tanhua-app-server</finalName>
102. <plugins>
103. <plugin>
104. <groupId>org.springframework.boot</groupId>
105. <artifactId>spring-boot-maven-plugin</artifactId>
106. <version>2.3.9.RELEASE</version>
107. </plugin>
108. </plugins>
109. </build>

tanhua-commons

1. <dependencies>
2. <!--工具包-->
3. <dependency>
4. <groupId>org.apache.commons</groupId>
5. <artifactId>commons-lang3</artifactId>
6. </dependency>
7. <dependency>
8. <groupId>commons-codec</groupId>
9. <artifactId>commons-codec</artifactId>
10. </dependency>
11. <dependency>
12. <groupId>joda-time</groupId>
13. <artifactId>joda-time</artifactId>
14. </dependency>
15. <!--jwt依赖-->
16. <dependency>
17. <groupId>io.jsonwebtoken</groupId>
18. <artifactId>jjwt</artifactId>
19. <version>0.9.1</version>
20. </dependency>
21. </dependencies>

tanhua-dubbo-db

1. <dependencies>
2. 
3. <dependency>
4. <groupId>org.springframework.boot</groupId>
5. <artifactId>spring-boot-starter-web</artifactId>
6. </dependency>
7. 
8. <dependency>
9. <groupId>com.baomidou</groupId>
10. <artifactId>mybatis-plus</artifactId>
11. </dependency>
12. 
13. <dependency>
14. <groupId>com.baomidou</groupId>
15. <artifactId>mybatis-plus-boot-starter</artifactId>
16. <version>${mybatis.mybatis-plus}</version>
17. </dependency>
18. 
19. <dependency>
20. <groupId>mysql</groupId>
21. <artifactId>mysql-connector-java</artifactId>
22. </dependency>
23. 
24. <dependency>
25. <groupId>com.alibaba</groupId>
26. <artifactId>druid</artifactId>
27. </dependency>
28. 
29. <dependency>
30. <groupId>org.projectlombok</groupId>
31. <artifactId>lombok</artifactId>
32. </dependency>
33. 
34. <dependency>
35. <groupId>org.apache.commons</groupId>
36. <artifactId>commons-lang3</artifactId>
37. </dependency>
38. 
39. <dependency>
40. <groupId>com.fasterxml.jackson.core</groupId>
41. <artifactId>jackson-databind</artifactId>
42. </dependency>
43. 
44. <dependency>
45. <groupId>commons-codec</groupId>
46. <artifactId>commons-codec</artifactId>
47. </dependency>
48. 
49. <dependency>
50. <groupId>joda-time</groupId>
51. <artifactId>joda-time</artifactId>
52. </dependency>
53. 
54. <!-- Dubbo Spring Cloud Starter -->
55. <dependency>
56. <groupId>com.alibaba.cloud</groupId>
57. <artifactId>spring-cloud-starter-dubbo</artifactId>
58. </dependency>
59. 
60. <!-- Spring Cloud Nacos Service Discovery -->
61. <dependency>
62. <groupId>com.alibaba.cloud</groupId>
63. <artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId>
64. </dependency>
65. 
66. <!-- nacos配置中心依赖支持
67.     <dependency>
68.         <groupId>com.alibaba.cloud</groupId>
69.         <artifactId>spring-cloud-starter-alibaba-nacos-config</artifactId>
70.     </dependency>
71.   -->
72. <dependency>
73. <groupId>com.itheima</groupId>
74. <artifactId>tanhua-dubbo-interface</artifactId>
75. <version>1.0-SNAPSHOT</version>
76. </dependency>
77. </dependencies>
78. 
79. <build>
80. <finalName>tanhua-dubbo-db</finalName>
81. <plugins>
82. <plugin>
83. <groupId>org.springframework.boot</groupId>
84. <artifactId>spring-boot-maven-plugin</artifactId>
85. <version>2.3.9.RELEASE</version>
86. </plugin>
87. </plugins>
88. </build>

tanhua-dubbo-interface

1. <dependencies>
2. <dependency>
3. <groupId>com.itheima</groupId>
4. <artifactId>tanhua-model</artifactId>
5. <version>1.0-SNAPSHOT</version>
6. </dependency>
7. </dependencies>

tanhua-dubbo-mongo

1. <dependencies>
2. 
3. <dependency>
4. <groupId>org.springframework.boot</groupId>
5. <artifactId>spring-boot-starter-web</artifactId>
6. </dependency>
7. 
8. <dependency>
9. <groupId>org.projectlombok</groupId>
10. <artifactId>lombok</artifactId>
11. </dependency>
12. 
13. <dependency>
14. <groupId>org.apache.commons</groupId>
15. <artifactId>commons-lang3</artifactId>
16. </dependency>
17. 
18. <dependency>
19. <groupId>com.fasterxml.jackson.core</groupId>
20. <artifactId>jackson-databind</artifactId>
21. </dependency>
22. 
23. <dependency>
24. <groupId>commons-codec</groupId>
25. <artifactId>commons-codec</artifactId>
26. </dependency>
27. 
28. <dependency>
29. <groupId>joda-time</groupId>
30. <artifactId>joda-time</artifactId>
31. </dependency>
32. 
33. <!-- Dubbo Spring Cloud Starter -->
34. <dependency>
35. <groupId>com.alibaba.cloud</groupId>
36. <artifactId>spring-cloud-starter-dubbo</artifactId>
37. </dependency>
38. 
39. <!-- Spring Cloud Nacos Service Discovery -->
40. <dependency>
41. <groupId>com.alibaba.cloud</groupId>
42. <artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId>
43. </dependency>
44. 
45. <!-- nacos配置中心依赖支持
46.     <dependency>
47.         <groupId>com.alibaba.cloud</groupId>
48.         <artifactId>spring-cloud-starter-alibaba-nacos-config</artifactId>
49.     </dependency>
50.   -->
51. <dependency>
52. <groupId>com.itheima</groupId>
53. <artifactId>tanhua-commons</artifactId>
54. <version>1.0-SNAPSHOT</version>
55. </dependency>
56. 
57. <dependency>
58. <groupId>com.itheima</groupId>
59. <artifactId>tanhua-dubbo-interface</artifactId>
60. <version>1.0-SNAPSHOT</version>
61. </dependency>
62. </dependencies>
63. 
64. <build>
65. <finalName>tanhua-dubbo-db</finalName>
66. <plugins>
67. <plugin>
68. <groupId>org.springframework.boot</groupId>
69. <artifactId>spring-boot-maven-plugin</artifactId>
70. <version>2.3.9.RELEASE</version>
71. </plugin>
72. </plugins>
73. </build>

tanhua-model

1. <dependencies>
2. <!--SpringDataMongo起步依赖
3.     <dependency>
4.         <groupId>org.springframework.boot</groupId>
5.         <artifactId>spring-boot-starter-data-mongodb</artifactId>
6.     </dependency>
7.     <dependency>
8.         <groupId>org.mongodb</groupId>
9.         <artifactId>mongodb-driver-sync</artifactId>
10.         <version>${mongodb.version}</version>
11.     </dependency>
12.   -->
13. <!--MybatisPlus起步依赖-->
14. <dependency>
15. <groupId>com.baomidou</groupId>
16. <artifactId>mybatis-plus</artifactId>
17. </dependency>
18. </dependencies>

4.6、搭建环境

tanhua-app-server端添加引导类和配置文件application.yml

1. //启动类
2. @SpringBootApplication
3. public class AppServerApplication {
4. 
5. public static void main(String[] args) {
6.         SpringApplication.run(AppServerApplication.class,args);
7.     }
8. }
相关实践学习
基于Redis实现在线游戏积分排行榜
本场景将介绍如何基于Redis数据库实现在线游戏中的游戏玩家积分排行榜功能。
云数据库 Redis 版使用教程
云数据库Redis版是兼容Redis协议标准的、提供持久化的内存数据库服务,基于高可靠双机热备架构及可无缝扩展的集群架构,满足高读写性能场景及容量需弹性变配的业务需求。 产品详情:https://www.aliyun.com/product/kvstore &nbsp; &nbsp; ------------------------------------------------------------------------- 阿里云数据库体验:数据库上云实战 开发者云会免费提供一台带自建MySQL的源数据库&nbsp;ECS 实例和一台目标数据库&nbsp;RDS实例。跟着指引,您可以一步步实现将ECS自建数据库迁移到目标数据库RDS。 点击下方链接,领取免费ECS&amp;RDS资源,30分钟完成数据库上云实战!https://developer.aliyun.com/adc/scenario/51eefbd1894e42f6bb9acacadd3f9121?spm=a2c6h.13788135.J_3257954370.9.4ba85f24utseFl
相关文章
|
6月前
|
Java
POETIZE个人博客系统源码 | 最美博客
这是一个 SpringBoot + Vue2 + Vue3 的产物,支持移动端自适应,配有完备的前台和后台管理功能。 网站分两个模块: 博客系统:具有文章,表白墙,图片墙,收藏夹,乐曲,视频播放,留言,友链,时间线,后台管理等功能。 聊天室系统:具有朋友圈(时间线),好友,群等功能。
119 5
POETIZE个人博客系统源码 | 最美博客
|
架构师 Java 大数据
美团特供IDEA入门实战笔记CSDN显踪,竟无良程序员白嫖后举报下架
《IntelliJ IDEA入门与实战》蕴含的知识体系甚广。 主要基于IntelliJ IDEA官方文档以及作者实际工作经验为广大读者深入挖掘IDEA不为人知的功能。 是一本理论和实践相结合的图书,将非常完善地介绍IntelliJ IDEA所涵盖的方方面面的知识,并通过大量生动形象的图片以及实战案例加深读者对IntelliJ IDEA的理解,相信读者必会受益匪浅。
|
云安全 安全 Java
【探花交友】day01—项目介绍与环境搭建(五)
【探花交友】day01—项目介绍与环境搭建(五)
152 0
|
Web App开发 Dubbo NoSQL
【探花交友】day01—项目介绍与环境搭建(三)
【探花交友】day01—项目介绍与环境搭建(三)
252 0
|
存储 分布式计算 NoSQL
【探花交友】day01—项目介绍与环境搭建(二)
【探花交友】day01—项目介绍与环境搭建(二)
135 0
|
JSON 前端开发 安全
【探花交友】day01—项目介绍与环境搭建(六)
【探花交友】day01—项目介绍与环境搭建(六)
144 0
|
搜索推荐 算法 大数据
【探花交友】day01—项目介绍与环境搭建(一)
【探花交友】day01—项目介绍与环境搭建
185 0
|
人工智能 程序员 Linux
【猿如意】CSDN推出的程序猿开发百宝箱
【猿如意】CSDN推出的程序猿开发百宝箱
210 0
|
前端开发 JavaScript Java
基于Javaweb 开发的个人博客系统心灵小阁
基于Javaweb 开发的个人博客系统心灵小阁
280 0
基于Javaweb 开发的个人博客系统心灵小阁
|
机器学习/深度学习 编解码 人工智能
CSDN粉丝解答:六月份第二期精选——简单bug处理、资料索取、编程系统设计等
CSDN粉丝解答:六月份第二期精选——简单bug处理、资料索取、编程系统设计等
CSDN粉丝解答:六月份第二期精选——简单bug处理、资料索取、编程系统设计等