Browse Source

Merge remote-tracking branch 'cloud-schoolapi/ywx'

tags/正式3.2.0
王宁 2 years ago
parent
commit
6e485b0dac

+ 1
- 1
sapi/src/main/java/com/xhkjedu/sapi/interceptors/WebMvcConfg.java View File

45
     @Override
45
     @Override
46
     public void addCorsMappings(CorsRegistry registry){
46
     public void addCorsMappings(CorsRegistry registry){
47
         registry.addMapping("/**")
47
         registry.addMapping("/**")
48
-                .allowedOrigins("*")
48
+                .allowedOriginPatterns("*")
49
                 .allowCredentials(true)
49
                 .allowCredentials(true)
50
                 .allowedMethods("GET","POST")
50
                 .allowedMethods("GET","POST")
51
                 .maxAge(3600);
51
                 .maxAge(3600);

+ 4
- 4
sclass/pom.xml View File

26
         <!--    <groupId>org.springframework.cloud</groupId>-->
26
         <!--    <groupId>org.springframework.cloud</groupId>-->
27
         <!--    <artifactId>spring-cloud-starter-config</artifactId>-->
27
         <!--    <artifactId>spring-cloud-starter-config</artifactId>-->
28
         <!--</dependency>-->
28
         <!--</dependency>-->
29
-        <!--<dependency>-->
30
-        <!--    <groupId>org.springframework.cloud</groupId>-->
31
-        <!--    <artifactId>spring-cloud-starter-netflix-eureka-client</artifactId>-->
32
-        <!--</dependency>-->
29
+        <dependency>
30
+            <groupId>org.springframework.cloud</groupId>
31
+            <artifactId>spring-cloud-starter-netflix-eureka-client</artifactId>
32
+        </dependency>
33
 
33
 
34
         <dependency>
34
         <dependency>
35
             <groupId>mysql</groupId>
35
             <groupId>mysql</groupId>

+ 2
- 0
sclass/src/main/java/com/xhkjedu/sclass/SclassApplication.java View File

2
 
2
 
3
 import org.springframework.boot.SpringApplication;
3
 import org.springframework.boot.SpringApplication;
4
 import org.springframework.boot.autoconfigure.SpringBootApplication;
4
 import org.springframework.boot.autoconfigure.SpringBootApplication;
5
+import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
5
 import tk.mybatis.spring.annotation.MapperScan;
6
 import tk.mybatis.spring.annotation.MapperScan;
6
 
7
 
7
 @SpringBootApplication
8
 @SpringBootApplication
8
 @MapperScan("com.xhkjedu.sclass.mapper")
9
 @MapperScan("com.xhkjedu.sclass.mapper")
10
+@EnableEurekaClient
9
 public class SclassApplication {
11
 public class SclassApplication {
10
 
12
 
11
     public static void main(String[] args) {
13
     public static void main(String[] args) {

+ 1
- 1
sclass/src/main/java/com/xhkjedu/sclass/interceptors/WebMvcConfg.java View File

45
     @Override
45
     @Override
46
     public void addCorsMappings(CorsRegistry registry){
46
     public void addCorsMappings(CorsRegistry registry){
47
         registry.addMapping("/**")
47
         registry.addMapping("/**")
48
-                .allowedOrigins("*")
48
+                .allowedOriginPatterns("*")
49
                 .allowCredentials(true)
49
                 .allowCredentials(true)
50
                 .allowedMethods("GET","POST")
50
                 .allowedMethods("GET","POST")
51
                 .maxAge(3600);
51
                 .maxAge(3600);

+ 4
- 4
slive/pom.xml View File

26
         <!--    <groupId>org.springframework.cloud</groupId>-->
26
         <!--    <groupId>org.springframework.cloud</groupId>-->
27
         <!--    <artifactId>spring-cloud-starter-config</artifactId>-->
27
         <!--    <artifactId>spring-cloud-starter-config</artifactId>-->
28
         <!--</dependency>-->
28
         <!--</dependency>-->
29
-        <!--<dependency>-->
30
-        <!--    <groupId>org.springframework.cloud</groupId>-->
31
-        <!--    <artifactId>spring-cloud-starter-netflix-eureka-client</artifactId>-->
32
-        <!--</dependency>-->
29
+        <dependency>
30
+            <groupId>org.springframework.cloud</groupId>
31
+            <artifactId>spring-cloud-starter-netflix-eureka-client</artifactId>
32
+        </dependency>
33
 
33
 
34
         <dependency>
34
         <dependency>
35
             <groupId>mysql</groupId>
35
             <groupId>mysql</groupId>

+ 2
- 0
slive/src/main/java/com/xhkjedu/slive/SliveApplication.java View File

2
 
2
 
3
 import org.springframework.boot.SpringApplication;
3
 import org.springframework.boot.SpringApplication;
4
 import org.springframework.boot.autoconfigure.SpringBootApplication;
4
 import org.springframework.boot.autoconfigure.SpringBootApplication;
5
+import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
5
 import tk.mybatis.spring.annotation.MapperScan;
6
 import tk.mybatis.spring.annotation.MapperScan;
6
 
7
 
7
 @SpringBootApplication
8
 @SpringBootApplication
8
 @MapperScan("com.xhkjedu.slive.mapper")
9
 @MapperScan("com.xhkjedu.slive.mapper")
10
+@EnableEurekaClient
9
 public class SliveApplication {
11
 public class SliveApplication {
10
 
12
 
11
     public static void main(String[] args) {
13
     public static void main(String[] args) {

+ 1
- 1
slive/src/main/java/com/xhkjedu/slive/interceptors/WebMvcConfg.java View File

45
     @Override
45
     @Override
46
     public void addCorsMappings(CorsRegistry registry){
46
     public void addCorsMappings(CorsRegistry registry){
47
         registry.addMapping("/**")
47
         registry.addMapping("/**")
48
-                .allowedOrigins("*")
48
+                .allowedOriginPatterns("*")
49
                 .allowCredentials(true)
49
                 .allowCredentials(true)
50
                 .allowedMethods("GET","POST")
50
                 .allowedMethods("GET","POST")
51
                 .maxAge(3600);
51
                 .maxAge(3600);

+ 1
- 1
sstudy/src/main/java/com/xhkjedu/sstudy/interceptors/WebMvcConfg.java View File

45
     @Override
45
     @Override
46
     public void addCorsMappings(CorsRegistry registry){
46
     public void addCorsMappings(CorsRegistry registry){
47
         registry.addMapping("/**")
47
         registry.addMapping("/**")
48
-                .allowedOrigins("*")
48
+                .allowedOriginPatterns("*")
49
                 .allowCredentials(true)
49
                 .allowCredentials(true)
50
                 .allowedMethods("GET","POST")
50
                 .allowedMethods("GET","POST")
51
                 .maxAge(3600);
51
                 .maxAge(3600);

+ 4
- 7
suser/pom.xml View File

26
         <!--    <groupId>org.springframework.cloud</groupId>-->
26
         <!--    <groupId>org.springframework.cloud</groupId>-->
27
         <!--    <artifactId>spring-cloud-starter-config</artifactId>-->
27
         <!--    <artifactId>spring-cloud-starter-config</artifactId>-->
28
         <!--</dependency>-->
28
         <!--</dependency>-->
29
-
29
+        <dependency>
30
+            <groupId>org.springframework.cloud</groupId>
31
+            <artifactId>spring-cloud-starter-netflix-eureka-client</artifactId>
32
+        </dependency>
30
         <dependency>
33
         <dependency>
31
             <groupId>mysql</groupId>
34
             <groupId>mysql</groupId>
32
             <artifactId>mysql-connector-java</artifactId>
35
             <artifactId>mysql-connector-java</artifactId>
41
             <artifactId>spring-boot-starter-test</artifactId>
44
             <artifactId>spring-boot-starter-test</artifactId>
42
             <scope>test</scope>
45
             <scope>test</scope>
43
         </dependency>
46
         </dependency>
44
-        <!--mybatis通用mapper依赖-->
45
-        <!--<dependency>-->
46
-        <!--    <groupId>tk.mybatis</groupId>-->
47
-        <!--    <artifactId>mapper-spring-boot-starter</artifactId>-->
48
-        <!--    <version>2.1.5</version>-->
49
-        <!--</dependency>-->
50
         <dependency>
47
         <dependency>
51
             <groupId>com.xhkjedu</groupId>
48
             <groupId>com.xhkjedu</groupId>
52
             <artifactId>scommons</artifactId>
49
             <artifactId>scommons</artifactId>

+ 2
- 0
suser/src/main/java/com/xhkjedu/suser/SuserApplication.java View File

2
 
2
 
3
 import org.springframework.boot.SpringApplication;
3
 import org.springframework.boot.SpringApplication;
4
 import org.springframework.boot.autoconfigure.SpringBootApplication;
4
 import org.springframework.boot.autoconfigure.SpringBootApplication;
5
+import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
5
 import tk.mybatis.spring.annotation.MapperScan;
6
 import tk.mybatis.spring.annotation.MapperScan;
6
 
7
 
7
 @SpringBootApplication
8
 @SpringBootApplication
8
 @MapperScan("com.xhkjedu.suser.mapper")
9
 @MapperScan("com.xhkjedu.suser.mapper")
10
+@EnableEurekaClient
9
 public class SuserApplication {
11
 public class SuserApplication {
10
 
12
 
11
     public static void main(String[] args) {
13
     public static void main(String[] args) {

+ 1
- 1
suser/src/main/java/com/xhkjedu/suser/interceptors/WebMvcConfg.java View File

45
     @Override
45
     @Override
46
     public void addCorsMappings(CorsRegistry registry){
46
     public void addCorsMappings(CorsRegistry registry){
47
         registry.addMapping("/**")
47
         registry.addMapping("/**")
48
-                .allowedOrigins("*")
48
+                .allowedOriginPatterns("*")
49
                 .allowCredentials(true)
49
                 .allowCredentials(true)
50
                 .allowedMethods("GET","POST")
50
                 .allowedMethods("GET","POST")
51
                 .maxAge(3600);
51
                 .maxAge(3600);

Loading…
Cancel
Save