Browse Source

long类型更正

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

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

38
 spring.cloud.gateway.routes[4].uri=lb://sapi
38
 spring.cloud.gateway.routes[4].uri=lb://sapi
39
 spring.cloud.gateway.routes[4].predicates[0]=Path=/sapi/**
39
 spring.cloud.gateway.routes[4].predicates[0]=Path=/sapi/**
40
 spring.cloud.gateway.routes[4].filters[0]=RewritePath=/sapi/(?<segment>.*), /$\{segment}
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
 spring.cloud.gateway.routes[5].id=path_sexam
45
 spring.cloud.gateway.routes[5].id=path_sexam
43
 spring.cloud.gateway.routes[5].uri=lb://sexam
46
 spring.cloud.gateway.routes[5].uri=lb://sexam

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

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

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

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

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

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

Loading…
Cancel
Save