81,094
社区成员
发帖
与我相关
我的任务
分享
package com.mvc.first;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
@RequestMapping("test")
@Controller
public class First {
private static final String SUCCESS = "success";
@RequestMapping("hello")
public String exectue(){
System.out.println("hello world");
return SUCCESS;
}
}
<bean class="org.springframework.web.servlet.view.InternalResourceViewResolver">
<property name="prefix" value="view/"></property>
<property name="suffix" value=".jsp"></property>
</bean>