Skip to content

Instantly share code, notes, and snippets.

@dodangquan
Created September 10, 2016 02:05
Show Gist options
  • Save dodangquan/05b57bd052b0f15fa1baffa27e5e7915 to your computer and use it in GitHub Desktop.
Save dodangquan/05b57bd052b0f15fa1baffa27e5e7915 to your computer and use it in GitHub Desktop.
// @org.springframework.web.bind.annotation.RequestParam
@Controller
@RequestMapping("/user")
public class LoginController {
@RequestMapping("/login")
public String listCompanies(@RequestParam String username, @RequestParam String password) {
if(username.equals("admin") && password.equals("mypass")){
return "welcome";
} else {
return "login?login=fail";
}
}
...
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment