I am trying to call a controller method in a spring mvc application that is in the tomcat server using ajax in my ReactJS page which is in the Apache Server. In the tomcat console, I can see that spring is receiving the call and processing it. However, the ajax call is not calling the "success" function even though the spring application has processed the call successfully. Is there any other configuration needed in my ReactJS ajax code?
componentDidMount: function() {
$.ajax({
type: "GET",
url: "http://localhost:8080/SpringApp/ajaxCallTest",
data: {testId:'345'},
dataType: 'json',
success: function(response) {
alert('in success');
}
});
}