Welcome to Print the contents of list along with the subList.
My first Spring MVC Application(30 min)
3.1 File Name: [Link]
package [Link];
import [Link];
import [Link];
import [Link];
import [Link];
@RestController
public class ContentController {
//Put your code here.
@Autowired
private ContentService NB;
@RequestMapping("/")
public List<Category> getContentList(){
List<Category> nb = [Link]();
return nb;
3.2 File Name: [Link]
package [Link];
import [Link];
import [Link];
import [Link];
import [Link];
@Service
public class ContentService {
public List<Category> NBcategories = new ArrayList<>();
//put your code here.
public List<Category> getAllContent() {
List<Course> NBcourse = new ArrayList<>();
[Link](new Course(1,"NotesBureau",200,200,1001));
[Link](new Course(1,"NotesBureau",200,200,1001));
[Link](new Course(1,"NotesBureau",200,200,1001));
List<Category> NBategories = new ArrayList<>();
[Link](new Category(1001,"NotesBureau","Lets teach and learn",NBcourse));
[Link](new Category(1001,"NotesBureau","Lets teach and learn",NBcourse));
[Link](new Category(1001,"NotesBureau","Lets teach and learn",NBcourse));
return NBategories;