首页 > 其他分享 >HelloController

HelloController

时间:2022-12-15 16:48:37浏览次数:33  
标签:map RequestMapping HelloController Controller import public

package com.example.demo;
import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping;
import java.util.Map;
@Controller public class HelloController {
    @RequestMapping("/login")     public String index(Map<String, Object> map) {         map.put("name", "Steven");         return "index";     } }

标签:map,RequestMapping,HelloController,Controller,import,public
From: https://www.cnblogs.com/cnetsa/p/16985399.html

相关文章

  • 创建并实现HelloController类
    packagecom.tedu.controller;importorg.springframework.stereotype.Controller;importorg.springframework.web.bind.annotation.RequestMapping;如果Controller类......