天天看點

jsp springmvc 視圖解析器_SpringMVC視圖解析InternalResource流程分析

在SpringMVC中編寫一個方法:

package com.gwolf.springmvc.handlers;

import java.util.Arrays;

import java.util.Date;

import java.util.Map;

import org.springframework.stereotype.Controller;

import org.springframework.web.bind.annotation.ExceptionHandler;

import org.springframework.web.bind.annotation.PathVariable;

import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RequestMethod;

import org.springframework.web.bind.annotation.RequestParam;

import org.springframework.web.servlet.ModelAndView;

import com.gwolf.springmvc.domain.Person;

@Controller

@RequestMapping("/springmvc")

public class HelloWorldController {

@RequestMapping("/testViewAndViewResolver")

public String testViewAndViewResolver() {

System.out.println("testViewAndViewResolver");

return "success";

}

}