AccountController.java 1012 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. package com.caimei.www.controller.authorized;
  2. import com.caimei.www.controller.BaseController;
  3. import com.caimei.www.service.AccountService;
  4. import org.springframework.beans.factory.annotation.Autowired;
  5. import org.springframework.stereotype.Controller;
  6. import org.springframework.web.bind.annotation.GetMapping;
  7. /**
  8. * Description
  9. *
  10. * @author : Charles
  11. * @date : 2020/7/24
  12. */
  13. @Controller
  14. public class AccountController extends BaseController {
  15. private static final String LOGIN_PATH = "account/login";
  16. private static final String SIGN_UP_PATH = "account/sign-up";
  17. private AccountService accountService;
  18. @Autowired
  19. public void setAccountService(AccountService accountService) {
  20. this.accountService = accountService;
  21. }
  22. /**
  23. * 登录页
  24. */
  25. @GetMapping("/login.html")
  26. public String login() {
  27. return LOGIN_PATH;
  28. }
  29. /**
  30. * 注册页
  31. */
  32. @GetMapping("/sign-up.html")
  33. public String signUp() {
  34. return SIGN_UP_PATH;
  35. }
  36. }