春天restful遇到的问题

  

1,首先春视图解析配置如下:
& lt; !——配置spring mvc试图解析器——在
& lt; bean类=皁rg.springframework.web.servlet.view.InternalResourceViewResolver"在
& lt;属性名=皃refix"值=https://www.yisu.com/zixun/" web - inf /白4? lt;/property>
& lt;属性名=皊uffix"值=https://www.yisu.com/zixun/" . jsp ">
& lt;/bean>

  
 <代码>访问正常,可以返回success.jsp
  @RequestMapping(“测试”)
  公共字符串测试(){
  返回成功;
  }
  
  可以进入控制器方法内部,解析视图错误404年
  @RequestMapping (value=" https://www.yisu.com/zixun/testPath/{id}”)
  公共字符串testPathV (@PathVariable字符串id) {
  logger.info id (" id=" +);
  返回成功;
  }
  http://localhost: 8080/博客/testPath/2
  
  视图解析设置如下都可以正常访问:
  & lt; bean类=皁rg.springframework.web.servlet.view.InternalResourceViewResolver”比;
  & lt;属性名="前缀" value=" https://www.yisu.com/WEB-INF/"祝辞* & lt;/property>
  & lt;属性名="后缀" value=" https://www.yisu.com/zixun/.jsp "祝辞& lt;/property>
  & lt;/bean>  

春天restful遇到的问题