We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
public enum MediatekaPage { VIDEO("video"), AUDIO("audio"), PHOTO("photo"); private String value; MediatekaPage(String value) { this.value = value; } }
@GetMapping("/{page}") getMediatekaPage(@PathVariable MediatekaPage page)
The text was updated successfully, but these errors were encountered:
There are places where binding can be done:
@InitBinder
@InitBinder public void initBinder(final WebDataBinder webdataBinder) { webdataBinder.registerCustomEditor(QuestionCategory.class, new QuestionCategoryConverter()); }
Converter
public class StringToEnumConverter implements Converter<String, Modes> { @Override public Modes convert(String from) { return Modes.valueOf(from); } } @Configuration public class WebConfig implements WebMvcConfigurer { @Override public void addFormatters(FormatterRegistry registry) { registry.addConverter(new StringToEnumConverter()); } }
Sorry, something went wrong.
viartemev
No branches or pull requests
The text was updated successfully, but these errors were encountered: