Created
September 10, 2016 02:05
-
-
Save dodangquan/05b57bd052b0f15fa1baffa27e5e7915 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// @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