整合一个小小的ssm,返回到jsp的时候老报错404,是什么原因?

ProsperousSun ProsperousSun 墨衍会员 · AI 创作全网分发 墨衍智能分发 通过墨衍一键同步至各平台 可同步平台 CSDN微信公众号微博知乎掘金百家号博客园抖音小红书 你的文章也可以这样分发 墨衍会员 ¥399起/年,写一次发全网 我也要 + 加入社区

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";
}
}


springmvc的xml


index.jsp 首页

但是
最后出现404错误

list代码如下
list.jsp
...全文

相关推荐

评论 2
收藏 已收藏
分享
返回顶部
ProsperousSun
非技术区 2,131 成员 37,911 内容