In an attempt to upgrade spring boot to the latest version 2.1.1 & spring framework to 5.1.3 in a java based web application, I get the following error
I was having a similar problem with my tests after an update to Spring Boot 2.1. In my case was solved setting the property spring.main.allow-bean-definition-overriding to true. Maybe this can help in your case too.