package com.example.demo.data;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;

import com.example.demo.model.Employee;

@Controller
public class Controller0 {
	@Autowired
	private Repository0_Memory repository;
	
	@GetMapping("/emps0")
	public String showExampleEmployee(Model model) {
		List<Employee> emps = repository.findAll();
		model.addAttribute("emps", emps);
		return "employees.html";
	}

}
