i am implementing a ussd service in spring with the following sample code
@RequestMapping(value = "/ussd", method = RequestMethod.GET)
public @ResponseBody String processUSSD(UssdRequest ussdrequest) {
return "Welcome to our Service.\n1. Test 1\n2. Test 2\n3. Test 3";
}
Everything is working OK, however since the datatype of the response is a string, the service returns a response with braces in the console terminal i.e
[Welcome to our Service.
1. Test 1
2. Test 2
3. Test 3]
as a result, it returns the following on a dialed phone request
<string>Welcome to our Service.
1. Test 1
2. Test 2
3. Test 3</string>
I have tried using object datatype but i get the same output. What should i edit/use to remove <string>
and </string>
at the beginning and end of the response.
Aucun commentaire:
Enregistrer un commentaire