首页>代码>ssm整合easyui实现简单的进销存管理系统(适合新手学习easyui)>/phoneInventory/src/main/java/com/chen/controller/BaseController.java
package com.chen.controller; import javax.annotation.Resource; import javax.servlet.ServletContext; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.RequestMapping; /** * 共有方法 * @author chenguoji * */ @Controller @RequestMapping("/base") public class BaseController { @Resource ServletContext application; //方法参数folder通过@PathVariable指定其值可以从@RequestMapping的{folder}获取,同理file也一样 @RequestMapping("/goURL/{folder}/{file}") public String goURL(@PathVariable String folder,@PathVariable String file) { return "forward:/WEB-INF/views/"+folder+"/"+file+".jsp"; } }

weilaizhisheng LV21
2024年3月21日
oldfox LV19
2023年7月28日
cunbie LV4
2023年6月13日
yeyuuu LV6
2023年5月18日
微信网友_6481263246938112 LV2
2023年5月18日
2102565387 LV1
2022年12月17日
184445428 LV6
2022年11月28日
计算机暴龙战士 LV19
2022年11月27日
lwp011 LV27
2022年9月19日
13645180698 LV5
2022年8月4日