Skip to content
New issue

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

想请教下WebConfig中的这段代码是啥意思 #1

Open
Bender65535 opened this issue Oct 11, 2019 · 1 comment
Open

想请教下WebConfig中的这段代码是啥意思 #1

Bender65535 opened this issue Oct 11, 2019 · 1 comment

Comments

@Bender65535
Copy link

@PostConstruct
public void initEditableValidation() {
ConfigurableWebBindingInitializer configurableWebBindingInitializer = (ConfigurableWebBindingInitializer) requestMappingHandlerAdapter.getWebBindingInitializer();
if(configurableWebBindingInitializer.getConversionService() != null){
GenericConversionService service = (GenericConversionService) configurableWebBindingInitializer.getConversionService();
service.addConverter(new StringToDateConverter());
}
}

@liznsalt
Copy link
Owner

这是网上的代码,用来将时间戳往前端传的时候转化为时间的格式(yymmdd那种)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants