我有一个具有以下设置的 Spring 集成应用程序。
<int:gateway id="person" service-interface="<package.name>.service.PersonService">
<int:method name="selectFromPerson"
request-channel="selectRequestChannel"
request-timeout="5000"
reply-channel="selectResponseChannel"
reply-timeout="5000"/>
<int:method name="insertIntoEXPerson"
request-channel="insertRequestChannel"
request-timeout="5000"
reply-channel="insertResponseChannel"
reply-timeout="5000"/>
</int:gateway>
后来在Java代码的一些地方,我正在写
final AbstractApplicationContext context =
new ClassPathXmlApplicationContext("classpath:META-INF/spring/integration/*-context.xml");
context.registerShutdownHook();
final PersonService personService = context.getBean(PersonService.class);
当我尝试在 WINDOWS 上运行此应用程序时,它工作得非常好,但在 UNIX 框中它没有运行并显示以下错误。
org.springframework.beans.factory.NoSuchBeanDefinitionException: No unique bean of type [<package.name>.service.PersonService] is defined: expected single bean but found 0:
知道如何让它在 UNIX 机器上运行吗?