This is my ajax call:
$.ajax({
url: 'configuration/activePlatform/',
type: 'GET',
dataType: 'json',
contentType: "application/json",
success: function(data){
console.log("getActivePlatform ACK");
$('#activePlatform').append(data);
},
error: function(xhr, status, error) {
var err = eval("(" + xhr.responseText + ")");
alert(err.Message);
}
});
The response from this call is 200 OK.
I'm getting a clear text as the respone, the error msg is "Unexpected token s"
This is my server side code:
@Controller
@RequestMapping("/configuration")
public class configuration {
@Autowired
public CommonConfigurations configurations;
@RequestMapping(value = "/activePlatform", method = RequestMethod.GET,
produces = MediaType.APPLICATION_JSON)
public @ResponseBody
String activePlatform() throws Exception {
return configurations.activePlatform;
}
}
What did i do wrong?