Код: Выделить всё
java: variable userRepository not initialized in the default constructorКод: Выделить всё
@Configuration
@RequiredArgsConstructor
public class AppConfig {
private final UserRepository userRepository;
@Bean
public UserDetailsService userDetailsService() {
return email -> userRepository.findByEmail(email)
.orElseThrow(() -> new UsernameNotFoundException("User haven't found"));
}
...
Код: Выделить всё
public interface UserRepository extends JpaRepository {
Optional findByEmail(String email);
}
- Включается «Включить обработку аннотаций»
- уже пробовал аннулировать кэши
< li>пробовал переустановить плагин Lombok
Подробнее здесь: https://stackoverflow.com/questions/792 ... nstructors
Мобильная версия