/
fedion
/
project_task
Обзор
Документация
Войти
/
fedion
/
project_task
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
project
cache-project/src/main/java/com/example/cache/controller/RatesController.java
21 строка
501 B
Ioann
project
20 ноя 2025, 07:18
20 ноя 2025, 07:18
3eceee3
Код
Авторство
О чём код?
package com.example.cache.controller; import com.example.cache.service.RatesCache; import org.springframework.web.bind.annotation.*; @RestController @RequestMapping("/rates") public class RatesController { private final RatesCache cache; public RatesController(RatesCache cache) { this.cache = cache; } @GetMapping(path = "/{currency}") public Object getRate(@PathVariable("currency") String currency) { return cache.getRateCache().get(currency); } }