Skip to content

Commit

Permalink
add clsuter lcoal url
Browse files Browse the repository at this point in the history
  • Loading branch information
Woj-Teh committed Aug 24, 2023
1 parent 23599c1 commit f488712
Showing 1 changed file with 8 additions and 13 deletions.
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
package com.example.pizzasender.applicationController;
import org.apache.http.conn.ssl.TrustSelfSignedStrategy;
import org.apache.http.impl.client.CloseableHttpClient;
import org.apache.http.impl.client.HttpClients;
import org.apache.http.ssl.SSLContexts;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

Expand Down Expand Up @@ -60,12 +57,17 @@ private List<Pizza> createPizzas() {
@Autowired
private RestTemplate restTemplate;

@Value("${pizzas.per.second.default:10}")
@Value("${pizzas.per.second.default:1000}")
private int pizzasPerSecondDefault;

@Value("${sending.duration.seconds.default:10}")
@Value("${sending.duration.seconds.default:300}")
private int sendingDurationSecondsDefault;

@EventListener(ApplicationReadyEvent.class)
public void onApplicationEvent() {
sendPizzas(null, null);
}

@GetMapping("/send")
public ResponseEntity<String> sendPizzas(
@RequestParam(value = "pizzasPerSecond", required = false) Integer pizzasPerSecond,
Expand Down Expand Up @@ -108,11 +110,4 @@ private String randomPizzaToJsonString(Pizza pizza) {
return "{}"; // Return an empty JSON object as a fallback
}
}

}






0 comments on commit f488712

Please sign in to comment.