Spring Data

Spring Data


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)
CourseService
 
 
 
 
 

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

Popular posts from this blog

Robotic Process Automation

WorkFusion

7 Rules of Success A.P.J Abdul Kalam