开始写Blog

折腾了一个晚上去找各种Blog,都没有我想要的,尤其是代码格式化的美观问题。哎算了

1     @RequestMapping("/show.htm")
2     public ModelAndView show(HttpServletRequest request){
3         String baseURL = request.getScheme()+"://"+request.getServerName();
4         int port = request.getLocalPort();
5         if (port != 80 || port != 443) {
6             baseURL = baseURL + ":" + port;
7         }
8         return new ModelAndView("dlog","baseURL",baseURL);
9     }

贴段代码看看

posted @ 2012-07-30 11:21  clivelee  阅读(55)  评论(0编辑  收藏  举报