Skip to content

Commit

Permalink
Added delete to quotations controller Changed simple compose to inclu…
Browse files Browse the repository at this point in the history
…de the quotes generator
  • Loading branch information
kendarorg committed Feb 13, 2025
1 parent 27e06d5 commit 7a37500
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,12 @@ public QuotationController(QuotationsRepository repository) {
this.repository = repository;
}

@DeleteMapping(value = "/symbols", produces = "application/json")
String clearQuotationsData() {
repository.deleteAll();
return "OK";
}


@GetMapping(value = "/symbols", produces = "application/json")
List<QuotationSymbol> findAllSymbols() {
Expand Down
9 changes: 9 additions & 0 deletions java/simple-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,15 @@ services:
MYSQL_ROOT_PASSWORD: 'password'
ports:
- '23306:3306'
java-quote-generator:
build:
context: QuoteGenerator/.
dockerfile: Dockerfile
image: "java-quote-generator"
container_name: java-quote-generator
depends_on:
java-mosquitto:
condition: service_started
java-mosquitto:
build:
context: Mosquitto/.
Expand Down

0 comments on commit 7a37500

Please sign in to comment.