在進行jQuery ajax調用時,我得到了HttpMediaTypeNotAcceptableException
。HttpMediaTypeNotAcceptableException在jQuery ajax調用過程中升級到spring 3.2.4之後
我有以下配置。
在上下文我有(這是在類路徑)
<context:component-scan base-package=" group package" />
<mvc:annotation-driven />
和我在servlet的配置
<context:component-scan base-package="controller pacakges alone" />
<mvc:annotation-driven />
我已經使用spring core 3.2.4
和security 3.1.4
jackson-mapper-asl 1.9.13
和
我有一個jQuery ajax調用
$.ajax({
url : "checkUser.html",
cache : false,
type : "post",
data : "email=" + $('#email').val(),
success : function(response) {
success callback;
}
});
我得到這個異常:
org.springframework.web.HttpMediaTypeNotAcceptableException: Could not find acceptable representation