Browse Source

long类型更正

tags/正式3.11.0
王宁 1 year ago
parent
commit
1bf7a383fe

+ 3
- 0
gateway/src/main/resources/application.properties View File

@@ -38,6 +38,9 @@ spring.cloud.gateway.routes[4].id=path_sapi
38 38
 spring.cloud.gateway.routes[4].uri=lb://sapi
39 39
 spring.cloud.gateway.routes[4].predicates[0]=Path=/sapi/**
40 40
 spring.cloud.gateway.routes[4].filters[0]=RewritePath=/sapi/(?<segment>.*), /$\{segment}
41
+spring.cloud.gateway.routes[4].filters[1].name=CircuitBreaker
42
+spring.cloud.gateway.routes[4].filters[1].args.name=fallbackcmd
43
+spring.cloud.gateway.routes[4].filters[1].args.fallbackUri=forward:/fallback
41 44
 
42 45
 spring.cloud.gateway.routes[5].id=path_sexam
43 46
 spring.cloud.gateway.routes[5].uri=lb://sexam

+ 2
- 4
sapi/src/main/java/com/xhkjedu/sapi/config/ConfigKey.java View File

@@ -3,8 +3,6 @@ package com.xhkjedu.sapi.config;
3 3
 import org.springframework.beans.factory.annotation.Value;
4 4
 import org.springframework.stereotype.Component;
5 5
 
6
-import java.io.UnsupportedEncodingException;
7
-
8 6
 /**
9 7
  * @author ywx
10 8
  * @classname ConfigKey
@@ -16,7 +14,7 @@ public class ConfigKey {
16 14
 
17 15
     public static Integer nummin;
18 16
     public static Integer nummax;
19
-    public static Integer numadd;
17
+    public static Long numadd;
20 18
 
21 19
     @Value("${nummin}")
22 20
     public void setNummin(Integer nummin) {
@@ -29,7 +27,7 @@ public class ConfigKey {
29 27
     }
30 28
 
31 29
     @Value("${numadd}")
32
-    public void setNumadd(Integer numadd) {
30
+    public void setNumadd(Long numadd) {
33 31
         ConfigKey.numadd = numadd;
34 32
     }
35 33
 

+ 1
- 1
sapi/src/main/java/com/xhkjedu/sapi/utils/ApiUtil.java View File

@@ -32,7 +32,7 @@ public class ApiUtil {
32 32
     public static Map<String, String> uriMap = new ConcurrentHashMap<>();
33 33
 
34 34
     //获取id
35
-    public static String getId(){
35
+    public static synchronized String getId(){
36 36
         Integer nummin = ConfigKey.nummin;
37 37
         Integer nummax = ConfigKey.nummax;
38 38
         if (id == 0 || id.equals(nummax)) {

+ 2
- 2
sstudy/src/main/java/com/xhkjedu/sstudy/config/ConfigKey.java View File

@@ -14,7 +14,7 @@ public class ConfigKey {
14 14
 
15 15
     public static Integer nummin;
16 16
     public static Integer nummax;
17
-    public static long numadd;
17
+    public static Long numadd;
18 18
 
19 19
     @Value("${nummin}")
20 20
     public void setNummin(Integer nummin) {
@@ -27,7 +27,7 @@ public class ConfigKey {
27 27
     }
28 28
 
29 29
     @Value("${numadd}")
30
-    public void setNumadd(long numadd) {
30
+    public void setNumadd(Long numadd) {
31 31
         ConfigKey.numadd = numadd;
32 32
     }
33 33
 

Loading…
Cancel
Save