package eu.eudat.migration; import eu.eudat.migration.dao.TemplateRepository; import eu.eudat.migration.entities.Template; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.CommandLineRunner; import org.springframework.stereotype.Component; @Component public class DMPRoadmapMigration implements CommandLineRunner { private final TemplateRepository templateRepository; @Autowired public DMPRoadmapMigration(TemplateRepository templateRepository) { this.templateRepository = templateRepository; } @Override public void run(String... args) throws Exception { Template template = templateRepository.findById(1L).orElse(null); System.out.println("test"); System.out.println(template.toString()); } }