无法在JBoss App Server 7中部署War文件

时间:2019-11-12 09:43:33

标签: java spring-boot jboss

创建一个spring boot项目并使用maven命令生成war文件。     尝试在jboss eap服务器7中部署war文件。

它显示以下错误:

Caused by: java.lang.RuntimeException: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'sampleEntityManagerFactory' defined in class path resource [com/sampletesting/SampleDataSourceConfiguration.class]: Unsatisfied dependency expressed through method 'sampleEntityManagerFactory' parameter 0; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'org.springframework.boot.orm.jpa.EntityManagerFactoryBuilder' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {}
Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'sampleEntityManagerFactory' defined in class path resource [com/sampletesting/SampleDataSourceConfiguration.class]: Unsatisfied dependency expressed through method 'sampleEntityManagerFactory' parameter 0; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'org.springframework.boot.orm.jpa.EntityManagerFactoryBuilder' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {}
Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'org.springframework.boot.orm.jpa.EntityManagerFactoryBuilder' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {}

请指导我克服所示的问题

1 个答案:

答案 0 :(得分:0)

question mentions

必须使用

@Primary批注,必需的类型中只有一个bean。