Я новичок в Twitter Typeahead (typeahead.js 0.11.1), и я пытаюсь настроить его с помощью Thymeleaf + Spring MVC с помощью удаленного варианта.Twitter Typeahead Bloodhound Remote Spring MVC Декодирование символов не удалось
Вот мой класс контроллера:
@Controller
public class AutocompleteController {
@Autowired
private IRefDataService refDataService;
@RequestMapping(value = "/get_user_firstname_suggestions.json", method = RequestMethod.GET)
public @ResponseBody List<String> getUserFirstNameSuggestions(@RequestParam("searchTerm") String searchTerm) {
return refDataService.getUserFirstNameSuggestions(searchTerm);
}
}
Вот мой Javascript код:
// constructs the suggestion engine
var firstNames = new Bloodhound({
datumTokenizer: Bloodhound.tokenizers.obj.whitespace('value'),
queryTokenizer: Bloodhound.tokenizers.whitespace,
remote:{
url: "/hub/get_user_firstname_suggestions.json?searchTerm=%QUERY"
}
});
//Initialize the Bloodhound suggestion engine
firstNames.initialize();
$([[${'#' + heading.fieldName}]]).typeahead({
hint: true,
highlight: true,
minLength: 2
},
{
name: 'firstNames',
display: 'value',
source: firstNames.ttAdapter()
});
Когда я пытаюсь запустить мое приложение, я получаю следующее сообщение:
INFO: Character decoding failed. Parameter [searchTerm] with value [%QUERY] has been ignored. Note that the name and value quoted here may be corrupted due to the failed decoding. Use debug level logging to see the original, non-corrupted values.
Note: further occurrences of Parameter errors will be logged at DEBUG level.
Любые идеи, как я могу это решить?