2020-07-25 10:56:11 +02:00
|
|
|
package com.plannaplan.services;
|
|
|
|
|
2020-08-05 21:29:48 +02:00
|
|
|
import com.plannaplan.entities.Course;
|
2020-07-25 10:56:11 +02:00
|
|
|
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;
|
2020-08-05 21:29:48 +02:00
|
|
|
|
|
|
|
public Course getCourseByName(String name) {
|
|
|
|
return this.repo.findByName(name);
|
|
|
|
}
|
2020-07-25 10:56:11 +02:00
|
|
|
}
|