Spring Data
Spring Data
Dependency:
Spring Data JPA, Web, Derby (Embedded)
CourseService
Dependency:
Spring Data JPA, Web, Derby (Embedded)
Entity Class (topic)
Define the Repository
Define the Service (TopicService)
Update & Delete Request
Relationship between Topic vs Course class (One
to Many) or
Course vs Topic (Many to One)
Declare the custom method to get the topic
object based on the topic Id
findByProperty<KeyID>
public List<Topic> findByTopicId(String
topicId);
CourseController
Course Pojo relationship with Topic
(ManytoOne)
Add a topic & course
Updated the course
Comments
Post a Comment