层次目录:
1、 MyViewResolverController.java
package com.czl.controller;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
@Controller
public class MyViewResolverController {
@RequestMapping("handleplus")
public String hanldeplus(Model model){
model.addAttribute("av1", "日韩无码");
model.addAttribute("av2","欧美精品");
return "meinv:/gaoqing";
}
}
2、自定义视图解析器,实现解析器接口还有优先级接口
MyMeiNvViewResolver:
package com.czl.view;
import org.springframework.core.Ordered;
import org.springframework.core.annotation.Order;
import org.springframework.ui.Model