Skip to content

Commit

Permalink
Rename properties
Browse files Browse the repository at this point in the history
Rename `webwolf.url.*` to `webwolf.*.url` making it easier to move to a configuration class as no nested property is necessary
  • Loading branch information
nbaars committed Nov 23, 2021
1 parent 48fd7f3 commit f8dda37
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ webgoat.default.language=en
webwolf.host=${WEBWOLF_HOST:127.0.0.1}
webwolf.port=${WEBWOLF_PORT:9090}
webwolf.url=http://${webwolf.host}:${webwolf.port}/WebWolf
webwolf.url.landingpage=http://${webwolf.host}:${webwolf.port}/landing
webwolf.url.mail=http://${webwolf.host}:${webwolf.port}/mail
webwolf.landingpage.url=http://${webwolf.host}:${webwolf.port}/landing
webwolf.mail.url=http://${webwolf.host}:${webwolf.port}/mail

spring.jackson.serialization.indent_output=true
spring.jackson.serialization.write-dates-as-timestamps=false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public class Assignment7 extends AssignmentEndpoint {

@Autowired
private RestTemplate restTemplate;
@Value("${webwolf.url.mail}")
@Value("${webwolf.mail.url}")
private String webWolfMailURL;

@GetMapping("/challenge/7/reset-password/{link}")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public class ResetLinkAssignmentForgotPassword extends AssignmentEndpoint {
private final String webWolfMailURL;

public ResetLinkAssignmentForgotPassword(RestTemplate restTemplate,
@Value("${webwolf.url.mail}") String webWolfMailURL) {
@Value("${webwolf.mail.url}") String webWolfMailURL) {
this.restTemplate = restTemplate;
this.webWolfMailURL = webWolfMailURL;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public class SimpleMailAssignment extends AssignmentEndpoint {
private final String webWolfURL;
private RestTemplate restTemplate;

public SimpleMailAssignment(RestTemplate restTemplate, @Value("${webwolf.url.mail}") String webWolfURL) {
public SimpleMailAssignment(RestTemplate restTemplate, @Value("${webwolf.mail.url}") String webWolfURL) {
this.restTemplate = restTemplate;
this.webWolfURL = webWolfURL;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
@RestController
public class LandingAssignment extends AssignmentEndpoint {

@Value("${webwolf.url.landingpage}")
@Value("${webwolf.landingpage.url}")
private String landingPageUrl;

@PostMapping("/WebWolf/landing")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public class MailAssignment extends AssignmentEndpoint {
private final String webWolfURL;
private RestTemplate restTemplate;

public MailAssignment(RestTemplate restTemplate, @Value("${webwolf.url.mail}") String webWolfURL) {
public MailAssignment(RestTemplate restTemplate, @Value("${webwolf.mail.url}") String webWolfURL) {
this.restTemplate = restTemplate;
this.webWolfURL = webWolfURL;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public class SimpleXXE extends AssignmentEndpoint {
@Value("${webgoat.server.directory}")
private String webGoatHomeDirectory;

@Value("${webwolf.url.landingpage}")
@Value("${webwolf.landingpage.url}")
private String webWolfURL;


Expand Down

0 comments on commit f8dda37

Please sign in to comment.