1234567891011121314151617181920 |
- package com.bofeng.controller;
- import org.springframework.ui.ModelMap;
- import org.springframework.web.bind.annotation.GetMapping;
- import org.springframework.web.bind.annotation.RequestParam;
- import org.springframework.web.bind.annotation.RestController;
- import org.springframework.web.servlet.ModelAndView;
- @RestController
- public class PromptController {
- @GetMapping("/prompt/prompt.html")
- public ModelAndView prompt(@RequestParam(name = "title", required = false, defaultValue = "提示") String title,
- @RequestParam(name = "message", required = false, defaultValue = "提示") String message,
- ModelMap model){
- model.put("title",title);
- model.put("message",message);
- return new ModelAndView("/prompt/prompt.ftl",model);
- }
- }
|