Слияние кода завершено, страница обновится автоматически
При запуске @SpringBootTest возникает ошибка загрузки ApplicationContext.
Однако при запуске @SpringBootApplication проблем нет.
Ошибка @SpringBootTest:
roses "error" bean конфликтует с ErrorMvcAutoConfiguration.WhitelabelErrorViewConfiguration error bean
***************************
APPLICATION FAILED TO START
***************************
Description:
The bean 'error', defined in class path resource [cn/stylefeng/roses/core/config/WebAutoConfiguration.class], could not be registered. A bean with that name has already been defined in class path resource [org/springframework/boot/autoconfigure/web/servlet/error/ErrorMvcAutoConfiguration$WhitelabelErrorViewConfiguration.class] and overriding is disabled.
Action:
Consider renaming one of the beans or enabling overriding by setting spring.main.allow-bean-definition-overriding=true
===2019-08-23 13:26:30.027 ERROR org.springframework.test.context.TestContextManager Line:250 - Caught exception while allowing TestExecutionListener [org.springframework.test.context.web.ServletTestExecutionListener@266374ef] to prepare test instance [net.aas.demo.SpringBootFastApplicationTests@2e807c54]
Затем я отладил вывод и обнаружил, что только defaultErrorView был сопоставлен, а GlobalErrorView roses не был введен, почему это так?
Основной метод main работает без ошибок,
метод модульного тестирования не работает