我在Eclipse IDE中创建了一个小型的maven Spring MVC应用程序,并在部署时不断收到以下异常
ConflictingBeanDefinitionException:
Annotation-specified bean name 'applicationConfiguration.ApplicationProperties'
for bean class [com.bofa.rid.config.ApplicationConfiguration$ApplicationProperties] conflicts
with existing, non-compatible bean definition of same name and class [ApplicationConfiguration$ApplicationProperties]
ApplicationConfiguration
是我在项目中给我的单个班级的初始名称,所以为了解决问题我:
但我仍然无法摆脱错误。这是我目前的AppConfig
@SpringBootApplication
@EnableJpaRepositories
@Resource(name="myBean")
public class AppConfig extends SpringBootServletInitializer {
@Configuration
@PropertySource("classpath:application.properties")
static class AppProps {
}
@Override
protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
return application.sources(AppConfig.class);
}
}
我在项目的任何地方都没有看到ApplicationConfiguration
。关于为什么会发生这种情况的任何想法