36 lines
1.1 KiB
Java
36 lines
1.1 KiB
Java
package controller;
|
|
|
|
import java.util.List;
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.context.annotation.Configuration;
|
|
import org.springframework.http.HttpStatus;
|
|
import org.springframework.http.ResponseEntity;
|
|
import org.springframework.stereotype.Controller;
|
|
import org.springframework.ui.ModelMap;
|
|
import org.springframework.web.bind.annotation.PathVariable;
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
import org.springframework.web.bind.annotation.RequestMethod;
|
|
import org.springframework.web.servlet.ModelAndView;
|
|
import org.springframework.web.servlet.config.annotation.EnableWebMvc;
|
|
|
|
import com.fasterxml.jackson.core.JsonProcessingException;
|
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
|
|
|
import dao.entities.DMPDao;
|
|
import entities.DMP;
|
|
|
|
|
|
@Controller
|
|
public class UIController {
|
|
|
|
@Autowired private DMPDao dMPDao;
|
|
|
|
@RequestMapping(value = "/home", method = RequestMethod.GET)
|
|
public String printWelcome(ModelMap model) {
|
|
model.addAttribute("DMPs", dMPDao.getAll());
|
|
return "home";
|
|
}
|
|
|
|
}
|