提交 c0440d1b 编写于 作者: 武汉红喜's avatar 武汉红喜

NewController

上级 91bc6fcc
......@@ -26,6 +26,7 @@ public class MarsController extends BaseController {
@Autowired
private AccountService accountService;
// ex. http://localhost:8080/account/hello.jhtml?name=lily
@RequestMapping("/hello")
@ResponseBody
public String hello(@RequestParam("name")String name,
......
package com.itlong.whatsmars.earth.web.controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.HashMap;
import java.util.Map;
/**
* Created by javahongxi on 2017/10/22.
*/
@RestController
public class NewController {
// ex. http://localhost:8080/t.jhtml
@RequestMapping("/t")
public Map<String, String> t() {
Map<String, String> map = new HashMap<String, String>();
map.put("name", "Lily");
return map;
}
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册