Created
November 8, 2019 18:22
-
-
Save reyabreu/dbbae336355e1db9cbddd17629d43e2d to your computer and use it in GitHub Desktop.
Registering Spring Boot's default conversion service in unit tests (official docs are wrong!)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Configuration | |
static class ConversionServiceConfiguration implements BeanFactoryPostProcessor { | |
@Override | |
public void postProcessBeanFactory(ConfigurableListableBeanFactory beanFactory) throws BeansException { | |
beanFactory.setConversionService(ApplicationConversionService.getSharedInstance()); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment