@requestmapping--springmvc註解的使用變數和全域性部*替代變數方法
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;
import com.wanju.project001.zonghe.utils.PublicProperty;
@Controller
@RequestMapping("/xinwenmenhu")
public class PublicXinWenDataController {
// @RequestMapping("/content/atype/140528/shishi/*")
@RequestMapping("/content/atype/{PublicProperty.currTime}/shishi/*")
public ModelAndView listall(HttpServletRequest request,HttpServletResponse response){
System.out.println("測試是否進入");
//ModelAndView mav=new ModelAndView("xinwenmenhu/content/atype/140528/shishi/*");
//下面是測試的一個例項,沒有用萬用字元
ModelAndView mav=new ModelAndView("xinwenmenhu/content/atype/140528/shishi/732923606");
return mav;
}
}