springmvc-action.xml
<context:component-scan base-package="com.memsay.controller"/>
<context:component-scan base-package="com.memsay.service.*"/>
<context:component-scan base-package="com.memsay.dao.*"/>
jsp->js:调用后ajax,后台controller接收
$.ajax( {
type : 'GET',
contentType : 'application/json',
url : 'http://localhost:8080/com.memsay/getAllWords',
dataType : 'json',
data:'id=111&str=abc',
success : function(data) {
alert("success...");
@Controller
public class WordLearnController extends BaseController{
@Autowired
WordService ws;
@RequestMapping(value = "/getAllWords", method = RequestMethod.GET)
@ResponseBody