How to make classes names unique

I am using spring boot 2.x, there are same classes names in different packages after obfuscation, and this results in errors when startup my application in tomcat:

Failed to parse configuration class [com.test.RestApiApplication];
nested exception is org.springframework.context.annotation.ConflictingBeanDefinitionException:
Annotation-specified bean name 't' for bean class [] conflicts with existing,
non-compatible bean definition of same name and class []

how to fix it?