spring statemachine data jpa样本问题

时间:2017-11-14 17:51:36

标签: spring-boot spring-statemachine

我想让spring statemachine data jpa sample正常工作而我却无法工作。我在这里创建了一个示例github project。到目前为止,我只添加了必要的依赖项并收到此错误:

  

引起:org.springframework.beans.factory.NoSuchBeanDefinitionException:没有类型' org.springframework.statemachine.data.StateRepository'的限定bean。可用:预计至少有1个豆有资格作为autowire候选者。依赖注释:{@ org.springframework.beans.factory.annotation.Autowired(required = true)}       在org.springframework.beans.factory.support.DefaultListableBeanFactory.raiseNoMatchingBeanFound(DefaultListableBeanFactory.java:1493)       at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1104)       在org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1066)       at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor $ AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:585)       在org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:88)       在org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:366)       在org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1264)       在org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:553)       在org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:483)

1 个答案:

答案 0 :(得分:1)

也许你已经想到了这一点但是你错过了jpa libs。可以添加那些,即使用spring-boot-starter-data-jpa