2,100
社区成员
发帖
与我相关
我的任务
分享
package com.sun.controller;
import java.util.List;
import java.util.Map;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import com.sun.bean.Employee;
import com.sun.service.EmployeeService;
@Controller
public class EmployeeController {
@Autowired
EmployeeService employeeService;
@RequestMapping(value="/getemps")
public String emps(Map<String,Object> map){
List<Employee> emps=employeeService.getEmps();
map.put("allEmps", emps);
System.out.println("1515");
for (Employee employee : emps) {
System.out.println(employee);
}
return "list";
}
@RequestMapping("/getlist")
public String emp1(){
System.out.println("很无奈啊!!!");
return "list1";
}
}