-
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.
feat : Transition from MockMvc to RestAssured for integration testing…
… & remove lombok (#1193) * feat : use restAssured and remove lombok * adds scope test
- Loading branch information
1 parent
224d8f5
commit c78a978
Showing
12 changed files
with
277 additions
and
169 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
56 changes: 53 additions & 3 deletions
56
jpa/boot-data-envers/src/main/java/com/example/envers/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,22 +1,72 @@ | ||
package com.example.envers.config; | ||
|
||
import lombok.Data; | ||
import org.springframework.boot.context.properties.ConfigurationProperties; | ||
import org.springframework.boot.context.properties.NestedConfigurationProperty; | ||
|
||
@Data | ||
@ConfigurationProperties("application") | ||
public class ApplicationProperties { | ||
|
||
@NestedConfigurationProperty | ||
private Cors cors = new Cors(); | ||
|
||
@Data | ||
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 Cors setPathPattern(String pathPattern) { | ||
this.pathPattern = pathPattern; | ||
return this; | ||
} | ||
|
||
public String getAllowedMethods() { | ||
return allowedMethods; | ||
} | ||
|
||
public Cors setAllowedMethods(String allowedMethods) { | ||
this.allowedMethods = allowedMethods; | ||
return this; | ||
} | ||
|
||
public String getAllowedHeaders() { | ||
return allowedHeaders; | ||
} | ||
|
||
public Cors setAllowedHeaders(String allowedHeaders) { | ||
this.allowedHeaders = allowedHeaders; | ||
return this; | ||
} | ||
|
||
public String getAllowedOriginPatterns() { | ||
return allowedOriginPatterns; | ||
} | ||
|
||
public Cors setAllowedOriginPatterns(String allowedOriginPatterns) { | ||
this.allowedOriginPatterns = allowedOriginPatterns; | ||
return this; | ||
} | ||
|
||
public boolean isAllowCredentials() { | ||
return allowCredentials; | ||
} | ||
|
||
public Cors setAllowCredentials(boolean allowCredentials) { | ||
this.allowCredentials = allowCredentials; | ||
return this; | ||
} | ||
} | ||
} |
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
9 changes: 6 additions & 3 deletions
9
jpa/boot-data-envers/src/main/java/com/example/envers/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
Oops, something went wrong.