package net.shopxx.aa;
import java.io.IOException;
import java.util.HashMap;
import java.util.Map;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import net.shopxx.util.JsonUtils;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.context.request.RequestAttributes;
import org.springframework.web.context.request.RequestContextHolder;
import org.springframework.web.context.request.ServletRequestAttributes;
@Controller("androidController")
@RequestMapping("/user")
public class LoginControl {
@RequestMapping(value="/signin", method = RequestMethod.POST)
public @ResponseBody
String login(String name,String password) {
System.out.print("....\n");
String j="hello";
return JsonUtils.toJson(j);
}
上边是代码,没有具体功能的,我只需要Android端能连接上去服务端就可以了