Skip to content

Commit b4527aa

Browse files
committed
应用系统体系结构 作业07 微服务
1 parent ef924a1 commit b4527aa

File tree

98 files changed

+2782
-168
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

98 files changed

+2782
-168
lines changed

README.md

Lines changed: 21 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# eBookBackend 互联网应用开发基础 课程大作业后端工程
1+
# eBookBackend 课程大作业后端工程
22

33
给我狠狠地优雅!!!
44

@@ -9,7 +9,6 @@
99
2. 数据库 [看我的Github 互联网开发的仓库包括所有静态资源、SQL文件]
1010
3. Redis
1111
4. ElasticSearch 7.17.6搭配分词器lk 7.17.6(配件plugin文件)
12-
5.
1312

1413
### Kafka
1514
需要下载Kafka,参考这里:https://kafka.apache.org/quickstart
@@ -53,8 +52,23 @@ bin/elasticsearch
5352

5453
### 重要版本依赖说明
5554
- 2022.11.9:进行了Spring底层框架的更新:
56-
- SpringBoot更新使用2.7版本
57-
- ElasticSearch使用7.17.6版本(该版本支持Windows/Linux/Arm Mac/Intel Mac)
58-
- 依赖Spring Data Elasticsearch使用4.4.5版本
59-
- **以上内容如有任何的版本不一致都可能导致项目启动失败!**
60-
- 测试机环境:MacOS Venture13.0 Arm64 CPU
55+
- SpringBoot更新使用2.7版本
56+
- ElasticSearch使用7.17.6版本(该版本支持Windows/Linux/Arm Mac/Intel Mac)
57+
- 依赖Spring Data Elasticsearch使用4.4.5版本
58+
- **以上内容如有任何的版本不一致都可能导致项目启动失败!**
59+
- 测试机环境:MacOS Venture13.0 Arm64 CPU
60+
61+
62+
### 本机核弹启动快捷脚本
63+
需要目录一致才可以!
64+
```bash
65+
# kafka
66+
/Applications/kafka_2.13-3.3.1/bin/zookeeper-server-start.sh /Applications/kafka_2.13-3.3.1/config/zookeeper.properties &
67+
/Applications/kafka_2.13-3.3.1/bin/kafka-server-start.sh /Applications/kafka_2.13-3.3.1/config/server.properties &
68+
69+
# search elasticsearch
70+
/Applications/elasticsearch-7.17.6/bin/elasticsearch &
71+
72+
# redis
73+
brew services start redis
74+
```

eureka/.gitignore

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
HELP.md
2+
target/
3+
!.mvn/wrapper/maven-wrapper.jar
4+
!**/src/main/**/target/
5+
!**/src/test/**/target/
6+
7+
### STS ###
8+
.apt_generated
9+
.classpath
10+
.factorypath
11+
.project
12+
.settings
13+
.springBeans
14+
.sts4-cache
15+
16+
### IntelliJ IDEA ###
17+
.idea
18+
*.iws
19+
*.iml
20+
*.ipr
21+
22+
### NetBeans ###
23+
/nbproject/private/
24+
/nbbuild/
25+
/dist/
26+
/nbdist/
27+
/.nb-gradle/
28+
build/
29+
!**/src/main/**/build/
30+
!**/src/test/**/build/
31+
32+
### VS Code ###
33+
.vscode/
57.4 KB
Binary file not shown.
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.8.6/apache-maven-3.8.6-bin.zip
2+
wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.1.0/maven-wrapper-3.1.0.jar
File renamed without changes.
File renamed without changes.

eureka/pom.xml

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
4+
<modelVersion>4.0.0</modelVersion>
5+
<parent>
6+
<groupId>org.springframework.boot</groupId>
7+
<artifactId>spring-boot-starter-parent</artifactId>
8+
<version>2.5.4</version>
9+
<relativePath/> <!-- lookup parent from repository -->
10+
</parent>
11+
<groupId>com.reins</groupId>
12+
<artifactId>eureka</artifactId>
13+
<version>0.0.1-SNAPSHOT</version>
14+
<name>eureka</name>
15+
<description>eureka</description>
16+
<properties>
17+
<java.version>11</java.version>
18+
<spring-cloud.version>2020.0.3</spring-cloud.version>
19+
</properties>
20+
<dependencies>
21+
<dependency>
22+
<groupId>org.springframework.cloud</groupId>
23+
<artifactId>spring-cloud-starter-netflix-eureka-server</artifactId>
24+
</dependency>
25+
26+
<dependency>
27+
<groupId>org.springframework.boot</groupId>
28+
<artifactId>spring-boot-starter-test</artifactId>
29+
<scope>test</scope>
30+
</dependency>
31+
</dependencies>
32+
<dependencyManagement>
33+
<dependencies>
34+
<dependency>
35+
<groupId>org.springframework.cloud</groupId>
36+
<artifactId>spring-cloud-dependencies</artifactId>
37+
<version>${spring-cloud.version}</version>
38+
<type>pom</type>
39+
<scope>import</scope>
40+
</dependency>
41+
</dependencies>
42+
</dependencyManagement>
43+
44+
<build>
45+
<plugins>
46+
<plugin>
47+
<groupId>org.springframework.boot</groupId>
48+
<artifactId>spring-boot-maven-plugin</artifactId>
49+
</plugin>
50+
</plugins>
51+
</build>
52+
53+
</project>
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
package com.zzq.ebook.eureka;
2+
3+
import org.springframework.boot.SpringApplication;
4+
import org.springframework.boot.autoconfigure.SpringBootApplication;
5+
import org.springframework.cloud.netflix.eureka.server.EnableEurekaServer;
6+
7+
@SpringBootApplication
8+
@EnableEurekaServer
9+
public class EurekaApplication {
10+
public static void main(String[] args) {
11+
SpringApplication.run(EurekaApplication.class, args);
12+
}
13+
}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
server:
2+
port:
3+
8040
4+
spring:
5+
application:
6+
name: Eureka
7+
eureka:
8+
instance:
9+
prefer-ip-address: true
10+
client:
11+
fetch-registry: false
12+
register-with-eureka: false
13+
serviceUrl:
14+
defaultZone: http://localhost:8040/eureka
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
package com.zzq.ebook.eureka;
2+
3+
import org.junit.jupiter.api.Test;
4+
import org.springframework.boot.test.context.SpringBootTest;
5+
6+
@SpringBootTest
7+
class EurekaApplicationTests {
8+
9+
@Test
10+
void contextLoads() {
11+
}
12+
13+
}

0 commit comments

Comments
 (0)