SpringBoot MVC
SpringBoot MVC
package com.example.demo.content;
import java.util.List;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
@RestController
@Autowired
@RequestMapping("/")
List<Category> nb = NB.getAllContent();
return nb;
package com.example.demo.content;
import java.util.Arrays;
import java.util.List;
import java.util.ArrayList;
import org.springframework.stereotype.Service;
@Service
NBcourse.add(new Course(1,"NotesBureau",200,200,1001));
NBcourse.add(new Course(1,"NotesBureau",200,200,1001));
NBcourse.add(new Course(1,"NotesBureau",200,200,1001));
return NBategories;