-
Notifications
You must be signed in to change notification settings - Fork 416
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c6bea06
commit bac0a79
Showing
9 changed files
with
127 additions
and
2 deletions.
There are no files selected for viewing
2 changes: 1 addition & 1 deletion
2
.../yas/commonlibrary/config/CorsConfig.java → .../java/com/yas/cart/config/CorsConfig.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...ommonlibrary/config/RestClientConfig.java → ...com/yas/cart/config/RestClientConfig.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 20 additions & 0 deletions
20
customer/src/main/java/com/yas/customer/config/CorsConfig.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
package com.yas.customer.config; | ||
|
||
import org.springframework.context.annotation.Bean; | ||
import org.springframework.context.annotation.Configuration; | ||
import org.springframework.web.servlet.config.annotation.CorsRegistry; | ||
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; | ||
|
||
@Configuration | ||
public class CorsConfig { | ||
@Bean | ||
public WebMvcConfigurer corsConfigure() { | ||
return new WebMvcConfigurer() { | ||
@Override | ||
public void addCorsMappings(CorsRegistry registry) { | ||
registry.addMapping("/**").allowedMethods("*").allowedOrigins("*") | ||
.allowedHeaders("*"); | ||
} | ||
}; | ||
} | ||
} |
15 changes: 15 additions & 0 deletions
15
customer/src/main/java/com/yas/customer/config/RestClientConfig.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
package com.yas.customer.config; | ||
|
||
import org.springframework.context.annotation.Bean; | ||
import org.springframework.context.annotation.Configuration; | ||
import org.springframework.web.client.RestClient; | ||
|
||
@Configuration | ||
public class RestClientConfig { | ||
|
||
@Bean | ||
public RestClient restClient() { | ||
return RestClient.builder().build(); | ||
} | ||
|
||
} |
20 changes: 20 additions & 0 deletions
20
inventory/src/main/java/com/yas/inventory/config/CorsConfig.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
package com.yas.inventory.config; | ||
|
||
import org.springframework.context.annotation.Bean; | ||
import org.springframework.context.annotation.Configuration; | ||
import org.springframework.web.servlet.config.annotation.CorsRegistry; | ||
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; | ||
|
||
@Configuration | ||
public class CorsConfig { | ||
@Bean | ||
public WebMvcConfigurer corsConfigure() { | ||
return new WebMvcConfigurer() { | ||
@Override | ||
public void addCorsMappings(CorsRegistry registry) { | ||
registry.addMapping("/**").allowedMethods("*").allowedOrigins("*") | ||
.allowedHeaders("*"); | ||
} | ||
}; | ||
} | ||
} |
15 changes: 15 additions & 0 deletions
15
inventory/src/main/java/com/yas/inventory/config/RestClientConfig.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
package com.yas.inventory.config; | ||
|
||
import org.springframework.context.annotation.Bean; | ||
import org.springframework.context.annotation.Configuration; | ||
import org.springframework.web.client.RestClient; | ||
|
||
@Configuration | ||
public class RestClientConfig { | ||
|
||
@Bean | ||
public RestClient restClient() { | ||
return RestClient.builder().build(); | ||
} | ||
|
||
} |
20 changes: 20 additions & 0 deletions
20
location/src/main/java/com/yas/location/config/CorsConfig.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
package com.yas.location.config; | ||
|
||
import org.springframework.context.annotation.Bean; | ||
import org.springframework.context.annotation.Configuration; | ||
import org.springframework.web.servlet.config.annotation.CorsRegistry; | ||
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; | ||
|
||
@Configuration | ||
public class CorsConfig { | ||
@Bean | ||
public WebMvcConfigurer corsConfigure() { | ||
return new WebMvcConfigurer() { | ||
@Override | ||
public void addCorsMappings(CorsRegistry registry) { | ||
registry.addMapping("/**").allowedMethods("*").allowedOrigins("*") | ||
.allowedHeaders("*"); | ||
} | ||
}; | ||
} | ||
} |
15 changes: 15 additions & 0 deletions
15
location/src/main/java/com/yas/location/config/RestClientConfig.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
package com.yas.location.config; | ||
|
||
import org.springframework.context.annotation.Bean; | ||
import org.springframework.context.annotation.Configuration; | ||
import org.springframework.web.client.RestClient; | ||
|
||
@Configuration | ||
public class RestClientConfig { | ||
|
||
@Bean | ||
public RestClient restClient() { | ||
return RestClient.builder().build(); | ||
} | ||
|
||
} |
20 changes: 20 additions & 0 deletions
20
product/src/main/java/com/yas/product/config/CorsConfig.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
package com.yas.product.config; | ||
|
||
import org.springframework.context.annotation.Bean; | ||
import org.springframework.context.annotation.Configuration; | ||
import org.springframework.web.servlet.config.annotation.CorsRegistry; | ||
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; | ||
|
||
@Configuration | ||
public class CorsConfig { | ||
@Bean | ||
public WebMvcConfigurer corsConfigure() { | ||
return new WebMvcConfigurer() { | ||
@Override | ||
public void addCorsMappings(CorsRegistry registry) { | ||
registry.addMapping("/**").allowedMethods("*").allowedOrigins("*") | ||
.allowedHeaders("*"); | ||
} | ||
}; | ||
} | ||
} |