trips: add controller, service, mappers, dtos etc.
This commit is contained in:
@@ -1,18 +0,0 @@
|
||||
package SuMoC.backend.security.services;
|
||||
|
||||
|
||||
import SuMoC.backend.repositories.TripRepository;
|
||||
import jakarta.transaction.Transactional;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
|
||||
@Service
|
||||
@Transactional
|
||||
public class TripService {
|
||||
private TripRepository tripRepository;
|
||||
|
||||
@Autowired
|
||||
public TripService(TripRepository tripRepository) {this.tripRepository = tripRepository;}
|
||||
}
|
||||
+8
-2
@@ -15,7 +15,7 @@ import java.util.Optional;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@Service
|
||||
public class Userservice implements UserDetailsService {
|
||||
public class UserSecurityService implements UserDetailsService {
|
||||
|
||||
private PasswordEncoder encoder;
|
||||
|
||||
@@ -23,11 +23,17 @@ public class Userservice implements UserDetailsService {
|
||||
|
||||
|
||||
@Autowired
|
||||
public Userservice(PasswordEncoder encoder, UserRepository userRepository){
|
||||
public UserSecurityService(PasswordEncoder encoder, UserRepository userRepository){
|
||||
this.encoder = encoder;
|
||||
this.userRepository = userRepository;
|
||||
}
|
||||
|
||||
/**
|
||||
* Loads user based on email address.
|
||||
* @param email
|
||||
* @return
|
||||
* @throws UsernameNotFoundException
|
||||
*/
|
||||
@Override
|
||||
public UserDetails loadUserByUsername(String email) throws UsernameNotFoundException {
|
||||
// Jetzt suchen wir nach der E-Mail-Adresse
|
||||
Reference in New Issue
Block a user