src/controller/indexController.java

(完整代码) 1KB

package controller;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody; 
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;

import Pojo.Keshi;
import Pojo.Yiyuan;
import Pojo.Yisheng;
import java.util.List;

import javax.servlet.http.HttpSession;

import org.springframework.beans.factory.annotation.Autowired;
import service.YiyuanService;
import service.KeshiService;
import service.YishengService;
import cn.itcast.utils.Page;
@Controller

public class indexController {
	
	@Autowired
	private YiyuanService yiyuanService;
	@Autowired
	private KeshiService keshiService;
	
	@Autowired
	private YishengService yishengService;
	
	@RequestMapping("/toyonghuindex")
	public String toyonghuindex(Model model,HttpSession httpSession) 
	{
		List<Yiyuan> yiyuanlist=yiyuanService.selectAll();
		model.addAttribute("yiyuanlist",yiyuanlist);
		List<Keshi> keshilist=keshiService.selectAll();
		httpSession.setAttribute("keshilist", keshilist);
		return "yonghu/index";
		
	}
	
}
	

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。