JUnit is failing after upgrading to Spring boot 2.3

Viewed 109

Upgrading my Application from Spring boot 2.1.6 to Spring boot 2.3 After adding this property in my Yaml file, I am able to run my application

Spring.main.allow-bean-definition-overriding: true

But even after same property in my yml file , getting following error , any clue will be appreciated

java.lang.IllegalStateException at DefaultCacheAwareContextLoaderDelegate.java:132 Caused by: org.springframework.beans.factory.support.BeanDefinitionOverrideException at DefaultListableBeanFactory.java:995

for reference this is my sample Junit class

@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
@ActiveProfiles("local,test")
@DirtiesContext
public class ControllerContextTest {

}
0 Answers
Related