Я пытаюсь использовать проект lombok для создания регистратора, как в примере здесь.
Когда я перехожу к intelliJ, для ввода log
нет завершения кода. Я получаю ошибку ниже:
Фрагмент кода:
package com.example.clement.recipeproject.bootstrap;
import com.example.clement.recipeproject.domain.*;
import com.example.clement.recipeproject.repositories.CategoryRepository;
import com.example.clement.recipeproject.repositories.RecipeRepository;
import com.example.clement.recipeproject.repositories.UnitOfMeasureRepository;
import lombok.extern.slf4j.Slf4j;
import org.springframework.context.ApplicationListener;
import org.springframework.context.event.ContextRefreshedEvent;
import org.springframework.stereotype.Component;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.List;
import java.util.Optional;
@Slf4j
@Component
public class DevBootstrap implements ApplicationListener<ContextRefreshedEvent> {
private CategoryRepository categoryRepository;
private UnitOfMeasureRepository unitOfMeasureRepository;
private RecipeRepository recipeRepository;
public DevBootstrap(CategoryRepository categoryRepository, UnitOfMeasureRepository unitOfMeasureRepository, RecipeRepository recipeRepository) {
this.categoryRepository = categoryRepository;
this.unitOfMeasureRepository = unitOfMeasureRepository;
this.recipeRepository = recipeRepository;
}
// returns List<Recipe>
private List<Recipe> getRecipes() {
log.debug("I am a debug message");
*** Обновлять:
Добавил еще несколько фотографий, чтобы показать, что журнал slf4j
появляется, но после него нет подходящих методов.
Когда я прыгаю в @Slf4j, я понимаю это.
Обработчики аннотаций включены, но не уверены в правильности конфигурации.