package ru.shine.promo.controller; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestParam; @Controller public class PromoPageController { @GetMapping("/") public String index(@RequestParam(name = "wallet", required = false) String wallet, Model model) { model.addAttribute("wallet", wallet == null ? "" : wallet.trim()); return "index"; } }