首页>代码>springboot入门之hello world(小白必看)>/springboot_helloWorld/src/main/java/com/ms/springboot/HelloController.java
package com.ms.springboot;

import java.util.HashMap;
import java.util.Map;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
public class HelloController {

	
	@RequestMapping("hello")
	@ResponseBody
	public Map<String, Object> showHello(){
		
		Map<String, Object> map=new HashMap<String, Object>();
		map.put("msg", "HelloWorld");
		return map;
	}
}
最近下载更多
gxpcwm  LV22 2022年4月6日
dapeng0011  LV15 2021年8月6日
whfuai  LV14 2021年8月5日
haishen  LV8 2021年7月13日
hahazxy  LV14 2021年6月30日
15827485252  LV19 2020年5月20日
Tunduswith  LV15 2020年3月19日
1051378174  LV1 2019年11月10日
koumeiyuu  LV9 2019年9月12日
shunwei  LV7 2019年9月11日
最近浏览更多
汤汤汤要学编程  LV11 7月31日
tianli3000  LV8 7月31日
ykllykll 7月24日
暂无贡献等级
ma406805131  LV15 6月17日
whb5566  LV10 4月24日
xiaokang1  LV10 4月23日
nulixuexiing  LV4 4月1日
songsmm  LV1 3月11日
2602275348  LV12 1月10日
Qolmen  LV12 1月3日
顶部 客服 微信二维码 底部
>扫描二维码关注最代码为好友扫描二维码关注最代码为好友