package fr.organizee.controller; import fr.organizee.dto.JsonWebToken; import fr.organizee.dto.MembreDto; import fr.organizee.exception.ExistingUsernameException; import fr.organizee.exception.InvalidCredentialsException; import fr.organizee.model.Membre; import fr.organizee.repository.MembreRepository; import fr.organizee.service.MembreService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder; import org.springframework.web.bind.annotation.*; import javax.persistence.EntityNotFoundException; import java.util.List; import java.util.Optional; import java.util.stream.Collectors; /* toto */ @RestController @CrossOrigin("*") @RequestMapping("/membres") public class MembreController { @Autowired private MembreRepository membreRepo; @Autowired private MembreService membreService; @Autowired private BCryptPasswordEncoder passwordEncoder; @ResponseBody public String home() { StringBuilder sb = new StringBuilder(); sb.append("

Affichages des membres

"); sb.append("