在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";
}
}