package com.plannaplan.services; import com.plannaplan.entities.Course; import com.plannaplan.repositories.CourseRepository; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; @Service public class CourseService { @Autowired private CourseRepository repo; public Course getCourseByName(String name) { return this.repo.findByName(name); } }