-
Notifications
You must be signed in to change notification settings - Fork 9
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
d34246a
commit d86bc51
Showing
10 changed files
with
138 additions
and
39 deletions.
There are no files selected for viewing
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
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
55 changes: 51 additions & 4 deletions
55
...ustomsequence/src/main/java/com/example/custom/sequence/config/ApplicationProperties.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 |
---|---|---|
@@ -1,19 +1,66 @@ | ||
package com.example.custom.sequence.config; | ||
|
||
import lombok.Data; | ||
import org.springframework.boot.context.properties.ConfigurationProperties; | ||
import org.springframework.boot.context.properties.NestedConfigurationProperty; | ||
|
||
@Data | ||
@ConfigurationProperties("application") | ||
public class ApplicationProperties { | ||
private Cors cors = new Cors(); | ||
|
||
@Data | ||
@NestedConfigurationProperty private Cors cors = new Cors(); | ||
|
||
public Cors getCors() { | ||
return cors; | ||
} | ||
|
||
public void setCors(Cors cors) { | ||
this.cors = cors; | ||
} | ||
|
||
public static class Cors { | ||
private String pathPattern = "/api/**"; | ||
private String allowedMethods = "*"; | ||
private String allowedHeaders = "*"; | ||
private String allowedOriginPatterns = "*"; | ||
private boolean allowCredentials = true; | ||
|
||
public String getPathPattern() { | ||
return pathPattern; | ||
} | ||
|
||
public void setPathPattern(String pathPattern) { | ||
this.pathPattern = pathPattern; | ||
} | ||
|
||
public String getAllowedMethods() { | ||
return allowedMethods; | ||
} | ||
|
||
public void setAllowedMethods(String allowedMethods) { | ||
this.allowedMethods = allowedMethods; | ||
} | ||
|
||
public String getAllowedHeaders() { | ||
return allowedHeaders; | ||
} | ||
|
||
public void setAllowedHeaders(String allowedHeaders) { | ||
this.allowedHeaders = allowedHeaders; | ||
} | ||
|
||
public String getAllowedOriginPatterns() { | ||
return allowedOriginPatterns; | ||
} | ||
|
||
public void setAllowedOriginPatterns(String allowedOriginPatterns) { | ||
this.allowedOriginPatterns = allowedOriginPatterns; | ||
} | ||
|
||
public boolean isAllowCredentials() { | ||
return allowCredentials; | ||
} | ||
|
||
public void setAllowCredentials(boolean allowCredentials) { | ||
this.allowCredentials = allowCredentials; | ||
} | ||
} | ||
} |
11 changes: 7 additions & 4 deletions
11
...oot-data-customsequence/src/main/java/com/example/custom/sequence/config/Initializer.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
6 changes: 4 additions & 2 deletions
6
...ot-data-customsequence/src/main/java/com/example/custom/sequence/config/WebMvcConfig.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
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
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
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
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
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