Class UserController
java.lang.Object
org.eco.mubisoft.good_and_cheap.user.control.controller.UserController
@Controller
@RequestMapping(path="/user")
public class UserController
extends java.lang.Object
-
Field Summary
Fields Modifier and Type Field Description private org.springframework.security.crypto.password.PasswordEncoder
passwordEncoder
private RoleService
roleService
private UserService
userService
-
Constructor Summary
Constructors Constructor Description UserController()
-
Method Summary
Modifier and Type Method Description java.lang.String
createUser(org.springframework.ui.Model model)
org.springframework.http.ResponseEntity<AppUser>
getUser(java.lang.Long id)
java.lang.String
getView()
void
saveUser(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Field Details
-
userService
-
roleService
-
passwordEncoder
private final org.springframework.security.crypto.password.PasswordEncoder passwordEncoder
-
-
Constructor Details
-
UserController
public UserController()
-
-
Method Details
-
createUser
@GetMapping("/create") public java.lang.String createUser(org.springframework.ui.Model model) -
saveUser
@PostMapping("/save") public void saveUser(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws java.io.IOException- Throws:
java.io.IOException
-
getView
@GetMapping("/view") public java.lang.String getView() -
getUser
@GetMapping("/view/{userID}") public org.springframework.http.ResponseEntity<AppUser> getUser(@PathVariable("userID") java.lang.Long id)
-