Cleaned demo controller
This commit is contained in:
parent
b384966ec7
commit
a84c16a101
@ -19,7 +19,7 @@ import org.ros.chatto.repository.UserRepository;
|
|||||||
import org.ros.chatto.repository.UserRepositoryCustom;
|
import org.ros.chatto.repository.UserRepositoryCustom;
|
||||||
import org.ros.chatto.repository.UserRoleRepository;
|
import org.ros.chatto.repository.UserRoleRepository;
|
||||||
import org.ros.chatto.service.UserService;
|
import org.ros.chatto.service.UserService;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.context.annotation.Lazy;
|
||||||
import org.springframework.http.HttpStatus;
|
import org.springframework.http.HttpStatus;
|
||||||
import org.springframework.http.ResponseEntity;
|
import org.springframework.http.ResponseEntity;
|
||||||
import org.springframework.security.core.Authentication;
|
import org.springframework.security.core.Authentication;
|
||||||
@ -33,25 +33,28 @@ import org.springframework.web.bind.annotation.RequestMethod;
|
|||||||
import org.springframework.web.bind.annotation.RestController;
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
import org.springframework.web.servlet.ModelAndView;
|
import org.springframework.web.servlet.ModelAndView;
|
||||||
|
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("/api/demo")
|
@RequestMapping("/api/demo")
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
@Lazy
|
||||||
// @CrossOrigin(origins = "*", allowCredentials = "true", allowedHeaders = "*")
|
// @CrossOrigin(origins = "*", allowCredentials = "true", allowedHeaders = "*")
|
||||||
public class DemoRestController {
|
public class DemoRestController {
|
||||||
|
|
||||||
@Autowired
|
private final UserRepository userRepository;
|
||||||
UserRepository userRepository;
|
|
||||||
@Autowired
|
private final UserRepositoryCustom userRepositoryCustom;
|
||||||
UserRepositoryCustom userRepositoryCustom;
|
|
||||||
@Autowired
|
private final RoleRepository roleRepository;
|
||||||
RoleRepository roleRepository;
|
|
||||||
@Autowired
|
private final UserRoleRepository userRoleRepository;
|
||||||
UserRoleRepository userRoleRepository;
|
|
||||||
@Autowired
|
private final MessageCipherRepository messageCipherRepository;
|
||||||
MessageCipherRepository messageCipherRepository;
|
|
||||||
@Autowired
|
private final ChatMessageRepository chatMessageRepository;
|
||||||
ChatMessageRepository chatMessageRepository;
|
|
||||||
@Autowired
|
private final UserService userService;
|
||||||
private UserService userService;
|
|
||||||
|
|
||||||
@GetMapping("/users")
|
@GetMapping("/users")
|
||||||
public List<ChatUser> getAllUsers() {
|
public List<ChatUser> getAllUsers() {
|
||||||
|
Loading…
Reference in New Issue
Block a user