Java 在cmd上运行spring应用程序时出现org.springframework.beans.factory.NoSuchBeanDefinitionException错误

Java 在cmd上运行spring应用程序时出现org.springframework.beans.factory.NoSuchBeanDefinitionException错误,java,spring,netbeans,cmd,maven-2,Java,Spring,Netbeans,Cmd,Maven 2,我正在通过netbeans运行我的javamaven应用程序,一切正常。然而,在我清理并构建我的项目并通过终端运行之后,我得到了一个额外的异常:'(: 如果有人能修复我的错误,我会非常高兴。thx和抱歉英语不好:(没有更多信息,很难修复您的错误…@khmarbaise感谢您的响应,我已经在xml中重新定义SpringBean配置后修复了我的错误。我仍然想知道为什么spring注释“@Service”在cmd上运行应用程序时抛出异常? Exception in thread "AWT-EventQ

我正在通过netbeans运行我的javamaven应用程序,一切正常。然而,在我清理并构建我的项目并通过终端运行之后,我得到了一个额外的异常:'(:


如果有人能修复我的错误,我会非常高兴。thx和抱歉英语不好:(

没有更多信息,很难修复您的错误…@khmarbaise感谢您的响应,我已经在xml中重新定义SpringBean配置后修复了我的错误。我仍然想知道为什么spring注释“@Service”在cmd上运行应用程序时抛出异常?
Exception in thread "AWT-EventQueue-0" org.springframework.beans.factory.NoSuchBeanDefinitionException: No unique bean of type [com.bustomi.bookstorepos.service.HakAksesService] is defined: expected single bean but found 0:
        at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBean(DefaultListableBeanFactory.java:271)
        at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1083)
        at com.bustomi.bookstorepos.manager.SpringManager.getBean(SpringManager.java:58)