diff --git a/backend/.idea/encodings.xml b/backend/.idea/encodings.xml
index 2bdc926..80d12fb 100644
--- a/backend/.idea/encodings.xml
+++ b/backend/.idea/encodings.xml
@@ -3,6 +3,8 @@
+
+
diff --git a/backend/.idea/misc.xml b/backend/.idea/misc.xml
index 424401e..16ae2d6 100644
--- a/backend/.idea/misc.xml
+++ b/backend/.idea/misc.xml
@@ -11,5 +11,5 @@
-
+
\ No newline at end of file
diff --git a/backend/.idea/runConfigurations/EurekaServerApp.xml b/backend/.idea/runConfigurations/EurekaServerApp.xml
new file mode 100644
index 0000000..1f90625
--- /dev/null
+++ b/backend/.idea/runConfigurations/EurekaServerApp.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/backend/.idea/runConfigurations/Gateway.xml b/backend/.idea/runConfigurations/Gateway.xml
index 3c10d71..a9712ff 100644
--- a/backend/.idea/runConfigurations/Gateway.xml
+++ b/backend/.idea/runConfigurations/Gateway.xml
@@ -1,6 +1,8 @@
+
+
diff --git a/backend/.idea/runConfigurations/MiniProgram.xml b/backend/.idea/runConfigurations/MiniProgram.xml
index 42e0a30..a02dc88 100644
--- a/backend/.idea/runConfigurations/MiniProgram.xml
+++ b/backend/.idea/runConfigurations/MiniProgram.xml
@@ -1,6 +1,8 @@
+
+
diff --git a/backend/.idea/runConfigurations/UserProvider.xml b/backend/.idea/runConfigurations/UserProvider.xml
index 947733e..9001a7a 100644
--- a/backend/.idea/runConfigurations/UserProvider.xml
+++ b/backend/.idea/runConfigurations/UserProvider.xml
@@ -1,6 +1,8 @@
+
+
diff --git a/backend/.idea/runConfigurations/UserProvider_Remote.xml b/backend/.idea/runConfigurations/UserProvider_Remote.xml
index 9988cfb..95bbaf7 100644
--- a/backend/.idea/runConfigurations/UserProvider_Remote.xml
+++ b/backend/.idea/runConfigurations/UserProvider_Remote.xml
@@ -1,6 +1,8 @@
+
+
diff --git a/backend/microservice-common/pom.xml b/backend/microservice-common/pom.xml
index c466565..934bff1 100644
--- a/backend/microservice-common/pom.xml
+++ b/backend/microservice-common/pom.xml
@@ -13,8 +13,8 @@
UTF-8
- 11
- 11
+ 17
+ 17
@@ -26,7 +26,6 @@
org.springframework
spring-beans
- 5.3.22
diff --git a/backend/microservice-eureka-server-8761/pom.xml b/backend/microservice-eureka-server-8761/pom.xml
new file mode 100644
index 0000000..6f2922c
--- /dev/null
+++ b/backend/microservice-eureka-server-8761/pom.xml
@@ -0,0 +1,43 @@
+
+
+
+
+
+
+
+
+ 4.0.0
+
+ com.cxyxiaomo
+ microservice-eureka-server-8761
+ 0.0.1-SNAPSHOT
+
+ microservice-eureka-server
+
+
+ UTF-8
+ 17
+ 17
+
+
+
+
+
+
+ org.springframework.cloud
+ spring-cloud-dependencies
+ 2022.0.1
+ pom
+ import
+
+
+
+
+
+
+ org.springframework.cloud
+ spring-cloud-starter-netflix-eureka-server
+
+
+
diff --git a/backend/microservice-eureka-server-8761/src/main/java/com/cxyxiaomo/epp/EurekaServerApp.java b/backend/microservice-eureka-server-8761/src/main/java/com/cxyxiaomo/epp/EurekaServerApp.java
new file mode 100644
index 0000000..c894f3a
--- /dev/null
+++ b/backend/microservice-eureka-server-8761/src/main/java/com/cxyxiaomo/epp/EurekaServerApp.java
@@ -0,0 +1,13 @@
+package com.cxyxiaomo.epp;
+
+import org.springframework.boot.SpringApplication;
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+import org.springframework.cloud.netflix.eureka.server.EnableEurekaServer;
+
+@SpringBootApplication
+@EnableEurekaServer
+public class EurekaServerApp {
+ public static void main(String[] args) {
+ SpringApplication.run(EurekaServerApp.class, args);
+ }
+}
diff --git a/backend/microservice-eureka-server-8761/src/main/resources/application.yml b/backend/microservice-eureka-server-8761/src/main/resources/application.yml
new file mode 100644
index 0000000..1d30784
--- /dev/null
+++ b/backend/microservice-eureka-server-8761/src/main/resources/application.yml
@@ -0,0 +1,16 @@
+server:
+ port: 8761
+
+eureka:
+ instance:
+ hostname: localhost
+ client:
+ register-with-eureka: false # 是否向注册中心注册自己
+ fetch-registry: false # false表示自己端就是注册中心,我的职责就是维护服务实例,并不需要去检索服务
+ # 以上两个配置只需要在单机版配置,集群版不需要配这两个
+ service-url:
+ defaultZone: http://${eureka.instance.hostname}:${server.port}/eureka/
+
+spring:
+ application:
+ name: microservice-eureka-server
diff --git a/backend/microservice-eureka-server-8761/src/test/java/com/epp/AppTest.java b/backend/microservice-eureka-server-8761/src/test/java/com/epp/AppTest.java
new file mode 100644
index 0000000..fe8f1f2
--- /dev/null
+++ b/backend/microservice-eureka-server-8761/src/test/java/com/epp/AppTest.java
@@ -0,0 +1,12 @@
+package com.epp;
+
+/**
+ * Unit test for simple App.
+ */
+public class AppTest {
+ /**
+ * Rigorous Test :-)
+ */
+ public void shouldAnswerWithTrue() {
+ }
+}
diff --git a/backend/microservice-gateway/pom.xml b/backend/microservice-gateway/pom.xml
index 66749a7..2dbce76 100644
--- a/backend/microservice-gateway/pom.xml
+++ b/backend/microservice-gateway/pom.xml
@@ -13,8 +13,8 @@
UTF-8
- 1.7
- 1.7
+ 17
+ 17
@@ -32,17 +32,6 @@
org.springframework.cloud
spring-cloud-starter-loadbalancer
-
-
- com.alibaba.cloud
- spring-cloud-starter-alibaba-nacos-discovery
-
-
- snakeyaml
- org.yaml
-
-
-
ch.qos.logback
diff --git a/backend/microservice-gateway/src/main/resources/application.yml b/backend/microservice-gateway/src/main/resources/application.yml
index 0d5b49f..b867727 100644
--- a/backend/microservice-gateway/src/main/resources/application.yml
+++ b/backend/microservice-gateway/src/main/resources/application.yml
@@ -6,9 +6,6 @@ spring:
application:
name: microservice-gateway
cloud:
- nacos:
- discovery:
- server-addr: 127.0.0.1:8848
gateway:
discovery:
locator:
diff --git a/backend/microservice-provider-access-8002/pom.xml b/backend/microservice-provider-access-8002/pom.xml
index 79c3553..5d22585 100644
--- a/backend/microservice-provider-access-8002/pom.xml
+++ b/backend/microservice-provider-access-8002/pom.xml
@@ -13,8 +13,8 @@
UTF-8
- 11
- 11
+ 17
+ 17
@@ -67,21 +67,11 @@
-
- org.springframework.boot
- spring-boot-test
-
org.springframework.boot
spring-boot-starter-web
-
-
- com.alibaba.cloud
- spring-cloud-starter-alibaba-nacos-discovery
-
-
org.springframework.cloud
diff --git a/backend/microservice-provider-access-8002/src/main/java/com/cxyxiaomo/epp/access/config/WebSocketConfig.java b/backend/microservice-provider-access-8002/src/main/java/com/cxyxiaomo/epp/access/config/WebSocketConfig.java.bak
similarity index 100%
rename from backend/microservice-provider-access-8002/src/main/java/com/cxyxiaomo/epp/access/config/WebSocketConfig.java
rename to backend/microservice-provider-access-8002/src/main/java/com/cxyxiaomo/epp/access/config/WebSocketConfig.java.bak
diff --git a/backend/microservice-provider-access-8002/src/main/java/com/cxyxiaomo/epp/access/controller/WebSocketServer.java b/backend/microservice-provider-access-8002/src/main/java/com/cxyxiaomo/epp/access/controller/WebSocketServer.java.bak
similarity index 100%
rename from backend/microservice-provider-access-8002/src/main/java/com/cxyxiaomo/epp/access/controller/WebSocketServer.java
rename to backend/microservice-provider-access-8002/src/main/java/com/cxyxiaomo/epp/access/controller/WebSocketServer.java.bak
diff --git a/backend/microservice-provider-access-8002/src/main/resources/application.yml b/backend/microservice-provider-access-8002/src/main/resources/application.yml
index 3ca973b..2c5ce88 100644
--- a/backend/microservice-provider-access-8002/src/main/resources/application.yml
+++ b/backend/microservice-provider-access-8002/src/main/resources/application.yml
@@ -12,9 +12,6 @@ spring:
application:
name: microservice-provider-access
cloud:
- nacos:
- discovery:
- server-addr: 127.0.0.1:8848
datasource:
type: com.alibaba.druid.pool.DruidDataSource
driver-class-name: com.mysql.cj.jdbc.Driver
diff --git a/backend/microservice-provider-test-8011/pom.xml b/backend/microservice-provider-test-8011/pom.xml
index f6e4ffa..af81a46 100644
--- a/backend/microservice-provider-test-8011/pom.xml
+++ b/backend/microservice-provider-test-8011/pom.xml
@@ -13,25 +13,16 @@
UTF-8
- 11
- 11
+ 17
+ 17
-
- org.springframework.boot
- spring-boot-test
-
org.springframework.boot
spring-boot-starter-web
-
-
- com.alibaba.cloud
- spring-cloud-starter-alibaba-nacos-discovery
-
ch.qos.logback
diff --git a/backend/microservice-provider-test-8011/src/main/java/com/cxyxiaomo/epp/test/TestProvider.java b/backend/microservice-provider-test-8011/src/main/java/com/cxyxiaomo/epp/test/TestProvider.java
index e44e20a..b9845ef 100644
--- a/backend/microservice-provider-test-8011/src/main/java/com/cxyxiaomo/epp/test/TestProvider.java
+++ b/backend/microservice-provider-test-8011/src/main/java/com/cxyxiaomo/epp/test/TestProvider.java
@@ -2,12 +2,10 @@ package com.cxyxiaomo.epp.test;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
-import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
// 启动类
@SpringBootApplication
-@EnableDiscoveryClient
public class TestProvider {
public static void main(String[] args) {
SpringApplication.run(TestProvider.class, args);
diff --git a/backend/microservice-provider-test-8011/src/main/resources/application.yml b/backend/microservice-provider-test-8011/src/main/resources/application.yml
index a280a1f..d7773ed 100644
--- a/backend/microservice-provider-test-8011/src/main/resources/application.yml
+++ b/backend/microservice-provider-test-8011/src/main/resources/application.yml
@@ -6,6 +6,3 @@ spring:
application:
name: microservice-provider-test
cloud:
- nacos:
- discovery:
- server-addr: 127.0.0.1:8848
diff --git a/backend/microservice-provider-user-8001/pom.xml b/backend/microservice-provider-user-8001/pom.xml
index b11dff7..a8e6c37 100644
--- a/backend/microservice-provider-user-8001/pom.xml
+++ b/backend/microservice-provider-user-8001/pom.xml
@@ -13,8 +13,8 @@
UTF-8
- 11
- 11
+ 17
+ 17
@@ -67,28 +67,16 @@
-
- org.springframework.boot
- spring-boot-test
-
org.springframework.boot
spring-boot-starter-web
-
+
- com.alibaba.cloud
- spring-cloud-starter-alibaba-nacos-discovery
+ org.springframework.cloud
+ spring-cloud-starter-netflix-eureka-client
-
-
-
-
-
-
-
-
diff --git a/backend/microservice-provider-user-8001/src/main/java/com/cxyxiaomo/epp/user/UserProvider.java b/backend/microservice-provider-user-8001/src/main/java/com/cxyxiaomo/epp/user/UserProvider.java
index 24ee429..c50c32d 100644
--- a/backend/microservice-provider-user-8001/src/main/java/com/cxyxiaomo/epp/user/UserProvider.java
+++ b/backend/microservice-provider-user-8001/src/main/java/com/cxyxiaomo/epp/user/UserProvider.java
@@ -4,6 +4,7 @@ import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
+// import org.springframework.cloud.netflix.eureka.server.EnableEurekaClient;
// 启动类
@SpringBootApplication
diff --git a/backend/microservice-provider-user-8001/src/main/resources/application.yml b/backend/microservice-provider-user-8001/src/main/resources/application.yml
index 371ef53..af0c426 100644
--- a/backend/microservice-provider-user-8001/src/main/resources/application.yml
+++ b/backend/microservice-provider-user-8001/src/main/resources/application.yml
@@ -11,13 +11,13 @@ mybatis:
spring:
application:
name: microservice-provider-user
- cloud:
- nacos:
- discovery:
- server-addr: 127.0.0.1:8848
datasource:
type: com.alibaba.druid.pool.DruidDataSource
driver-class-name: com.mysql.cj.jdbc.Driver
url: jdbc:mysql://127.0.0.1:3306/epp?useUnicode=true&characterEncoding=utf8&useSSL=false
username: root
password: root
+eureka:
+ client:
+ service-url:
+ defaultZone: http://localhost:8761/eureka/
diff --git a/backend/pom.xml b/backend/pom.xml
index f39cca6..f95da21 100644
--- a/backend/pom.xml
+++ b/backend/pom.xml
@@ -13,6 +13,7 @@
pom
+ microservice-eureka-server-8761
microservice-gateway
microservice-common
microservice-provider-user-8001
@@ -22,10 +23,10 @@
- 11
+ 17
UTF-8
- 11
- 11
+ 17
+ 17
4.13.2
1.2.17
1.18.24
@@ -43,7 +44,7 @@
org.springframework.cloud
spring-cloud-dependencies
- 2021.0.4
+ 2022.0.1
pom
import
@@ -51,45 +52,32 @@
org.springframework.cloud
spring-cloud-starter-gateway
- 3.1.4
+ 4.0.1
org.springframework.cloud
spring-cloud-starter-loadbalancer
- 3.1.4
-
-
-
- org.springframework.boot
- spring-boot-dependencies
- 2.7.5
-
-
-
- org.springframework.boot
- spring-boot-test
- 2.7.5
+ 4.0.1
org.springframework.boot
spring-boot-starter-web
- 2.6.3
+ 3.0.2
-
-
+
- com.alibaba.cloud
- spring-cloud-starter-alibaba-nacos-discovery
- 2021.1
+ org.springframework.cloud
+ spring-cloud-starter-netflix-eureka-server
+ 4.0.0
-
+
- com.alibaba.cloud
- spring-cloud-starter-alibaba-nacos-config
- 2021.1
+ org.springframework.cloud
+ spring-cloud-starter-netflix-eureka-client
+ 4.0.0
@@ -131,7 +119,7 @@
org.springframework.boot
spring-boot-starter-websocket
- 2.7.6
+ 3.0.2
@@ -174,12 +162,12 @@
org.slf4j
slf4j-api
- 2.0.3
+ 2.0.6
org.slf4j
slf4j-simple
- 2.0.3
+ 2.0.6
@@ -199,6 +187,12 @@
${lombok.version}
true
+
+
+ org.springframework
+ spring-beans
+ 6.0.4
+